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

Last Updated on March 8, 2025 by Maged kamel

The second solved problem- LU Decomposition-3×3 matrix.

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

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

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

The matrix A is invertible and has L and U decomposition.

Second solved problem-LU decomposition



To get the Lower Matrix, we write Matrix A as shown in the slide. We use a11 as a pivot; we know that for the lower Matrix, L11=L22=L33=1. We need to find out the value of L21 and L31.
For L21, it equals 3/1, while l31 equals 2/1; please check the arrows.

The elements of L1 are completed. Still, we need to estimate the value of L32, but this depends on the matrix U1’s pivot u22.

We proceed to find the matrix u1. The first three elements in the first Row of the U1 Matrix are the same as the first Row of matrix A ( 1 2 4).

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

Pict 2A find upper

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

From the previous slide, we have U1. Consider U22 as a pivot, divide U32/U22 to get the value of L32, and check the arrow that goes from 2 to 2. The division of 2/2 is equal to 1, which is the value of L32. Use the -1 for, multiply the second row, and add to the third row; we get (0 0 3). We have completed the U matrix; please refer to the image on the next slide.

The matrix C expression.

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 is equal to 1. Please refer to the operation from U1 to U.

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

The expression for inverse matrix L-1.

Check if the product of LU equals A.

We must check that we have the correct L and U matrices values. 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

Step-3-Develop a new matrix C.

We have written the L and U matrices as shown. We know that LU=A, for the expression A*x=b, we can rewrite it as (L)*(U)*x=b, and we can write U*x=c.

The final expression will be LC=b, for l and b are known values; hence, we can get the value of matrix C, C=L-1*b, but we need to estimate the inverse of matrix L.

Develop new matric C

Step-4- Get the inverse matrix L-1.

For the second solved problem-LU decomposition, we need to estimate the determinant value of matrix L and construct the cofactor matrix elements.

steps to get L inverse.

The adjugate of the lower Matrix is the cofactor transpose. The cofactor C11 is equal to +1; the cofactor C12 is equal to -3. The cofactor C13 is equal to +1; cofactor C21 is equal to 0.

Find Cofactor matrix for L matrix-1

The cofactor C22 is equal to +1; cofactor C23 is equal to -1. The cofactor C31 is equal to 0; cofactor C32 is equal to 0. The cofactor C33 is equal to 1.

The inverse of matrix L is a 3×3 matrix with the first row ( 1 0 0), the second row (-3 1 0), and the last (1 -1 1).

The final value of inverse matrix of L.


We can estimate the C matrix by multiplying L-1 by b.

Step 5- Get the value of the C matrix.

The product of the inverse of L by b will be a (3×1) Matrix with the elements (3 4 -6). But U*X=c. We need to estimate the inverse of matrix U to get the column vector X.

Determine the value of matrix C.

Step-6- Get the inverse matrix U-1.

For the second solved problem-LU decomposition, we need to estimate the determinant value of matrix U and construct the cofactor matrix elements.

The determinant value of matrix U.

The adjugate of the upper Matrix is the cofactor transpose. The cofactor C11 is equal to +6; the cofactor C12 is equal to 0. The cofactor C13 is equal to 0; cofactor C21 is equal to -6.

The cofactor values for U matrix from C11 to C21.

The cofactor C22 is equal to +3; the cofactor C23 is equal to 0. The cofactor C31 is equal to -4; cofactor C32 is equal to -2.

The cofactor values for U matrix from C22 to C32.

The inverse of Matrix U is a 3×3 matrix with the first Row as ( 1  -1 -2/3), the second row as (0 ½- 1/3), and the last Row as (0 0 1/3).

The final value of inverse of U matrix

Step 7-Get the (x1, x2, x3) values for the 3 x 3 matrix.

The product of the inverse of U by c will give the value of the column vector X. X1=3, x2=4, x3=-2.

It is essential to check that the value of the three unknowns is correct; we double-check by multiplying A*x and check that the product is equal to vector b, which can be found valid.

Find X values from U-1 and C matrices

As shown in the next slide image, we can get the value of the X column vector by multiplying U-1*L-1*b to get the values of x1,x2, and x3.

Check the x value by excel.

The following post: Solved problem for x-y-z values by Lu decomposition.

HELM-Helping Engineers Learn Mathematics.

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

This is a link to another –Calculator for matrices.

error

Enjoy this blog? Please spread the word :)