Some operations are intended for matrices in particular. These include
the conjugate and non-conjugate transpose operators **'** and **.'**,
the matrix multiplication operator ** **, and the left and right
matrix ``division'' operators ** ** and **/**. For instance,
if **A** is a matrix and **x** and **b** are vectors, then the lines

`.1ex>> A'`

respectively take the conjugate transpose of A, take the square of A, give a typical matrix equation involving matrix multiplication, give the solution for that equation, give another matrix equation, and give the solution for the second equation.

Such solutions to matrix equations are solved exactly (with Gaussian
elimination) if the matrix is square; others are solved in a least-squares
sense (with Householder orthogonalization). Also see **help slash**.

To get inner and outer products of vectors, remember their formal
definitions. The inner product is given by **x' * y = y' * x**,
and the outer products by **x * y'** and **y * x' = (x * y')'**.

MATLAB understands multiplication and division between a matrix and a scalar in the normal sense;

`.1ex>> 10 * [1 2; 3 4]`

`.1ex>> [1 2; 3 4].2`

MATLAB also has a large number of matrix functions to implement common
mathematical operations, such as finding eigenvalues and eigenvectors.
For instance, **kron** will give the (Kronecker) tensor product.
See **help matfun**.

If you apply a function that operates on scalars to a matrix or vector, or if
you apply a function that operates on vectors to a matrix, MATLAB performs
the operation *element-wise*. Scalar functions will be applied to
each element of the matrix, and the result will be a matrix of the same
size. Vector functions will be applied to each column of the matrix,
and the result will be a row vector of the same width. (Use the transpose
operators to effect row-by-row application.) See **help funm** if you
want to use the matrix and not the array version of a function.
Lastly, functions defined strictly on the real line are applied separately
to the real and imaginary parts of a complex number.

`.1ex>> sin([0 (pi/6) (pi/2) pi])`

Applying operations element-wise is a powerful feature of MATLAB and using it is the fastest and best way to accomplish most things.

Sat Mar 21 21:42:28 EST 1998