![]() |
VOOZH | about |
The Jacobian Method, also known as the Jacobi Iterative Method, is a fundamental algorithm used to solve systems of linear equations. It is useful when dealing with large systems where direct methods (like Gaussian elimination) are computationally expensive.
Here's a simple way to understand it:
The method is used to solve a system of linear equations of the form:
Ax = b
Where A is a square matrix, x is the vector of unknowns, and b is the right-hand side vector.
The Jacobi Method decomposes the matrix A into its diagonal component D and the remainder R, such that:
A = D + R
The system of equations can then be rewritten as:
Dx = b − Rx
The iterative formula for the Jacobi Method is:
xk+1 = D−1(b − Rxk)
Where xk is the approximation of the solution at the kth iteration.
The Jacobi iterative method is a specific implementation of the Jacobian method. It assumes that the system of linear equations can be written in the form Ax = b, where A is the coefficient matrix, x is the vector of unknown variables, and b is the vector of constants. The Jacobi method proceeds as follows:
We can use the following steps:
Let's consider an example for better understanding:
Example : Consider the system of linear equations:
Checking if the equations are diagonally dominant:
∣2∣ ≥ ∣1∣ + ∣1∣ = 2- true
∣3∣ ≥ ∣1∣ + ∣-1∣ = 2- true
∣2∣ ≥ ∣-1∣ + ∣1∣ = 2- trueRewriting the system in the Jacobi form, we get:
x = (6 - y - z) / 2
y = (0 - x + z) / 3
z = (3 + x - y) / 2Starting with the initial guess , the first approximation is:
Iteration 1: with p(0) = (0, 0, 0)
x(1) = (6 - 0 - 0) / 2 = 3
y(1) = (0 - 0 + 0) / 3 = 0
z(1) = (3 + 0 - 0) / 2 = 1.5Continuing the iterations, we obtain the following approximations:
Iteration 2: with p(1) = (3, 0, 1.5)
x(2) = (6 − 0 − 1.5) / 2 = 2.25
y(2) = (−3 + 1.5) / 3 = −0.5
z(2) = (3 + 3 − 0) / 2 = 3Iteration 3: with p(2) = (2.25, -0.5, 3)
x(3) = (6 + 0.5 − 3) / 2 = 1.75
y(3) = (−2.25 + 3) / 3 = 0.25
z(3) = (3 + 2.25 + 0.5) / 2 = 2.875Iteration 4: with p(3) = (1.75, 0.25, 2.875)
x(4) = (6 - 0.25 - 2.875) / 2 = 1.4375
y(4) = (0 - 1.75 + 2.875) / 3 = 0.375
z(4) = (3 + 1.75 - 0.25) / 2 = 2.25The values are converging slowly.
Therfore after 4 iterations we got: x ≈ 1.75, y ≈ 0.25, z ≈ 2.875.
After more iterations, you'll get a solution with more precision.
Let the system of linear equations be Ax = b, where A is the coefficient matrix, x is the vector of unknown variables, and b is the vector of constants.
We can decompose the matrix A into three parts:
A = D + L + U
Where D is the diagonal matrix, L is the lower triangular matrix, and U is the upper triangular matrix.
The Jacobi iteration can then be written as:
x(k+1) = D(-1) (b - (L + U)x(k))
Where x(k) and x(k+1) are the kth and (k+1)th approximations of the solution, respectively.
The element-based formula for the Jacobi method can be written as:
xi(k+1) =
This formula shows how the (k+1)th approximation of the ith variable is computed using the kth approximations of the other variables.
The difference between Jacobian and Gauss-Seidel method is given below:
Jacobi Method | Gauss-Seidel Method |
|---|---|
Variables are updated simultaneously after each iteration using the values from the previous iteration. | Variables are updated immediately after each variable is computed, allowing for quicker convergence. |
Typically slower convergence compared to Gauss- Seidel method. | Generally faster convergence compared to Jacobian's method. |
Requires more iterations to converge to the solution. | Requires fewer iterations to reach a certain degree of accuracy. |
Easier to implement due to the simultaneous update of variables. | Slightly more complex to implement due to the immediate variable updates. |
Computationally more challenging for parallel computations due to simultaneous updates. | Allows for easier parallel computations as variables are updated immediately. |
Question 1: Consider the system of linear equations:
4x + y − z = 3
2x + 5y + z = 9
x + y + 3z = 7
Checking if the equations are diagonally dominant:
∣4∣ ≥ ∣1∣ + ∣-1∣ = 2- true
∣5∣ ≥ ∣2∣ + ∣1∣ = 3- true
∣3| ≥ ∣1∣ + ∣1∣ = 2- trueWe can rewrite this system in the Jacobi form as:
x = (3 - y + z)/4
y = (9 - 2x - z)/5
z = (7 - x - y)/3Starting with the initial guess p(0)=(0,0,0)
Iteration 1:
Substitute the initial guess into the Jacobi equations:
x(1) = (3 − 0 + 0)/ 4 = 0.75
y(1) = (9 − 0 − 0)/5 = 1.8
z(1) = (7 − 0 − 0)/3 = 2.3333First approximation: p(1)=(0.75, 1.8, 2.33)
Iteration 2:
Substitute the first approximation into the Jacobi equations:
x(2) = (3 − 1.8 + 2.33)/ 4 = 0.8833
y(2) = (9 − 2(0.75) − 2.33)/5 = 1.033
z(2) = (7 − 0.75 − 1.8)/3 = 1.4833Second approximation: x(2)=(0.8833, 1.033, 1.4833)
Iteration 3:
Substitute the second approximation into the Jacobi equations:
x(3) = (3 − 1.033 + 1.4833)/ 4 = 0.8625
y(3) = (9 − 2(0.8833) − 1.4833)/5 = 1.1500
z(3) = (7 − 0.8833 − 1.033)/3 = 1.6944The values are converging slowly.
Therfore after 3 terations we got: x ≈ 0.8625, y ≈ 1.1500, z ≈ 1.6944.
After more iterations, you'll get a solution with more precision.
Question 2: Consider the following system of linear equations:
3x + 2y - z = 7
2x - y + 4z = 13
x + 3y + 2z = 12
Checking if the equations are diagonally dominant:
∣3∣ ≥ ∣2∣ + ∣-1∣ = 3- true
∣-1∣ ≥ ∣2∣ + ∣4∣ = 6- false
∣2| ≥ ∣1∣ + ∣3∣ = 4 - falseSwapping the equations we get,
3x+2y−z=7(1)
x+3y+2z=12(2)
2x−y+4z=13(3)∣3∣ ≥ ∣2∣ + ∣-1∣ = 3- true
∣3 ≥ ∣1∣ + ∣2∣ = 3- true
∣4| ≥ ∣2∣ + ∣-1∣ = 3 - trueWe can rewrite this system in the Jacobi form as:
x = (7−2y+z) / 3
y = (12−x−2z) / 3
z = (13−2x+y) / 4Let's start with the initial guess p(0)=(0,0,0)
Iteration 1: Substituting the initial guess into the Jacobi equations, we get:
x(1) = (7 - 2(0) + 0)/3 = 7/3 = 2.333
y(1)= (12 - 0 + 2(0))/3 = 4
z(1)= (13 - 2(0) + 0)/4 = 13/4 = 3.25Therefore, the first approximation is p(1)=(2.333, 4, 3.25)
Iteration 2: Substituting the first approximation into the Jacobi equations, we get:
x(2) = (7 - 2(4) + 3.25)/3 = 0.75
y(2)= (12 - 2.333 + 2(3.25))/3 = 1.0556
z(2)= (13 - 2(2.333) + 4)/4 = 3.0833Therefore, the second approximation is p(2)=(0.75, 1.0556, 3.0833)
Iteration 3: Substituting the second approximation into the Jacobi equations, we get:
x(3) = (7 - 2(1.0556) + 3.0833)/3 = 2.6574
y(3)= (12 - 0.75 + 2(3.0833))/3 = 1.6945
z(3)= (13 - 2(0.75) + 1.0556)/4 = 3.1389Iteration 4: Substituting the third approximation into the Jacobi equations, we get:
x(4) = (7 - 2(1.6945) + 3.1389)/3 = 2.25
y(4)= (12 - 2.6574 + 2(3.1389))/3 = 1.0216
z(4)= (13 - 2(2.6574) + 1.6945)/4 = 2.3449The values are converging slowly.
Therfore after 4 iterations we got: x ≈ 2.25, y ≈ 1.0216, z ≈ 2.3449.
After more iterations, you'll get a solution with more precision.