> restart;
> A:=Matrix([[a,b],[c,d]]);
> B:=Matrix([[p,q],[r,s]]);
> A^2;
> A^3;
> A.B;
> B.A;
> A+B;
> A.B-B.A;
> with(linalg);
Warning, the protected names norm and trace have been redefined and unprotected
> trace(A.B);
> trace(B.A);
>