0% found this document useful (0 votes)
150 views

LU Decomposition and Inverse Matrix

LU decomposition can be used to solve systems of linear equations. It involves: 1) Decomposing the coefficient matrix A into lower triangular matrix L and upper triangular matrix U such that A = LU 2) Solving LY = B for Y 3) Solving UX = Y for X to obtain the solution vector X. For example, given the equations 4x - 2y - 3z = 8, 5x + 3y - 4z = 4, and 6x - 4y - 5z = 12, we can write them in matrix form as AX = B. LU decomposition yields matrices L and U such that A = LU. We then solve LY = B and
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
150 views

LU Decomposition and Inverse Matrix

LU decomposition can be used to solve systems of linear equations. It involves: 1) Decomposing the coefficient matrix A into lower triangular matrix L and upper triangular matrix U such that A = LU 2) Solving LY = B for Y 3) Solving UX = Y for X to obtain the solution vector X. For example, given the equations 4x - 2y - 3z = 8, 5x + 3y - 4z = 4, and 6x - 4y - 5z = 12, we can write them in matrix form as AX = B. LU decomposition yields matrices L and U such that A = LU. We then solve LY = B and
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 15

LU Decomposition

Let A = LU and substitute into AX = B.


Solve LUX = B for X to solve the system.
Let UX = Y.
LY = B and UX = Y

LY = B for Y,
First solve

and then solve UX = Y for X


Example 1
Let us say you are given Converting them to
the equations: matrices will give you:
4x – 2y – 3z = 8 4 –2 –3 8
5x + 3y – 4z = 4 5 3 –4 = 4
6x – 4y – 5z = 12 6 –4 –5 12
A * X = B L
4 –2 –3 x1 8 1 0 0
5 3 –4 * x2 = 4
6 –4 –5 x3 12 1 0
1
5/4
-5/4*R1 + R2 = new R2
U U
4 –2 –3 4 –2 –3

5 3 –4 0 11/2 –1/4
6 –4 –5 6 –4 –5
U L
4 –2 –3 1 0 0
5/4 1 0
0 11/2 –1/4 1
6 –4 –5
-6/4*R1
6/4 + R3 = new R3 -2/11
2/11*R2 + R3 = new R3
U U
4 –2 –3 4 –2 –3

0 11/2 –1/4 0 11/2 –1/4


0 –1 –1/2 0 0 –6/11
y1 = 8
(5/4)(8)+L y2 = 4 U
y12 = -6 0 0 4 –2 –3
(6/4)(8)
5/4 –1(2/11)(-6)
0 +
y3 = 12 0 11/2 –1/4
6/4 -2/11 1
y3 = -12/11 0 0 –6/11
* Y = B
y1 8
* y2 = 4
y3 12
U * X = Y
4 –2 –3 x1 8
* x2 = -6
0 11/2 –1/4 x3 -12/11
0 0 –6/11
(-6/11)x3 = -12/11 4x1 – 2(-1) – 3(2) = 8
x3 = 2 4x1 = 12
(11/2)x2 + (-1/4)(2) = -6 x1 = 3
(11/2)x2 = -(11/2)
x2 = -1
Inverse Matrix
A * X = B
x1 y1 z 1 x b1
x2 y2 z 2 * y = b2
x3 y3 z 3 z b3

AX = B ; X = B/A ; X = A-1B
You need to get the inverse of matrix A and
multiply it to matrix B to get the values of
matrix X.
Example 1
Let us say you are given Converting them to
the equations: matrices will give you:
4x – 2y – 3z = 8 4 –2 –3 8
5x + 3y – 4z = 4 5 3 –4 = 4
6x – 4y – 5z = 12 6 –4 –5 12
A * X = B
4 –2 –3 x 8
5 3 –4 * y = 4
6 –4 –5 z 12

Find the determinant of A


D = 4(-15 – 16) – 5(10 – 12) + 6(17)
D = 4(-31) – (-2) + 6(17)
D = -12
Cofactors of matrix A
A
3 -4 5 -4 5 3
+ – + 4 –2 –3
-4 -5 6 -5 6 -4
5 3 –4
-2 -3 4 -3 4 -2 6 –4 –5
– + –
-4 -5 6 -5 6 -4
A
-2 -3 4 -3 4 -2
+ – + -31 1 -38
3 -4 5 -4 5 3
2 -2 4
17 1 22
X = A-1 * B Recall D of A
D = -12
x -31 2 8 17
y = 1 -2* 41 * 1
z -38 4 1222
-12
x = [(-31)(8) + 2(4)]/(-12)
+ 17(12)
=3

y = [1(8) – 2(4) +]/(-12)


1(12) = -1

z = [-38(8) + 4(4)]/(-12)
+ 22(12)
=2
Seatwork
2x – y + 4z = -3
x – 2y – 10z = -6 x y z k
3x + 4z = 7 1 -3 4 -3
6 11 4 2
8 -9 12 9
x – y + 2z = 0
x – 2y + 3z = -1
2x – 2y + z = -3
Assignment???

You might also like