# Linear Algebra

Solve a system of linear equations, factorize and invert matrices

DSP System Toolbox™ system linear algebra blocks enable you to work with matrices in Simulink®. For example, to solve a set of linear equations through Levinson-Durbin and Cholesky methods, use the Levinson-Durbin and Cholesky Solver blocks. These techniques are commonly used in applications such as the Yule-Walker AR problem and linear predictive coding. To factorize a square matrix into upper and lower components, use methods such as LDL factorization and the LU factorization. To invert matrices, use methods such as Cholesky factorization, LDL factorization, and LU factorization. For a summary of all the supported techniques and the corresponding blocks in DSP System Toolbox which implement the techniques, see Linear Algebra and Least Squares.

## Blocks

expand all

 Cholesky Factorization Factor square Hermitian positive definite matrix into triangular components LDL Factorization Factor square Hermitian positive definite matrices into lower, upper, and diagonal components LU Factorization Factor square matrix into lower and upper triangular components QR Factorization Factor arbitrary matrix into unitary and upper triangular components Singular Value Decomposition Factor matrix using singular value decomposition
 Backward Substitution Solve UX = B for X when U is upper triangular matrix Cholesky Solver Solve SX = B for X when S is a square Hermitian positive definite matrix Forward Substitution Solve LX = B for X when L is lower triangular matrix LDL Solver Solve SX = B when S is square Hermitian positive definite matrix Levinson-Durbin Solve linear system of equations using Levinson-Durbin recursion LU Solver Solve AX = B when A is a square matrix QR Solver Find minimum-norm-residual solution to AX=B SVD Solver Solve AX = B using singular value decomposition
 Cholesky Inverse Compute inverse of Hermitian positive definite matrix using Cholesky factorization LDL Inverse Compute inverse of Hermitian positive definite matrix using LDL factorization LU Inverse Compute inverse of square matrix using LU factorization Pseudoinverse Compute Moore-Penrose pseudoinverse of matrix