How to expand matrix multiplications ?



On Monday 01 of August 2011 17:43:41 you wrote:
[...]
> matrix_element_mult: "."$
> matrix_element_transpose: transpose$
> 
> A: matrix([A1,A2,A3]);
> PP: apply(diag_matrix, makelist(P,i,1,3));
> res: transpose(A).P.A;

I'm sory it should be:
res: transpose(A).P.A - PP;

How to expand the last matrix multiplications stored in 'res' ?