Matrix and scalar

next - skip - up - start

The following expressions multiply the elements of a matrix A by a scalar f: A * f or f * A . Likewise one can divide the elements of a matrix A by a scalar f: A / f

The expressions A + f and A - f add or subtract a rectangular matrix of the same dimension as A with elements equal to f to or from the matrix A.

The expression f + A is an alternative to A + f. The expression f - A subtracts matrix A from a rectangular matrix of the same dimension as A and with elements equal to f

The expression A += f replaces A by A + f. Operators -=, *=, /= are similarly defined.