Documentation

### This is machine translation

Mouseover text to see original. Click the button below to return to the English version of the page.

# 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

 `cat` Concatenate symbolic arrays along specified dimension `colon` Create symbolic vectors, array subscripting, and for-loop iterators `horzcat` Concatenate symbolic arrays horizontally `sort` Sort elements of symbolic vectors or matrices `vertcat` Concatenate symbolic arrays vertically

#### Matrix Transformations

 `diag` Create diagonal matrix or get diagonals from symbolic matrices `reshape` Reshape symbolic array `tril` Return lower triangular part of symbolic matrix `triu` Return upper triangular part of symbolic matrix

#### Solving Linear Equations

 `adjoint` Classical adjoint (adjugate) of square matrix `cond` Condition number of matrix `det` Determinant of symbolic matrix `equationsToMatrix` Convert linear equations to matrix form `inv` Inverse of symbolic matrix `linsolve` Solve linear equations in matrix form `norm` Norm of matrix or vector `pinv` Moore-Penrose inverse (pseudoinverse) of symbolic matrix `rank` Find rank of symbolic matrix `rref` Reduced row echelon form of matrix (Gauss-Jordan elimination)

#### Matrix Basis

 `colspace` Basis for column space of matrix `null` Form basis for null space of matrix `orth` Orthonormal basis for range of symbolic matrix

#### Matrix Factorizations

 `chol` Cholesky factorization `lu` LU factorization `qr` QR factorization `svd` Singular value decomposition of symbolic matrix
 `charpoly` Characteristic polynomial of matrix `eig` Eigenvalues and eigenvectors of symbolic matrix `jordan` Jordan normal form (Jordan canonical form)
 `curl` Curl of vector field `divergence` Divergence of vector field `gradient` Gradient vector of scalar function `hessian` Hessian matrix of scalar function `jacobian` Jacobian matrix `laplacian` Laplacian of scalar function `potential` Potential of vector field `vectorPotential` Vector potential of vector field

#### Normal Forms

 `hermiteForm` Hermite form of matrix `jordan` Jordan normal form (Jordan canonical form) `smithForm` Smith form of matrix

#### Special Matrices

 `bernsteinMatrix` Bernstein matrix `toeplitz` Symbolic Toeplitz matrix
 `expm` Matrix exponential `funm` General matrix function `logm` Matrix logarithm `sqrtm` Matrix 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.

Linear Algebraic Operations

Linear algebra with symbolic expressions and functions.

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

#### Mathematical Modeling with Symbolic Math Toolbox

Get examples and videos