Main Content

Factorize Matrix Using LU Factorization Block

Factorize a square matrix into upper and lower submatrices using the LU Factorization block.

The LU Factorization block factors the matrix Ap into upper and lower triangular submatrices U and L, where Ap is the row-permuted version of input matrix A.

P is the permutation index vector which determines how the block reorganizes the input matrix A to form the permuted matrix Ap. With $\mathrm{P}=\left\lbrack \begin{array}{c}2\\1\\3\end{array}\right\rbrack$, the block interchanges the first and second rows of the input matrix A to form the permuted matrix Ap.

$$\mathrm{A}\;=\left\lbrack \begin{array}{ccc}1 & -2 & 3\\4 & 0 & 6\\2 & -1 & 3\end{array}\right\rbrack \;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\mathrm{Ap}=\left\lbrack \begin{array}{ccc}4 & 0 & 6\\1 & -2 & 3\\2 & -1 & 3\end{array}\right\rbrack$$

The LU output is a composite matrix containing the two submatrix factors L and U.

$$\mathrm{L}=\left\lbrack \begin{array}{ccc}1 & 0 & 0\\0\ldotp 25 & 1 & 0\\0\ldotp 5 & 0\ldotp 5 & 1\end{array}\right\rbrack
\;\;\;\;\;\;\;\;\;\;\;\;\mathrm{U}=\;\left\lbrack \begin{array}{ccc}4 & 0 & 6\\0 & -2 & 1\ldotp
5\\0 & 0 & -0\ldotp 75\end{array}\right\rbrack$$

The product of L and U matrices equals Ap. You can verify this using the following model.

See Also

| | (Simulink) | (Simulink)

Related Topics