0% found this document useful (0 votes)
4 views4 pages

Example 1

The document outlines the solution to a system of linear equations using the Gauss-Jordan method. It details the steps of arranging the equations into matrices, performing forward elimination, and then backward elimination to arrive at the final solution for the variables x1, x2, and x3. The final normalized form of the equations shows the values of x1, x2, and x3 as 3, -2.5, and 7 respectively.

Uploaded by

s140917
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views4 pages

Example 1

The document outlines the solution to a system of linear equations using the Gauss-Jordan method. It details the steps of arranging the equations into matrices, performing forward elimination, and then backward elimination to arrive at the final solution for the variables x1, x2, and x3. The final normalized form of the equations shows the values of x1, x2, and x3 as 3, -2.5, and 7 respectively.

Uploaded by

s140917
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Example 1: Solve the following system of liner equations using Gauss – Jorden Method.

3 x 1−0.1 x2−0.2 x 3=7.85


0.1 x 1+7 x 2−0.3 x 3=−19.3
0.3 x 1−0.2 x 2+10 x 3=71.4
Solution:

Step (1): Arrange the Equations in matrix [A] and matrix [B].

[ ][ ] [ ]
3 −0.1 −0.2 x 1 7.85
0.1 7 =
−0.3 x 2 −19.3
0.3 −0.2 10 x3 71.4

Step (2): Forward Elimination (First Elimination).

[ ] []
a11 a12 a13 1 ⇒ b1 1
a21 a22 a23 R2−(a21 /a 11) R1 b2 r 2−(a21 /a 11)r 1
a31 a32 a33 R3−(a 31/a 11) R1 b3 r 3−(a 31/a 11)r 1


A [ i , : ]−( A [ i , j ] / a [ j , j ] ) A [ j, : ] ⇒ B [ i ] −( A [ i , j ] / a [ j, j ] ) B [ j ]
A [ i , : ]−( A [ i , j ] / a [ j , j ] ) A [ j, : ] B [i]−( A [i , j]/a [ j , j])B [ j]

[ ] [ ]
3 −0.1 −0.2 1 ⇒ 7.85 1
0.1 7 −0.3 R 2−(0.1/3) R1 −19.3 r 2−(0.1/3)r 1
0.3 −0.2 10 R 3−(0.3/3)R1 71.4 r 3−(0.3 /3)r 1

[ ][ ] [ ]
3 −0.1 −0.2 x1 7.85
=
0 7.003333 −0.293333 x2 −19.5617
0 −0.19 10 x3 70.615

Step (2*): Forward Elimination (Second Elimination).

[ ]
3 −0.1 −0.2 1
0 7.003333 −0.293333 1
0 −0.19 10 R 3−(−0.19/7.003333) R2

[ ]
⇒ 7.85 1
−19.5617 1
70.615 r 3−(−0.19/7.003333)r 2


A [ i , : ]−( A [ i , j ] / a [ j , j ] ) A [ j, : ] ⇒ B [ i ] −( A [ i , j ] / a [ j, j ]) B [ j ]
A [ i , : ]−( A [ i , j ] / a [ j , j ] ) A [ j, : ] B [i]−( A [i , j]/a [ j , j])B [ j]

1
[ ][ ] [ ]
3 −0.1 −0.2 x1 7.85
0 7.003333 −0.293333 x2 = −19.5617
0 0 10.012 x3 70.0843

Step (3): Backward Elimination


 Normalizing the Third row:

[ ][ ]
3 −0.1 −0.2 ⇒ 7.85
0 7.003333 −0.293333 −19.5617
0 0 10.012 70.0843

[ ][ ] [ ]
3 −0.1 −0.2 x1 7.85
0 7.003333 −0.293333 x2 = −19.5617
0 0 1 x3 7

 First Elimination:

[ ] [ ]
3 −0.1 −0.2 R 1−(−0.2) R3 ⇒ 7.85 r 1−(−0.2)r 3
0 7.003333 −0.293333 R 2−(−0.293333) R3 −19.5617 r 2−(−0.293333)r 3
0 0 1 1 7 1

[ ][ ] [ ]
3 −0.1 0 x1 9.25
=
0 7.003333 0 x 2 −17.508369
0 0 1 x3 7

 Normalizing the Second row:

[ ][ ]
3 −0.1 0 ⇒ 9.25
0 7.003333 0 −17.508369
0 0 1 7

[ ][ ] [ ]
3 −0.1 0 x1 9.25
0 1 0 x2 = −2.5
0 0 1 x3 7

 Second Elimination:

[ ] [ ]
3 −0.1 0 R 1−(−0.1) R2 ⇒ 9.25 r 1−(−0.1)r 2
0 1 0 1 −2.5 1
0 0 1 1 7 1

2
[ ][ ] [ ]
3 0 0 x1 9
0 1 0 x 2 = −2.5
0 0 1 x3 7

 Normalizing the Frist row:

[ ][ ] [ ]
1 0 0 x1 3
0 1 0 x 2 = −2.5
0 0 1 x3 7

Code Solution:

3
4

You might also like