📕 While there are many ways for solving systems of linear equations, LU Decomposition shows the beauty of square matrices and how they can be broken down into triangular matrices which can be used to perform Gaussian elimination. Today in this blog post, I’ll break down what it is, and how it works through an example!
We will be solving the following system of linear equations throughout the examples
$$ \begin{pmatrix} 1 & 2 & 3 \\ 2 & 5 & 2 \\ 6 & -3 & 1 \\ \end{pmatrix}
\begin{pmatrix} x \\ y \\ z \\ \end{pmatrix}
=
\begin{pmatrix} 0 \\ 0 \\ 2 \\ \end{pmatrix} $$
The above example has represented the system of linear equation in matrix form, $Ax = b$, where $A$ is commonly known as the matrix of coefficients, $x$ is known as the matrix of unknowns, and $b$, the constant matrix.
Apart from back substitution, we can also solve the system of linear equations using LU decomposition. From my understanding, LU Decomposition is less computationally expensive as it deals with triangular matrices, which have useful properties which can be taken advantage of to solve the system more efficiently.
However, the steps to solve using LU Decomposition are not as straightforward. Lets dive right into the steps.
$$ A = \begin{pmatrix} 1 & 2 & 3 \\ 2 & 5 & 2 \\ 6 & -3 & 1 \\ \end{pmatrix} $$
First operation for first pivot: $R_2 -2R_1$