The following matrix operations are available in MATLAB:

These matrix operations apply, of course, to scalars (1-by-1 matrices) as well. If the sizes of the matrices are incompatible for the matrix operation, an error message will result, except in the case of scalar-matrix operations (for addition, subtraction, and division as well as for multiplication) in which case each entry of the matrix is operated on by the scalar.+ addition - subtraction * multiplication ^ power ' transpose \ left division / right division

The ``matrix division'' operations deserve special comment. If `A` is an
invertible square matrix and `b ` is a compatible column, resp. row, vector,
then

is the solution ofx=A \ b

is the solution ofx=b/A

b/A=(A' \ b')'

can be made to operate entry-wise by preceding them by a period. For example, either* , ^ , \ , and /,

or[1,2,3,4].*[1,2,3,4]

will yield[1,2,3,4].^2

Wed Mar 13 19:15:55 MET 1996