How to expand matrix multiplications ?



Perhaps you intended

PP: apply(diag_matrix, makelist(P[i],i,1,3));     /* subscript P? */
res: transpose(A).PP.A;            /* PP, not P ? */

?

On Mon, Aug 1, 2011 at 11:43, Zbigniew Komarnicki <cblasius at gmail.com>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;
>