Linear algebra functions in MATLAB® provide fast, numerically robust matrix calculations. Capabilities include a variety of matrix factorizations, linear equation solving, computation of eigenvalues or singular values, and more. For an introduction, see Matrices in the MATLAB Environment.
mldivide | Solve systems of linear equations Ax = B for x |
mrdivide | Solve systems of linear equations xA = B for x |
decomposition | Matrix decomposition for solving linear systems |
lsqminnorm | Minimum norm least-squares solution to linear equation |
linsolve | Solve linear system of equations |
inv | Matrix inverse |
pinv | Moore-Penrose pseudoinverse |
lscov | Least-squares solution in presence of known covariance |
lsqnonneg | Solve nonnegative linear least-squares problem |
sylvester | Solve Sylvester equation AX + XB = C for X |
eig | Eigenvalues and eigenvectors |
eigs | Subset of eigenvalues and eigenvectors |
balance | Diagonal scaling to improve eigenvalue accuracy |
svd | Singular value decomposition |
svds | Subset of singular values and vectors |
gsvd | Generalized singular value decomposition |
ordeig | Eigenvalues of quasitriangular matrices |
ordqz | Reorder eigenvalues in QZ factorization |
ordschur | Reorder eigenvalues in Schur factorization |
polyeig | Polynomial eigenvalue problem |
qz | QZ factorization for generalized eigenvalues |
hess | Hessenberg form of matrix |
schur | Schur decomposition |
rsf2csf | Convert real Schur form to complex Schur form |
cdf2rdf | Convert complex diagonal form to real block diagonal form |
lu | LU matrix factorization |
ldl | Block LDL' factorization for Hermitian indefinite matrices |
chol | Cholesky factorization |
cholupdate | Rank 1 update to Cholesky factorization |
qr | Orthogonal-triangular decomposition |
qrdelete | Remove column or row from QR factorization |
qrinsert | Insert column or row into QR factorization |
qrupdate | Rank 1 update to QR factorization |
planerot | Givens plane rotation |
bandwidth | Lower and upper matrix bandwidth |
tril | Lower triangular part of matrix |
triu | Upper triangular part of matrix |
isbanded | Determine if matrix is within specific bandwidth |
isdiag | Determine if matrix is diagonal |
ishermitian | Determine if matrix is Hermitian or skew-Hermitian |
issymmetric | Determine if matrix is symmetric or skew-symmetric |
istril | Determine if matrix is lower triangular |
istriu | Determine if matrix is upper triangular |
norm | Vector and matrix norms |
normest | 2-norm estimate |
vecnorm | Vector-wise norm |
cond | Condition number with respect to inversion |
condest | 1-norm condition number estimate |
rcond | Reciprocal condition number |
condeig | Condition number with respect to eigenvalues |
det | Matrix determinant |
null | Null space |
orth | Orthonormal basis for range of matrix |
rank | Rank of matrix |
rref | Reduced row echelon form (Gauss-Jordan elimination) |
trace | Sum of diagonal elements |
subspace | Angle between two subspaces |
Matrices in the MATLAB Environment
Matrix creation and basic operations.
Solve several types of systems of linear equations.
Eigenvalue and eigenvector computation.
Singular value decomposition (SVD).
Common matrix factorizations (Cholesky, LU, QR).
Matrix inverses and determinants.
LAPACK provides a foundation of routines for linear algebra functions and matrix computations in MATLAB.