Go to the first, previous, next, last section, table of contents.
A number of matrix-matrix operations are provided. These include
addition, subtraction and multiplication. Either a new matrix can be
created (i.e. C = A + B
) or the result can be stored into one of
the operands (i.e. C += A
). A matrix-vector multiplication
method is also implemented. See section Vectors for Linear Algebra.
The matrix
class also has methods that operate on every element
of the matrix. These include functions that add, subtract, multiply or
divide a fraction to every element in the matrix.
The ident
method overwrites the matrix with the identity matrix.
If a size if not given, then the current matrix must be square. The
transpose
method returns the transpose of the matrix.
Go to the first, previous, next, last section, table of contents.