MathAlgebraLinear algebraMatrix decomposition

LU Decomposition

7 minutes read

Imagine you're an engineer tasked with simulating the behavior of a complex mechanical system or a computer scientist working on optimizing algorithms for image processing. In both scenarios, you encounter large sets of linear equations that need to be solved repeatedly with different inputs.

LU-Decomposition is a powerful technique that plays a pivotal role in solving linear systems of equations and other matrix-related problems. It can significantly simplify these tasks, making them more efficient and less error-prone.

In this topic, you will delve into the intricacies of LU-Decomposition, from its definition and purpose to practical applications and real-world examples.

Definition of LU-Decomposition

Imagine solving a system of linear equations like this: 2x+3y+z=84x+7y+5z=202x+5y+2z=102x + 3y + z = 8 \\ 4x + 7y + 5z = 20 \\ 2x + 5y + 2z = 10The traditional approach involves row operations and back-substitution, which can be cumbersome, especially for larger systems. LU-Decomposition streamlines this process by breaking it down into two simpler steps.

At its core, LU-Decomposition is a method for factorizing a square matrix AA into two separate matrices, LL and UU, where LL is a lower triangular matrix, and UU is an upper triangular matrix. This decomposition simplifies matrix operations, making it easier to solve systems of linear equations.

Let's take a look at a concrete example. You are given the matrix AA:

Illustration to show the matrix A as a combination of the unknown matrices L and U.

Step 1: Gaussian Elimination for U

In the LU-Decomposition process, constructing the upper triangular matrix UU is the first step. We've already discussed the use of Gaussian Elimination to perform this step, but let's delve into it in more detail:

  1. The core of constructing UU involves applying Gaussian Elimination to the matrix AA. The goal is to transform AA into an upper triangular form, where all entries below the main diagonal become zeros.

    During Gaussian Elimination, row operations are performed to eliminate the entries below the main diagonal. This process involves subtracting multiples of one row from another row to create zeros below the main diagonal. These multipliers are essential for constructing LL, therefore, you should remember them!

  2. After completing the Gaussian Elimination process, the resulting UU matrix will have zeros below the main diagonal and non-zero entries on or above the main diagonal. These non-zero entries represent the coefficients of the linear equations in the system.

In our example, taking these steps will result in the matrix UU:

Illustration showing the now known matrix A in the previously shown equation.

Step 2: Constructing L

Once you've performed Gaussian Elimination on the original square matrix AA to obtain the upper triangular matrix UU, you can focus on constructing the lower triangular matrix LL. The primary goal here is to create LL in such a way that when multiplied with UU, it reproduces the original matrix AA. Let's break down the process:

  1. To start constructing LL, initialize it as an identity matrix of the same size as AA.

  2. Recall the Gaussian Elimination process you applied to AA to obtain UU. During this process, you used multipliers to eliminate entries below the main diagonal of AA. These multipliers are essential for constructing LL.

    For each step of Gaussian Elimination, a multiplier is computed to make the elements below the main diagonal zero. These multipliers are stored in the corresponding positions of LL, below the main diagonal.

  3. Continue this process for each step of Gaussian Elimination until you have filled in all positions below the main diagonal of LL. The completed LL matrix will be a lower triangular matrix with ones on its main diagonal and the multipliers used in Gaussian Elimination in the positions below the main diagonal.

Example: Constructing L

These steps can sound quite confusing, so let's again take a look at our example:

You already know matrix AA and UU, so let's initialize LL. A=(231120123)U=(23103.50.5003)L=(100010001)A = \begin{pmatrix} 2 & 3 & 1 \\ 1 & -2 & 0 \\ -1 & 2 & 3 \end{pmatrix} \quad U = \begin{pmatrix} 2 & 3 & 1 \\ 0 & -3.5 & -0.5 \\ 0 & 0 & 3 \end{pmatrix} \quad L = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix}Now, you need to recall the multipliers used to create UU.
The first step to transform AA into UU was subtracting row 1 multiplied by 12\frac{1}{2} from row 2. Therefore, add 12\frac{1}{2} in the corresponding position of LL:A=(23103.50.5123)U=(23103.50.5003)L=(1000.510001)A' = \begin{pmatrix} 2 & 3 & 1 \\ 0 & -3.5 & -0.5 \\ -1 & 2 & 3 \end{pmatrix} \quad U = \begin{pmatrix} 2 & 3 & 1 \\ 0 & -3.5 & -0.5 \\ 0 & 0 & 3 \end{pmatrix} \quad L = \begin{pmatrix} 1 & 0 & 0 \\ 0.5 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix} Then, add row 1 multiplied by 12\frac{1}{2} to row 3: A=(23103.50.503.53.5)U=(23103.50.5003)L=(1000.5100.501)A' = \begin{pmatrix} 2 & 3 & 1 \\ 0 & -3.5 & -0.5 \\ 0 & 3.5 & 3.5 \end{pmatrix} \quad U = \begin{pmatrix} 2 & 3 & 1 \\ 0 & -3.5 & -0.5 \\ 0 & 0 & 3 \end{pmatrix} \quad L = \begin{pmatrix} 1 & 0 & 0 \\ 0.5 & 1 & 0 \\ -0.5 & 0 & 1 \end{pmatrix}Last but not least, add row 2 to row 3, resulting in the upper triangular matrix UU: A=(23103.50.5003)U=(23103.50.5003)L=(1000.5100.511)A' = \begin{pmatrix} 2 & 3 & 1 \\ 0 & -3.5 & -0.5 \\ 0 & 0 & 3 \end{pmatrix} \quad U = \begin{pmatrix} 2 & 3 & 1 \\ 0 & -3.5 & -0.5 \\ 0 & 0 & 3 \end{pmatrix} \quad L = \begin{pmatrix} 1 & 0 & 0 \\ 0.5 & 1 & 0 \\ -0.5 & -1 & 1 \end{pmatrix}

With these steps, you successfully construct the upper triangular matrix UU, which, when combined with the lower triangular matrix LL, forms the decomposition of the original matrix AA. This decomposition simplifies various matrix operations and facilitates solving systems of linear equations efficiently.

Illustration shows the finished equation of A = LU.

To test whether you calculated correctly, simply multiply LL and UU. When applied, this should result in the original matrix AA.

Conclusion

In conclusion, LU-Decomposition is a powerful tool in linear algebra that simplifies complex mathematical operations involving matrices. It offers a structured approach to solving linear systems, matrix inversion, and determinant calculations. The critical information is:

  • LU-Decomposition is a method for factorizing a square matrix AA into two separate matrices, LL and UU, simplifying matrix operations.

  • Constructing UU involves applying Gaussian Elimination to the matrix AA. The goal is to transform AA into an upper triangular form.

  • Store the used multipliers during Gaussian Elimination for UU in the corresponding positions of LL, below the main diagonal.

4 learners liked this piece of theory. 0 didn't like it. What about you?
Report a typo