Professional Documents
Culture Documents
Example
x + 2y + z = 8
2 x + 3 y + 4 z = 20
4 x + 3 y + 2 z = 16
Solution
In matrix notation, the given system can be written as
1 2 1 x 8
2 3 4 y = 20
4 3 2 z 16
1 2 1 x 8
0 −1 2 y = 4 (-2) R1 +R2 and (-4) R1+R3
0 −5 −2 z −16
Now, we eliminate y from the first and third rows using the second row. Thus, we get
1 0 5 x 16
0 −1 2 y = 4
0 0 −12 z −36
Before, eliminating z from the first and second row, normalize the third row with respect to the pivot
element, we get
1 0 5 x 16
0 −1 2 y = 4
0 0 1 z 3
Using the third row of above Equation, and eliminating z from the first and second rows, we obtain
1 0 0 x 1
0 −1 0 y = −2
0 0 1 z 3
The solution is
x =1, y =2, z =3.
Example
Solve the system of equation by using the Gauss Jordan elimination method
10 x + y + z = 12
2 x + 10 y + z = 13
x + y + 5z = 7
Solution
10 x + y + z = 12
2 x + 10 y + z = 13
x + y + 5z = 7
the given system
10 1 1 x 12
2 10 1 y = 13
1 1 5 z 7
the arg umented matrix may be written as
10 1 1 12
[ A / B ] = 2 10 1 | 13
1 1 5 7
1 −8 −44 −51
∼ 2 10 1 | 13 R1 − 9 R3
1 1 5 7
1 −8 −44 −51
∼ 0 26 89 | 115 R2 − 2 R1 , R3 − R1
0 9 49 58
1 −8 −44 −51
∼ 0 1 89 | 59 R2 − 3R3
0 9 49 58
1 0 420 421
∼ 0 1 58 | 59 R1 + 8R2 , R3 − 9 R2
0 0 −473 −473
1 0 0 1
1
∼ 0 1 0 | 1 R3 , R1 − 420 R3 , R2 − 58 R2
473
0 0 1 1
thus the system reduces to reduced echlon form
so x = y = z = 1
Example
Solve the system of equations by Gauss Jordan method
10 x1 + x2 + x3 = 12
x1 + 10 x2 − x3 = 10
x1 − 2 x2 + 10 x3 = 9
Solution
10 x1 + x2 + x3 = 12
x1 + 10 x2 − x3 = 10
x1 − 2 x2 + 10 x3 = 9
the matrix form of the given system may be written as
10 1 1 x1 12
1 10 −1 x = 10
2
1 −2 10 x3 9
the arg umented mairix may be written as
10 1 1 12
[ A / B ] = 1 10 −1 | 10
1 −2 10 9
1 −89 10 −78
~ 1 10 −1 | 88 R1 − 9 R2
1 −2 10 87
1 −89 10 −78
~ 0 9 −1 | 8 R2 − R1 , R3 − R1
0 1 0 1
1 −89 10 −78
R R
~ 0 9 −1 | 8 2 , 3
99 87
0 1 0 1
1 −89 10 −78
~ 0 1 −1 | 0 R2 − 8R3
0 1 0 1
1 0 −79 −78
~ 0 1 −1 | 0 R1 − 89 R2 , R3 − R1
0 0 1 1
1 0 0 1
~ 0 1 1 | 1 R1 + 79 R3 , R2 + R3
0 0 0 1
so the system gives the values of all the three var iables
x1 = x2 = x3 = 1
Example
Solve the system of equations by using Gauss Jordan method.
x + 2 y + z − w = −2
2 x + 3 y − z + 2w = 7
x + y + 3 z − 2 w = −6
x+ y+z+w= 2
Solution
x + 2 y + z − w = −2
2 x + 3 y − z + 2w = 7
x + y + 3 z − 2 w = −6
x+ y+z+w= 2
Crout’s ReductionMethod
Here the coefficient matrix [A] of the system of equations is decomposed into the product of two matrices
[L] and [U], where [L] is a lower-triangular matrix and [U] is an upper-triangular matrix with 1’s on its
main diagonal.
The sequence of steps for getting [L] and [U] are given below:
Step I: Multiplying all the rows of [L] by the first column of [U], we get
Step II: Multiplying the first row of [L] by the second and third columns of [U], we obtain
This method is very popular from computer programming point of view, since the storages space reserved
for matrix [A] can be used to store the elements of [L] and [U] at the end of computation.
This method fails if any
aii = 0
Example
Solve the following system of equations by Crout’s reduction method
5 x1 − 2 x2 + x3 = 4
7 x1 + x2 − 5 x3 = 8
3x1 + 7 x2 + 4 x3 = 10
Solution
Let the coefficient matrix [A] be written as [L] [U]. Thus,
l11 0 0 1 u12 u13 5 −2 1
l
21 l22 0 0 1 u23 = 7 1 −5
l31 l32 l33 0 0 1 3 7 4
Step I: Multiply all the rows of [L] by the first column of [U], we get
STEP III: Multiply the 2nd and 3rd rows of [L] by the 2nd column of [U], we get
14 19
l21u12 + l22 = 1 or l22 = 1 + =
5 5
6 41
l31u12 + l32 = 7 or l32 = 7 + =
5 5
STEP IV: Multiply the 2nd row of [L] by the 3rd column of [U]
l21u13 + l22 u23 = −5
19 7
u23 = −5 −
5 5
32
u23 = −
19
STEP V:Finally, multiply the 3rd row of [L] with the 3rd column of [U], we obtain
z1 4
5 0 0
7 19 0 z2 = 8
5
41 327
3
5 19 z3 10
Let [U](X) = (Z), then
[ L]( Z ) = (4 8 10)T
Or
z1 4
5 0 0
7 19 0 z2 = 8
5
41 327
3
5 19 z3 10
Which gives utilizing these values of z, the Eq becomes
By back substitution method, we obtain
46 284 366
x3 = , x2 = , x1 =
327 327 327
This is the required solution.
Example
2 x − 3 y + 10 z = 3
Solve the following system − x + 4 y + 2 x = 20
5 x + 2 y + z = −12
Solution
2 x − 3 y + 10 z = 3
− x + 4 y + 2 x = 20
5 x + 2 y + z = −12
the given system is AX = B
2 −3 10 x 3
A = −1 4 2 X = y Β = 20
5 2 1 z −12
let LU = A
1 0 0 u11 u12 u13
L = l21 1 0 U = 0 u22 u23
l31 l32 1 0 0 u33
u11 u12 u13 2 −3 10
l u = −1 4 2
21 11 l21u12 + u22 l21u13 + u23
l31u11 l31u12 + l32 u22 l31u13 + l32 u23 + u33 5 2 1
here
u11 = 2 , u12 = −3 u13 = 10
−1
l21u11 = −1 ⇒ l21 =
2
5
l31u11 = 5 ⇒ l31 =
2
−1 5
l21u12 + u22 = 4 ⇒ u22 = 4 − l21u12 = 4 − ( )(−3) =
2 2
−1
l21u13 + u23 = 2 ⇒ u23 = 2 − l21u13 = 2 − ( )10 = 7
2
1 19
l31u12 + l32 u22 = 5 ⇒ l32 = [5 − l31u12 ] =
u22 5
253
l31u13 + l32 u23 + u33 ⇒ u33 = 1 − l31u13 − l32 u23 =
5
1 0 0 2 −3 10
−1 5
L= 1 0
U= 0 7
2 2
5 19
1 0 0 −253
2 5 5
y1
let UX = Y where y = y2 , then LY = B,
y3
1 0 0
y1 3
−1 y = 20
i.e 1 0 2
2
5 19 y3 −12
1
2 5
and
1 0 0
x y1
−1 1 0 y = y
2 2
5 19 z y3
1
2 5
now eqn (1) implies
y1 = 3
−1 43
y1 + y2 = 20 ⇒ y2 =
2 2
5 19 −506
y1 + y2 + y3 = −12 ⇒ y3 =
2 5 5
5 43 253 −506
2 x − 3 y + 10 z = 3 , y + 7 z = , − z=
2 2 5 3
by back substitution x = −4, y = 3and z = 2
Example
Solution
x + 3 y + 4z = 4
x + 4 y + 3 z = −2
x + 3 y + 4z = 1
the given system is AX = B
1 3 8 x 4
A = 1 4 3 X = y Β = −2
1 3 4 z 1
let LU = A
1 0 0 u11 u12 u13
L = l21 1 0 U = 0 u22 u23
l31 l32 1 0 0 u33
u11 u12 u13 1 3 8
l u l u + u l u + u = 1 4 3
21 11 21 12 22 21 13 23
l31u11 l31u12 + l32 u22 l31u13 + l32 u23 + u33 1 3 4
here
u11 = 1 , u12 = 3 u13 = 8
l21u11 = −1 ⇒ l21 = 1
l31u11 = 1 ⇒ l31 = 1
−1 5
l21u12 + u22 = 4 ⇒ u22 = 4 − l21u12 = 4 − ( )(−3) =
2 2
l21u13 + u23 = 2 ⇒ u23 = 4 − l21u13 = 4 − (1)3 = 1
1
l31u12 + l32 u22 = 3 ⇒ l32 = [3 − l31u12 ] = 0
u22
l31u13 + l32 u23 + u33 ⇒ u33 = 4 − l31u13 − l32 u23 = −4
1 0 0 1 3 8
L = 1 1 0 U = 0 1 −5
1 0 1 0 0 −4
y1
let UX = Y where y = y2 , then LY = B,
y3
1 0 0 y1 4
i.e 0 1 0 y2 = −2
1 0 1 y3 1
and
1 0 0
x y1
−1 1 0 y = y
2 2
5 19 z y3
1
2 5
now eqn (1) implies
y1 = 4
y2 = −2
y1 + y3 = 1 ⇒ y3 = 1 − y1 = −3
we also have
x + 3 y + 8z = 4
y − 5 z = −2
−4 z = −3
by back substitutiton
3
z=
4
3 7
y = −2 + 5 z = −2 + 5( ) =
4 4
7 3 29
x = 4 − 3 y − 8 z = 4 − 3( ) − 8( ) =
4 4 4