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

NSCEP Lecture Mid Term 1.6 Solving System of Linear Equations Gauss Jordan Elimination Method

The document outlines a course on Numerical Solution to Civil Engineering Problems, focusing on methods to solve systems of linear equations, specifically the Gauss Jordan Elimination and Jacobi's Method. It provides examples and detailed steps for solving equations, ensuring convergence through diagonal dominance. The document serves as a practical guide for students in the CE program to apply these numerical methods effectively.

Uploaded by

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

NSCEP Lecture Mid Term 1.6 Solving System of Linear Equations Gauss Jordan Elimination Method

The document outlines a course on Numerical Solution to Civil Engineering Problems, focusing on methods to solve systems of linear equations, specifically the Gauss Jordan Elimination and Jacobi's Method. It provides examples and detailed steps for solving equations, ensuring convergence through diagonal dominance. The document serves as a practical guide for students in the CE program to apply these numerical methods effectively.

Uploaded by

julieannronda9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

COLLEGE OF CIVIL ENGINEERING

JESUS IS LORD COLLEGES FOUNDATION, INC.

COURSE TITLE : NUMERICAL SOLUTION TO CE PROBLEMS (LAB)


COURSE CODE : MT 315
INSTRUCTOR : Sir ARMAN O. ABEJAR
CLASS : CE – 3A/3B
WEEK : 8
TERM : PRELIM / MIDTERM
“𝐹𝑜𝑐𝑢𝑠 𝑜𝑛 𝑦𝑜𝑢𝑟 𝑔𝑜𝑎𝑙. 𝐷𝑜𝑛’𝑡 𝑙𝑜𝑜𝑘 𝑖𝑛 𝑎𝑛𝑦 𝑑𝑖𝑟𝑒𝑐𝑡𝑖𝑜𝑛 𝑏𝑢𝑡 𝑎ℎ𝑒𝑎𝑑. ”

SOLVING SYSTEM OF LINEAR EQUATIONS

DIRECT Methods

3. Gauss Jordan Elimination Method

