kill(all)$

maxima : matrix simplification rules without implementation the rules your self,version  1.0
peter.vlasschaert@gmail.com, 20/10/2019

info:  http://eagle.cs.kent.edu/MAXIMA/maxima_27.html
===========================================

Dot
===

The operator . represents noncommutative multiplication and scalar product. When the operands are 1-column or 1-row matrices a and b, the expression a.b is equivalent to sum (a[i]*b[i], i, 1, length(a)). If a and b are not complex, this is the scalar product, also called the inner product or dot product, of a and b. The scalar product is defined as conjugate(a).b when a and b are complex; innerproduct in the eigen package provides the complex scalar product.

When the operands are more general matrices, the product is the matrix product a and b. The number of rows of b must equal the number of columns of a, and the result has number of rows equal to the number of rows of a and number of columns equal to the number of columns of b.

To distinguish . as an arithmetic operator from the decimal point in a floating point number, it may be necessary to leave spaces on either side. For example, 5.e3 is 5000.0 but 5 . e3 is 5 times e3.

There are several flags which govern the simplification of expressions involving ., namely dot, dot0nscsimp, dot0simp, dot1simp, dotassoc, dotconstrules, dotdistrib, dotexptsimp, dotident, and dotscrules.

Vectors
======

vect is a package of functions for vector analysis. load ("vect") loads this package, and demo ("vect") displays a demonstration.

The vector analysis package can combine and simplify symbolic expressions including dot products and cross products, together with the gradient, divergence, curl, and Laplacian operators. The distribution of these operators over sums or products is governed by several flags, as are various other expansions, including expansion into components in any specific orthogonal coordinate systems. There are also functions for deriving the scalar or vector potential of a field.

The vect package contains these functions: vectorsimp, scalefactors, express, potential, and vectorpotential.

Warning: the vect package declares the dot operator . to be a commutative operator.

eigen
====

The package eigen contains several functions devoted to the symbolic computation of eigenvalues and eigenvectors. Maxima loads the package automatically if one of the functions eigenvalues or eigenvectors is invoked. The package may be loaded explicitly as load ("eigen").

demo ("eigen") displays a demonstration of the capabilities of this package. batch ("eigen") executes the same demonstration, but without the user prompt between successive computations.

The functions in the eigen package are innerproduct, unitvector, columnvector, gramschmidt, eigenvalues, eigenvectors, uniteigenvectors, and similaritytransform. 

load  ' packages'
=============

load(linearalgebra)$
load(lrats)$

?  What about  : declare atom : ' Matrix'  or 'vector'

syntax  :Function: declare (a_1, p_1, a_2, p_2, …)
properties : vector & matrix
=====================
a_i : atom         ,vector,matrix
p_i :predicate  , nonscalar
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Tells Maxima to consider a_i a 'nonscalar' variable. The usual application is to declare a variable as a symbolic vector or matrix.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

simp;

default evaluation : true   (with use default options in maxima)

declare(A,nonscalar,B,nonscalar,a, constant,b,real);

rem : find out symbol or expression is  atom

atom(A);

=>   change default opttion: from maxima.
================================

simp:false;

result : no simplification

p1:(A^^(-1))^^(-1);

p2:ev(p1,simp:true);

properties(simp);

result : evflag

outside evaluation (ev),  'simp' : false 
---------------------------------------------------

p3:simp;

properties(A);

rem :  A get properties through the declare statement above

declare(A,symmetric);

properties(A);

is ( A = transpose(A));

declare();

declare(C,nonscalar);

dotdistrib;

p4:A.(B+C);

dotdistrib:true;

p5:ev(p4,simp:true);

Option variable: dotscrules
    Default value: false
    When dotscrules is true, an expression A.SC or SC.A simplifies to SC*A and A.(SC*B) simplifies to SC*(A.B).

dotscrules:true;

properties(a);
properties(b);
properties(A);

A = mattrix
---------------

dot,dot
---------

p6a:ev(b.A.a,simp:true);

 *,*
-----

p6b:ev(b*A*a,simp:true);

dot,*
------

p6c:ev(b.A*a,simp:true);

 *,dot
-------

p6d:ev(b*A.a,simp:true);