Main Content

Linear Algebra

Linear algebra operations on symbolic vectors and matrices

Linear algebra is the study of linear equations and their properties. Symbolic Math Toolbox™ provides functions to solve systems of linear equations. You can also analyze, transform, and decompose matrices using Symbolic Math Toolbox functions.

Functions

expand all

Matrix Operations

catConcatenate symbolic arrays along specified dimension
colonCreate symbolic vectors, array subscripting, and for-loop iterators
horzcatConcatenate symbolic arrays horizontally
sortSort elements of symbolic arrays
vertcatConcatenate symbolic arrays vertically

Matrix Transformations

diagCreate diagonal matrix or get diagonals from symbolic matrices
reshapeReshape symbolic array
trilReturn lower triangular part of symbolic matrix
triuReturn upper triangular part of symbolic matrix

Solving Linear Equations

adjointClassical adjoint (adjugate) of square matrix
condCondition number of matrix
detDeterminant of symbolic matrix
equationsToMatrixConvert linear equations to matrix form
invInverse of symbolic matrix
linsolveSolve symbolic linear equations in matrix form
normNorm of symbolic vector or matrix
pinvMoore-Penrose inverse (pseudoinverse) of symbolic matrix
rankRank of symbolic matrix
rrefReduced row echelon form of matrix (Gauss-Jordan elimination)

Matrix Basis

colspaceBasis for column space of matrix
nullForm basis for null space of matrix
orthOrthonormal basis for range of symbolic matrix

Matrix Factorizations

cholCholesky factorization
luLU factorization
qrQR decomposition of symbolic matrix
svdSingular value decomposition of symbolic matrix
charpolyCharacteristic polynomial of matrix
eigEigenvalues and eigenvectors of symbolic matrix
jordanJordan normal form (Jordan canonical form)
curlCurl of symbolic vector field
divergenceDivergence of symbolic vector field
gradientGradient vector of symbolic scalar field
hessianHessian matrix of symbolic scalar function
jacobianJacobian matrix of symbolic function
laplacianLaplacian of symbolic field
potentialPotential of vector field
vectorPotentialVector potential of vector field

Normal Forms

hermiteFormHermite form of matrix
jordanJordan normal form (Jordan canonical form)
smithFormSmith form of matrix

Special Matrices

bernsteinMatrixBernstein matrix
toeplitzSymbolic Toeplitz matrix
expmMatrix exponential of symbolic matrices
funmGeneral matrix function
logmMatrix logarithm
sqrtmMatrix square root

Topics

Featured Examples