Chap 2 - Part 3 Row Pivot and Jacobi Method
Chap 2 - Part 3 Row Pivot and Jacobi Method
LINEAR SYSTEMS
Presented by: Engr. Ariel B. Morales
2.6
Row Pivoting
Row Pivoting
Eq.1:
Eq.2:
Eq.3:
Row Pivoting
Construct the augmented matrix of the system
[ | ]
0 −0.4472 0.3077 0
−0.6402 0 0.2308 0
−0.7682 −0.8944 −0.9231 −400
Interchange rows 1 and 2 because the A11 of the coefficient matrix is equal to
zero (Note that the solver may interchange Rows 3 and 1 because the first
element of rows 3
[ | ]
−0.6402 0 0.2308 0
0 − 0.4472 0.3077 0
−0.7682 −0.8944 −0.9231 − 400
Row Pivoting
Elimination Phase:
[ | ]
0
−0.6402 0 0.2308 0 𝑅 2− 𝑅1
− 0.6402
0 − 0.4472 0.3077 0
− 0.7682
−0.7682 −0.8944 −0.9231 − 400 𝑅 3 − 𝑅2
− 0.6402
[ | ]
−0.6402 0 0.2308 0
− 0.8944
0 − 0.4472 0.3077 0 𝑅 3 − 𝑅2
− 0.4472
0 −0.8944 −1.2000 − 400
[ | ]
− 0.6402 0 0.2308 0
0 − 0.4472 0.3077 0
0 0 − 1.8154 − 400
Row Pivoting
Back Substitution
Eq.3: Phase:
Eq.2:
Eq.1:
Row Pivoting
Jacobi Method
Jacobi Method
Eq.1:
Eq.2:
Eq.3:
Jacobi Method
Eq.1:
Eq.2:
Eq.3:
Jacobi Method
0 0 0 0
6
Jacobi Method
0 0 0 0
6
Jacobi Method
Repeat this process until the 6th iteration is reached. The
tabular presentation of this process is shown below.
Iteration x1 x2 x3
0 0 0 0
STEP 1: Write the system in terms of each variable (diagonal dominance required for Jaco
From the equations, we can express each variable in terms of the others:
1
1− 𝑦 + 𝑧 −2 −2 𝑥+ 𝑧 2 𝑥 − 𝑧 −2 3+ 𝑧 − 𝑦
𝑥= 𝑦= = 𝑧=
2
3 3 4 3
Jacobi Method
STEP 2: Initial guesses for the variable
Start with an initial guess, for example:
𝑥 0 = 0 , y 0= 0 , z 0= 0
STEP 3: Iterative process:
Using the equations derived, we calculate the next set of values of each variable:
• For
1 − 𝑦 0+ 𝑧 0 1 − 0 +0 1
𝑥 1= = =
• For
3 3 3
2 𝑥 0 − 𝑧 0 −2 2 (0 )− 0 −2 −2
𝑦 1= = = =− 0.5
4 4 4
• For
1 1
3+𝑥0− 𝑦0 3+ 0 − (0 )
2 2 3
𝑧 1= = = =1
3 3 3
Jacobi Method
STEP 4: Continue iterating
Using the values repeat the process for the next iteration:
• For
1 − 𝑦 1+ 𝑧 1 1 − (− 0.5)+ 1 2.5
𝑥 2= = = ≈ 0.8333
• For 3 3 3
𝑦 2=
2 𝑥 1 − 𝑧 1 −2
=
2 ( )
1
3
−1 −2
=
2
3
−3 −
=
7
3
≈ − 0.5833
4 4 4 4
• For
1 1 1
3+ 𝑥 1 − 𝑦1 3+ − ( − 0 .5)
2 3 2 3.5
𝑧 2= = = ≈ 1.1667
3 3 3
Jacobi Method
You can continue the iteration until the values of converge to a desired level of accuracy
,
Jacobi Method
Sample
Problem
Solve the following system of linear equations using Jacobi Method:
3+ 𝑦 − 𝑧 9−𝑥−2𝑧 7 −2 𝑥+ 𝑦
𝑥= 𝑦= 𝑧=
4 3 3
Jacobi Method
STEP 2: Initial guesses for the variable
Start with an initial guess, for example:
𝑥 0 = 0 , y 0= 0 , z 0= 0
STEP 3: Iterative process:
Using the equations derived, we calculate the next set of values of each variable:
• For
3+𝑦 0− 𝑧 0 3+ 0 −0 3
𝑥 1= = = =0.75
• For
4 4 4
9− 𝑥 0 −2 𝑧 0 9 − 0 − 2 (0 ) 9
𝑦 1= = = =3
3 3 3
• For
7−2𝑥 0−𝑦 0 7 − 2 ( 0 ) +(0) 7
𝑧 1= = = ≈ 2.3333
3 3 3
Jacobi Method
STEP 4: Continue iterating
Using the values repeat the process for the next iteration:
• For
3+ 𝑦 1 − 𝑧 1 3+ 3 −2.3333 3.6667
𝑥 2= = = ≈ 0.9167
•
4 4 4
For
9 − 𝑥 1 −2 𝑧 1 9 −0.75 − 2(2.333) 9 −0.75 − 4.6667 3.5833
𝑦 2= = = = ≈ 1.1944
3 3 3 3
• For
7 − 2 𝑥 1+ 𝑦 1 7 −2 ( 0.75 )+ 3 7 −1.5 +3 8.5
𝑧 2= = = = ≈ 2.8333
3 3 3 3
Jacobi Method
,
With this two examples,Plate
determine the solution of linear
system utilizing the Jacobi method applied to 4x4 systems
of linear equations, perform 4 iterations for each. (short cut
is not allowed)
THANK
YOU!