5A- Second solved problem-LU decomposition-3×3 matrix

Last Updated on December 15, 2025 by Maged kamel

Second solved problem-LU Decomposition of a 3×3 matrix.

One video illustrating the post’s content.

Summary of the content of post 5a

Step 1- Develop U1 and L1 matrices for the second solved problem, LU decomposition

This is the second solved LU Decomposition problem, required to obtain the (x1, x2, x3) values for three linear simultaneous equations. Matrix A is 3×3, and matrix B is the (3×1) matrix.

Confirm the matrix is invertible.

The first check is conducted for all sub-matrices, values A1, A2, and A3, to ensure that their values are non-zero. We can see that A1 = 1, A2 = +2, and A3 = +6.

The matrix A is invertible and has an LU decomposition.

Second solved problem-LU decomposition

Do matrices have an LU decomposition?

In the following slide image, there is an answer to the question of whether all matrices have an LU decomposition. Some matrices cannot have LU decomposition; the way to know is to turn them into submatrices and check whether their determinants are nonzero, or to turn a matrix into an identity matrix.

Do all matrices have an Lu decomposition?

How to turn a matrix A into an identity matrix through elementary operations?

In order to turn matrix A into an identity matrix, we will convert to an Upper matrix U.
We need two operations for that, then turn U matrix to an idendity matrix thru three operations.

The first operation is to multiply the matrix by (-3R1+R2), add the result to the second row R2, then multiply the matrix by (-2R1+R3) and add the result to the third row R3. The new matrix( 1,2,4,0,2,2,0,2,5) will be multiplied by (-2R2+R3, and add the result to the third row R3. We get the U matrix as (1,2,4,0,2,2,0,0,3).

The elementary matrix matrices E1 and E2.

To get Elementary matrix E1: Use an identity matrix, multiplying the identity matrix by (-3R1, add the result to the second row R2, then the second operation is to multiply the identity matrix by (-2R1, add the result to the third row R3. The elements of E1 will be(1,0,0, -3,1,0,-2,0,0).

To get Elementary matrix E2: Use an identity matrix, multiplying the identity matrix by (-2R2+R3, and add the result to the third row R3. The elements of E2 will be(1,0,0, 0,1,0,0,-1,0). This means that E1*E2*A=U matrix.Please Refer to the following slide image for more details.

Use elementary matrices to get the upper matrix of matrix A.

In order to turn the upper matrix into an identity matrix, we need to perform two operations: divide the second row by 2, add the result to 2nd row; divide the third row by 3, and add the result to the third row. We will have a new upper matrix, but with a diagonal of ones.

The matrix becomes (1,2,4,0,1,1,0,0,1). Multiply the third row by -4 and add the result to the first row; multiply the third row by -1 and add the result to the second row.

We multiply by -2* the second Row and add the value to the first Row. We can see the elements of the identity matrix as ( 1 ,0,0, 0 1, 0, 0,0,1).

To get Elementary matrix E3: Use an identity matrix, divide the second row by 2, add the result to 2nd row, divide the third row by 3, and add the result to the third row.

To get Elementary matrix E4: Use an identity matrix, multiply the third row by -4 and add the result to the first row, multiply the third row by -1 and add the result to the second row.

Elementary matrices  E3 and E4  details

To get Elementary matrix E5: Use an identity matrix, multiply the second row by -2, and add the result to the first row. In order to get I matrix we need to multiply matrix A by (E2*E1) from left side this will give us the Upper matrix U, then multiply (E2*E1*A) by (E5*E4*E3) from the left to get the final identity matrix.

The data for elementary matrix E5.

Constitute E5*E4 matrix, multiply E5*E4, constitute E3*E2 matrix, multiply E3*E2. Constitute E1*A matrix, multiply E3*E2

Simplify the product of matrices.

Check that you can get the identity matrix by multiplying (E5*E4) by (E3*E2) by (E1*A). Please refer to the following slide image for more details.

Check all multiplication of the six matrices gives Identity matrix I.

Step 1: Find the upper matrix U1.

To get the upper matrix U1, multiply the first row by (-3R1+R2, add the result to the second row R2, then the second operation is to multiply the matrix by (-2R1+R3, add the result to the third row R3.

We have U1 matrix as (1,2,4, 0,2,2, 0,2,5)

Convert matrix A to matrix U1

Step 2: Develop U and L matrices for the second solved problem, LU decomposition

From the previous slide, we have U1. Multiply the second row by -2 and add the result to Row, Keep R1, R2 unchanged.

Now we have the Upper matrix U as(1,2,4, 0,2,2, 0,0,3), Check that U11=a11, u22=a22 and U31=a13. for l32 the value is(-1)*(-2/2)=+1.Please refer to the image on the next slide.

The upper matrix U data

Develop the lower matrix L.

We will develop the lower matrix; L11=L33=1, L21 equals a21/a11=3/1=3, and L31 equals a31/a11=2/1=2. For L31, it equals 1. Please refer to the operation from U1 to U.

Now, the lower matrix is (1 0 0, 3 1 0, 2 1 1)

Develop the matrix L from matrix A

Check if the product of LU equals A.

We must verify that we have the correct L and U matrices. We will multiply L by U and check that the result is the matrix A, which we have achieved. Please refer to the next slide image.

Check L and U matrices

This is a PDF file that illustrates the first part of this post.

There will be another part for this post that will be covered in Post 5b.

The following post: 5b-Find the three unknowns for the Second solved problem

The following post: 5c- Solved problem for x-y-z values by LU decomposition.

HELM-Helping Engineers Learn Mathematics.

This is the Omni calculator for estimating various linear algebra items – LU Decomposition Calculator.

This is a link to another Calculator for matrices.