In Gauss Jordan Elimination, we continue the reduction of the augmented matrix until we get a row equivalent matrix
in 𝒓𝒆𝒅𝒖𝒄𝒆𝒅 𝒓𝒐𝒘 – 𝒆𝒄𝒉𝒆𝒍𝒐𝒏 𝒇𝒐𝒓𝒎. (r – e form where every column with a leading 1 has rest zeros. It is consists of
𝑛 𝑠𝑡𝑎𝑔𝑒𝑠 (only with one main step) which is the forward elimination.

𝟏 𝟎 𝟎 𝒂′
Form: [𝟎 𝟏 𝟎 𝒃′]  𝒙 = 𝒂′ , 𝒚 = 𝒃′ , 𝒛 = 𝒄′
𝟎 𝟎 𝟏 𝒄′

Problem 08. 𝟐𝒙 − 𝟒𝒚 + 𝟓𝒛 = 𝟑𝟔 
−𝟑𝒙 + 𝟓𝒚 + 𝟕𝒛 = 𝟕  Find the solution using Gauss Jordan Elimination method.
𝟓𝒙 + 𝟑𝒚 − 𝟖𝒛 = −𝟑𝟏 

Solution: The augmented matrix

2 −4 5 36
[−3 5 7 7 ]
5 3 −8 −31
Recall Gaussian Elimination; the resulting matrix will be,

1 −2 2.5 18 𝑥 − 2𝑦 + 2.5𝑧 = 18 ′
[0 1 −14.5 −61]  𝑦 − 14.5𝑧 = −61 ′′
0 0 1 4 𝒛=𝟒 ′′′
𝑒𝑐ℎ𝑒𝑙𝑜𝑛 𝑓𝑜𝑟𝑚

Step 4. Eliminate 𝑧 from ’’ equation.

𝑅1′
𝑅2′′′ = 𝑅2′′ + 14.5 𝑅3′′ ′ 𝑦 − 14.5𝑧 = −61
14.5𝑧 = 58
𝑦 = −3
𝑅3′′′
1 −2 2.5 18 𝑥 − 2𝑦 + 2.5𝑧 = 18 ′
[0 1 0 −3]  𝑦 = −3 ′′′
0 0 1 4 𝑧=4 ′′′
Step 5-1. Eliminate 𝑦 from equation ’.

𝑅1′′ = 2𝑅2′′′ + 𝑅1 ′ 2𝑦 = −6
𝑥 − 2𝑦 + 2.5𝑧 = 18
𝑥 + 2.5𝑧 = 12

1 0 2.5 12 𝑥 + 2.5𝑧 = 12 ′′


[0 1 0 −3]  𝑦 = −3 ′′′
0 0 1 4 𝑧=4 ′′′
Step 5-2. Eliminate 𝑧 from equation ’’.

𝑅1′′′ = −2.5 𝑅3′′′ + 𝑅1 ′′ −2.5𝑧 = −10


𝑥 + 2.5𝑧 = 12
𝑥 =2

1 0 0 2 𝒙=𝟐
[0 1 0 −3]  𝒚 = −𝟑
0 0 1 4 𝒛=𝟒
𝑟𝑒𝑑𝑢𝑐𝑒𝑑 𝑟𝑜𝑤 − 𝑒𝑐ℎ𝑒𝑙𝑜𝑛 𝑓𝑜𝑟𝑚

𝒙 𝟐
The solution for the system of linear equation is [𝒚] = [−𝟑] answer
𝒛 𝟒
−4𝑥 + 3𝑦 + 2𝑧 = −1
Problem 09. 5𝑥 + 𝑦 − 3𝑧 = 30 Find the solution using Gauss Jordan Elimination method.
3𝑥 − 4𝑦 + 𝑧 = −33

Problem 10.
2𝑥 − 4𝑦 + 5𝑧 = 36
−3𝑥 + 5𝑦 + 7𝑧 = 7 Find the solution using Gauss Jordan Elimination method.
5𝑥 + 3𝑦 − 8𝑧 = −31

Problem 11.

ITERATIVE or INDIRECT Method

1. Jacobi’s Method

DEFINITION: A set of linear system of equations must be diagonally dominant if it satisfies the 𝒓𝒐𝒘 −
𝒔𝒖𝒎 𝒄𝒓𝒊𝒕𝒆𝒓𝒊𝒐𝒏. The absolute value of the dominant coefficient for a different unknown in each
equation is LARGER THAN OR EQUAL the sum of the absolute values of the other coefficients in
that equations, convergence is assured.

|𝒂𝒊𝒊 | ≥ ∑|𝒂𝒊𝒋 | 𝒇𝒐𝒓 𝒊 = 𝟏, 𝟐, 𝟑, … , 𝒏


𝒋=𝟏

𝟓𝒙 − 𝑦 + 𝑧 = 10
Example: 2𝑥 + 𝟖𝒚 − 𝑧 = 11 Check if the system if diagonally dominant or not?
−𝑥 + 𝑦 + 𝟒𝒛 = 3
𝟓𝒙 − 𝑦 + 𝑧 = 10 𝐼𝑛 𝑟𝑜𝑤 1: |5| > |−1| + |1| = 2 𝑡𝑟𝑢𝑒
2𝑥 + 𝟖𝒚 − 𝑧 = 11  𝐼𝑛 𝑟𝑜𝑤 2: |8| > |2| + |−1| = 3 𝑡𝑟𝑢𝑒
−𝑥 + 𝑦 + 𝟒𝒛 = 3 𝐼𝑛 𝑟𝑜𝑤 3: |4| > |−1| + |1| = 2 𝑡𝑟𝑢𝑒

Therefore, the system is diagonally dominant and the iteration process will converge to the
solution.

𝟒 1 2 0 𝑟𝑜𝑤 1: 𝒔𝒂𝒕𝒊𝒔𝒇𝒊𝒆𝒔 𝑡ℎ𝑒 𝑟𝑜𝑤 − 𝑠𝑢𝑚 𝑐𝑟𝑖𝑡𝑒𝑟𝑖𝑜𝑛


1 𝟐 9 −1] ? 𝑟𝑜𝑤 2: 𝒗𝒊𝒐𝒍𝒂𝒕𝒆𝒔 𝑡ℎ𝑒 𝑟𝑜𝑤 − 𝑠𝑢𝑚 𝑐𝑟𝑖𝑡𝑒𝑟𝑖𝑜𝑛
Example: Is 𝐴 = [  [ ]
4 8 −𝟏 2 𝑟𝑜𝑤 3: 𝒗𝒊𝒐𝒍𝒂𝒕𝒆𝒔 𝑡ℎ𝑒 𝑟𝑜𝑤 − 𝑠𝑢𝑚 𝑐𝑟𝑖𝑡𝑒𝑟𝑖𝑜𝑛
5 −1 0 𝟔 𝑟𝑜𝑤 4: 𝒔𝒂𝒕𝒊𝒔𝒇𝒊𝒆𝒅 𝑡ℎ𝑒 𝑟𝑜𝑤 − 𝑠𝑢𝑚 𝑐𝑟𝑖𝑡𝑒𝑟𝑖𝑜𝑛

Are they diagonally dominant? NO! (it must be ALL) Apply row operation (𝐼𝑛𝑡𝑒𝑟𝑐ℎ𝑎𝑛𝑔𝑒)

REMARK: A non-diagonally dominant matrix can be converted into diagonally dominant matrix by
elementary operation. How???

For the given matrix above, interchange 𝑹𝟐 ↔ 𝑹𝟑 to get;

𝟒 1 2 0
𝐴=[ 4 𝟖 −1 2 ]
1 2 𝟗 −1
5 −1 0 𝟔

Therefore, the matrix is 𝒅𝒊𝒂𝒈𝒐𝒏𝒂𝒍𝒍𝒚 𝒅𝒐𝒎𝒊𝒏𝒂𝒏𝒕 because it satisfies the row − sum criterionand
the iteration process will converge to the exact solutions.

Problem 11. Given the system of linear equations. Find the solution that will converge using Jacobi’s iteration
method. Retain up to 8 decimal places every iteration.

4𝑥 − 𝑦 + 𝑧 = 7
4𝑥 − 8𝑦 + 𝑧 = −21 Use initial value of 𝑃𝑜 = (𝑥𝑜 , 𝑦𝑜 , 𝑧𝑜 ) = (1, 2, 2)
−2𝑥 + 𝑦 + 5𝑧 = 15

Check if diagonally dominant or not?

𝟒𝑥 − 𝑦 + 𝑧 = 7 𝑟𝑜𝑤 1: |4| > |−1| + |1| = 2 𝑡𝑟𝑢𝑒


4𝑥 − 𝟖𝑦 + 𝑧 = −21 𝑟𝑜𝑤 2: |−8| > |4| + |1| = 5 𝑡𝑟𝑢𝑒
−2𝑥 + 𝑦 + 𝟓𝑧 = 15 𝑟𝑜𝑤 3: |5| > |−2| + |1| = 3 𝑡𝑟𝑢𝑒

Since each row satisfies the 𝒓𝒐𝒘 − 𝒔𝒖𝒎 𝒄𝒓𝒊𝒕𝒆𝒓𝒊𝒐𝒏, then the matrix is said to be diagonally
dominant, the solutions converges.

The equation can be written in the form:  (Simplifying by isolating the variable in terms of the other variables.)

7+𝑦−𝑧 This suggest the following Jacobi’s Iterative Process


𝑥= 7 + 𝑦𝑘 − 𝑧𝑘
4
𝑥𝑘+1 =
4
21+4𝑥+𝑧
𝑦= 21 + 4𝑥𝑘 + 𝑧𝑘
8 𝑦𝑘+1 =
8
15+2𝑥−𝑦
𝑧= 15 + 2𝑥𝑘 − 𝑦𝑘
5 𝑧𝑘+1 =
5
where 𝑘 – iteration step
Create a table of Convergent Jacobi Iteration for the system of equations. 𝑃𝑜 = (𝑥𝑜 , 𝑦𝑜 , 𝑧𝑜 ) = (1, 2, 2)

7+𝑦𝑘 −𝑧𝑘 7+2.0−2.0


𝑥𝑘+1 = = = 1.75  𝑥0+1 = 𝑥1 = 1.75
4 4
21+4𝑥𝑘 +𝑧𝑘 21+4(1.0)+2.0
𝑦𝑘+1 = = = 3.375  𝑦0+1 = 𝑦1 = 3.375
8 8
15+2𝑥𝑘 −𝑦𝑘 15+2(1.0)−2.0
𝑧𝑘+1 = = = 3.0  𝑧0+1 = 𝑧1 = 3.0
5 5

Repeat the process up to 19 iterations.

𝒌 𝒙𝒌 𝒚𝒌 𝒛𝒌
(new value of k)
0(Initial value) 1.0 2.0 2.0
1 1.75 3.375 3.0
2 1.84375 3.875 3.025
3 1.9625 3.925 2.9625
4 1.990625 3.9765625 3.0
5 1.99414063 3.9953125 3.00093750
6 1.75109375 3.997187503 3.196593752
7
8
9
10
11
12
13
14
15 1.99999993 3.99999985 2.99999993
16 1.99999964 3.999999996 3.00000000
17
18
19 2.00000000 4.00000000 3.00000000

With the initial value of 𝑃𝑜 = (𝑥𝑜 , 𝑦𝑜 , 𝑧𝑜 ) = (1, 2, 2), the iteration process converge to the solution (2, 4, 3)

The new point 𝑃1 = (1.75, 3.375, 3.00) is closer to (2, 4, 3) than the initial value point. Iteration using the equations
(box) generates a sequence of points (𝑃𝑘 ) that converges to the solution (2, 4, 3) see table of iterations.

This process is called Jacobi Iteration and can be used to solve certain types of linear system. After 19 steps, the
iteration has converged to the nine-digit machine approximation (2.00000000, 4.00000000, 3.00000000).

Sometimes the Jacobi iteration method does not work. Especially if the system of linear equation is NOT diagonally
dominant. The tendency of the iteration process will diverged from the solution.

𝒙 𝟐
The solution to the system of equation is [𝒚] = [𝟒] answer
𝒛 𝟑

Problem 12. Rearranging the system of equation in problem 11.

−𝟐𝒙 + 𝑦 + 5𝑧 = 15 𝟒𝒙 − 𝑦 + 𝒛 = 7
4𝑥 − 𝟖𝒚 + 𝑧 = −21  𝑅1 ↔ 𝑅3  4𝑥 − 𝟖𝒚 + 𝑧 = −21
4𝑥 − 𝑦 + 𝒛 = 7 −𝟐𝒙 + 𝑦 + 𝟓𝒛 = 15

You might also like