Main Content

Linear Algebra

Linear equations, eigenvalues, singular values, decomposition, matrix operations, matrix structure

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.

Functions

expand all

mldivideSolve systems of linear equations Ax = B for x
mrdivideSolve systems of linear equations xA = B for x
pagemldividePage-wise left matrix divide
pagemrdividePage-wise right matrix divide
decompositionMatrix decomposition for solving linear systems
lsqminnormMinimum norm least-squares solution to linear equation
linsolveSolve linear system of equations
invMatrix inverse
pageinvPage-wise matrix inverse
pinvMoore-Penrose pseudoinverse
lscovLeast-squares solution in presence of known covariance
lsqnonnegSolve nonnegative linear least-squares problem
sylvesterSolve Sylvester equation AX + XB = C for X
eigEigenvalues and eigenvectors
pageeigPage-wise eigenvalues and eigenvectors
eigsSubset of eigenvalues and eigenvectors
balanceDiagonal scaling to improve eigenvalue accuracy
svdSingular value decomposition
pagesvdPage-wise singular value decomposition
svdsSubset of singular values and vectors
svdsketchCompute SVD of low-rank matrix sketch
gsvdGeneralized singular value decomposition
ordeigEigenvalues of quasitriangular matrices
ordqzReorder eigenvalues in QZ factorization
ordschurReorder eigenvalues in Schur factorization
polyeigPolynomial eigenvalue problem
qzQZ factorization for generalized eigenvalues
hessHessenberg form of matrix
schurSchur decomposition
rsf2csfConvert real Schur form to complex Schur form
cdf2rdfConvert complex diagonal form to real block diagonal form
luLU matrix factorization
ldlBlock LDL' factorization for Hermitian indefinite matrices
cholCholesky factorization
cholupdateRank 1 update to Cholesky factorization
qrQR decomposition
qrdeleteRemove column or row from QR factorization
qrinsertInsert column or row into QR factorization
qrupdateRank 1 update to QR factorization
planerotGivens plane rotation
transposeTranspose vector or matrix
ctransposeComplex conjugate transpose
pagetransposePage-wise transpose
pagectransposePage-wise complex conjugate transpose
mtimesMatrix multiplication
pagemtimesPage-wise matrix multiplication
mpowerMatrix power
sqrtmMatrix square root
expmMatrix exponential
logmMatrix logarithm
funmEvaluate general matrix function
kronKronecker tensor product
crossCross product
dotDot product
bandwidthLower and upper matrix bandwidth
trilLower triangular part of matrix
triuUpper triangular part of matrix
isbandedDetermine if matrix is within specific bandwidth
isdiagDetermine if matrix is diagonal
ishermitianDetermine if matrix is Hermitian or skew-Hermitian
issymmetricDetermine if matrix is symmetric or skew-symmetric
istrilDetermine if matrix is lower triangular
istriuDetermine if matrix is upper triangular
normVector and matrix norms
pagenormPage-wise matrix or vector norm
normest2-norm estimate
vecnormVector-wise norm
condCondition number for inversion
condest1-norm condition number estimate
rcondReciprocal condition number
condeigCondition number with respect to eigenvalues
detMatrix determinant
nullNull space of matrix
orthOrthonormal basis for range of matrix
rankRank of matrix
rrefReduced row echelon form (Gauss-Jordan elimination)
traceSum of diagonal elements
subspaceAngle between two subspaces

Topics