Question: Multiplying Vectors and Matrices (more than 2 in total)

August 18 2014 casperyc 882
Maple 18

0

with(LinearAlgebra):
a:=Vector([1,2]);
b:=Matrix([[1,2],[1,2]]);

Say if I need a^T * b * a, I will do this:

VectorMatrixMultiply(Transpose(a), b);
VectorMatrixMultiply(%, a);

But this seems too long for such a simple matrix (and vector) computation. I am sure there must be an short way.

What if I need more computation, like

 

a^T * b * c*d*f*g* a, where c,d,f,g are other 2x2 matrices.
 If I were to use the above command, that'll take a long time to input.

Thanks,

Please Wait...