Arithmetic

If A and B are two matrices, then A+B, A-B, and A * B are the sum, difference, and product of A and B.

A+B, A-B are possible only when A and B have the same dimensions, or one of them is a scalar.

A*B is possible only when the number of columns of A equals the number of rows of B, or one of them is a scalar.


oz 2009-12-22