Home > Matrix & Vector > Solving Systems of linear equations > Solving systems of linear equations using LU decomposition using Gauss Elimination method example

8. LU decomposition using Gauss Elimination method example ( Enter your problem )
  1. Example `2x+5y=21,x+2y=8`
  2. Example `2x+5y=16,3x+y=11`
  3. Example `2x+3y-z=5,3x+2y+z=10,x-5y+3z=0`
  4. Example `x+y+z=3,2x-y-z=3,x-y+z=9`

3. Example `2x+3y-z=5,3x+2y+z=10,x-5y+3z=0`





Solve Equations 2x+3y-z=5,3x+2y+z=10,x-5y+3z=0 using LU decomposition using Gauss Elimination method

Solution:
Total Equations are `3`

`2x+3y-z=5 -> (1)`

`3x+2y+z=10 -> (2)`

`x-5y+3z=0 -> (3)`

Now converting given equations into matrix form
`[[2,3,-1],[3,2,1],[1,-5,3]] [[x],[y],[z]]=[[5],[10],[0]]`

Now, A = `[[2,3,-1],[3,2,1],[1,-5,3]]`, X = `[[x],[y],[z]]` and B = `[[5],[10],[0]]`

`LU` decomposition : If we have a square matrix A, then an upper triangular matrix U can be obtained without pivoting under Gaussian Elimination method, and there exists lower triangular matrix L such that A=LU.


Here `A` = 
`2``3``-1`
`3``2``1`
`1``-5``3`


Using Gaussian Elimination method
`R_2 larr R_2-``(3/2)``xx R_1` `[:.L_(2,1)=color{blue}{3/2}]`

 = 
`2``3``-1`
`0``-5/2``5/2`
`1``-5``3`


`R_3 larr R_3-``(1/2)``xx R_1` `[:.L_(3,1)=color{blue}{1/2}]`

 = 
`2``3``-1`
`0``-5/2``5/2`
`0``-13/2``7/2`


`R_3 larr R_3-``(13/5)``xx R_2` `[:.L_(3,2)=color{blue}{13/5}]`

 = 
`2``3``-1`
`0``-5/2``5/2`
`0``0``-3`


`:.U` = 
`2``3``-1`
`0``-5/2``5/2`
`0``0``-3`


`L` is just made up of the multipliers we used in Gaussian elimination with 1s on the diagonal.

`:.L` = 
`1``0``0`
`color{blue}{3/2}``1``0`
`color{blue}{1/2}``color{blue}{13/5}``1`


`:.` LU decomposition for A is

`A` = 
`2``3``-1`
`3``2``1`
`1``-5``3`
 = 
`1``0``0`
`3/2``1``0`
`1/2``13/5``1`
 `xx` 
`2``3``-1`
`0``-5/2``5/2`
`0``0``-3`
 = `LU`


Now, `Ax=B`, and `A=LU => LUx=B`

let `Ux=y`, then `Ly=B =>`

`1``0``0`
`3/2``1``0`
`1/2``13/5``1`
 `xx` 
`y_1`
`y_2`
`y_3`
 = 
`5`
`10`
`0`


```y_1``=``5```
```3/2y_1``+``y_2``=``10```
```1/2y_1``+``13/5y_2``+``y_3``=``0```


Now use forward substitution method
From (1)
`y_1=5`

From (2)
`3/2y_1+y_2=10`

`=>(3(5))/(2)+y_2=10`

`=>15/2+y_2=10`

`=>y_2=10-15/2`

`=>y_2=5/2`

From (3)
`1/2y_1+13/5y_2+y_3=0`

`=>((5))/(2)+(13(5/2))/(5)+y_3=0`

`=>9+y_3=0`

`=>y_3=0-9`

`=>y_3=-9`

Now, `Ux=y`

`2``3``-1`
`0``-5/2``5/2`
`0``0``-3`
 `xx` 
`x`
`y`
`z`
 = 
`5`
`5/2`
`-9`


```2x``+``3y``-``z``=``5```
`-``5/2y``+``5/2z``=``5/2```
`-``3z``=``-9```


Now use back substitution method
From (3)
`-3z=-9`

`=>z=(-9)/(-3)=3`

From (2)
`-5/2y+5/2z=5/2`

`=>-(5y)/(2)+(5(3))/(2)=5/2`

`=>-(5y)/(2)+15/2=5/2`

`=>-(5y)/(2)=5/2-15/2`

`=>-(5y)/(2)=-5`

`=>y=-5xx-2/5=2`

From (1)
`2x+3y-z=5`

`=>2x+3(2)-(3)=5`

`=>2x+3=5`

`=>2x=5-3`

`=>2x=2`

`=>x=(2)/(2)=1`

Solution by LU decomposition method is
`x=1,y=2 and z=3`




This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then Submit Here





Share this solution or page with your friends.
 
 
Copyright © 2026. All rights reserved. Terms, Privacy
 
 

.