NSCEP Lecture Mid Term 1.6 Solving System of Linear Equations Gauss Jordan Elimination Method
NSCEP Lecture Mid Term 1.6 Solving System of Linear Equations Gauss Jordan Elimination Method
DIRECT Methods
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.
𝟓𝒙 + 𝟑𝒚 − 𝟖𝒛 = −𝟑𝟏
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 𝒛=𝟒 ′′′
𝑒𝑐ℎ𝑒𝑙𝑜𝑛 𝑓𝑜𝑟𝑚
𝑅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 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.
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.
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???
𝟒 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
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.)
𝒌 𝒙𝒌 𝒚𝒌 𝒛𝒌
(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
𝒛 𝟑
−𝟐𝒙 + 𝑦 + 5𝑧 = 15 𝟒𝒙 − 𝑦 + 𝒛 = 7
4𝑥 − 𝟖𝒚 + 𝑧 = −21 𝑅1 ↔ 𝑅3 4𝑥 − 𝟖𝒚 + 𝑧 = −21
4𝑥 − 𝑦 + 𝒛 = 7 −𝟐𝒙 + 𝑦 + 𝟓𝒛 = 15