Octave Programming Tutorial/Linear algebra

= Functions = $$I + A + \frac{A^2}{2!} + \frac{A^3}{3!} + \cdots$$
 * computes the determinant of the matrix A.
 * returns the eigenvalues of  in the vector , and
 * also returns the eigenvectors in  but   is now a matrix whose diagonals contain the eigenvalues.  This relationship holds true (within round off errors).
 * computes the inverse of non-singular matrix A. Note that calculating the inverse is often 'not' necessary. See the next two operators as examples. Note that in theory   should return the identity matrix, but in practice, there may be some round off errors so the result may not be exact.
 * computes X such that $$XB = A$$. This is called right division and is done without forming the inverse of B.
 * computes X such that $$AX = B$$. This is called left division and is done without forming the inverse of A.
 * computes the p-norm of the matrix (or vector) A. The second argument is optional with default value $$p = 2$$.
 * computes the (numerical) rank of a matrix.
 * computes the trace (sum of the diagonal elements) of A.
 * computes the matrix exponential of a square matrix. This is defined as
 * computes the matrix logarithm of a square matrix.
 * computes the matrix square root of a square matrix.

Below are some more linear algebra functions. Use  to find out more about them.
 * (eigenvalue balancing),
 * (condition number),
 * (computes diag(x) * A efficiently),
 * (dot product),
 * (Givens rotation),
 * (Kronecker product),
 * (orthonormal basis of the null space),
 * (orthonormal basis of the range space),
 * (pseudoinverse),
 * (solves the Sylvester equation).

= Factorizations =
 * computes the Cholesky factorization of the symmetric positive definite matrix A, i.e. the upper triangular matrix R such that $$R^TR = A$$.
 * computes the LU decomposition of A, i.e. L is lower triangular, U upper triangular and $$A = LU$$.
 * computes the QR decomposition of A, i.e. Q is orthogonal, R is upper triangular and $$A = QR$$.

Below are some more available factorizations. Use  to find out more about them.
 * (generalized eigenvalue problem: QZ decomposition),
 * (Hessenberg-triangular decomposition),
 * (Schur decomposition),
 * (singular value decomposition),
 * (Householder reflections),
 * (Orthogonal basis of block Krylov subspace).

Return to the Octave Programming Tutorial index