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 linear equations in matrix form
normNorm of matrix or vector
pinvMoore-Penrose inverse (pseudoinverse) of symbolic matrix
rankFind rank 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 factorization
svdSingular value decomposition of symbolic matrix
charpolyCharacteristic polynomial of matrix
eigEigenvalues and eigenvectors of symbolic matrix
jordanJordan normal form (Jordan canonical form)
curlCurl of vector field
divergenceDivergence of vector field
gradientGradient vector of scalar function
hessianHessian matrix of scalar function
jacobianJacobian matrix
laplacianLaplacian of scalar function
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
funmGeneral matrix function
logmMatrix logarithm
sqrtmMatrix square root

Topics

Symbolic Matrix Computation

This example shows how to perform simple matrix computations using Symbolic Math Toolbox™.

Linear Algebraic Operations

Linear algebra with symbolic expressions and functions.

Solve System of Linear Equations

Solve systems of linear equations in matrix or equation form.

Basic Algebraic Operations

Perform algebraic operations on symbolic expressions and function.

Singular Value Decomposition

Singular value decomposition (SVD) of a matrix.

Eigenvalues

Find eigenvalues, characteristic polynomials, and determinants of matrices.

Jordan Canonical Form

Convert matrix to Jordan normal form (Jordan canonical form).

Eigenvalues of the Laplace Operator

This example shows how to solve the eigenvalue problem of the Laplace operator on an L-shaped region.

Hilbert Matrices and Their Inverses

This example shows how to compute the inverse of a Hilbert matrix using Symbolic Math Toolbox™.

Featured Examples