From a Linear System to an Iteration
Gaussian elimination aims to solve a linear system in a finite sequence of steps. An iterative method takes a different approach: it starts with an initial guess and repeatedly applies a rule that is intended to produce better approximations. The Jacobi iteration is one such rule. Its derivation comes directly from separating the diagonal terms of the equations from all the other terms.
Consider a square system \(\mathbf{A}\mathbf{x}=\mathbf{b}\), where \(\mathbf{A}\in\mathbb{R}^{n\times n}\), \(\mathbf{x},\mathbf{b}\in\mathbb{R}^n\), and each diagonal entry \(a_{ii}\) is nonzero. The condition on the diagonal entries is essential: the update will require division by each \(a_{ii}\). Define \(\mathbf{D}\) to be the diagonal matrix with the same diagonal entries as \(\mathbf{A}\), and let \(\mathbf{R}\) contain the off-diagonal entries of \(\mathbf{A}\).
To derive the rule, write \(\mathbf{A}\mathbf{x}=\mathbf{b}\) as \((\mathbf{D}+\mathbf{R})\mathbf{x}=\mathbf{b}\). Rearranging gives \(\mathbf{D}\mathbf{x}=\mathbf{b}-\mathbf{R}\mathbf{x}\). Since the diagonal entries of \(\mathbf{D}\) are all nonzero, \(\mathbf{D}\) is invertible, with diagonal entries \(1/a_{ii}\) in its inverse. Applying \(\mathbf{D}^{-1}\) gives the fixed-point equation \(\mathbf{x}=\mathbf{D}^{-1}(\mathbf{b}-\mathbf{R}\mathbf{x})\). The iteration uses the right-hand side to construct a new vector from the current one.
In coordinates, the \(i\)th equation of the original system is \(a_{ii}x_i+\sum_{j\ne i}a_{ij}x_j=b_i\). Solving this equation for \(x_i\), then using the old coordinates to calculate the new ones, gives
Every new coordinate uses coordinates from the same previous iterate \(\mathbf{x}^{(k)}\). The updates are therefore computed as a group: a value calculated for one coordinate is not inserted into the formula for another coordinate until the next iteration.
Why the Fixed Points Are Solutions
Proof. A vector is a fixed point precisely when \(\mathbf{x}=\mathbf{D}^{-1}(\mathbf{b}-\mathbf{R}\mathbf{x})\). Multiplying both sides by the invertible matrix \(\mathbf{D}\) gives \(\mathbf{D}\mathbf{x}=\mathbf{b}-\mathbf{R}\mathbf{x}\), or \((\mathbf{D}+\mathbf{R})\mathbf{x}=\mathbf{b}\). By the definition of the splitting, \(\mathbf{D}+\mathbf{R}=\mathbf{A}\), so this is \(\mathbf{A}\mathbf{x}=\mathbf{b}\). Conversely, if \(\mathbf{A}\mathbf{x}=\mathbf{b}\), then \((\mathbf{D}+\mathbf{R})\mathbf{x}=\mathbf{b}\), hence \(\mathbf{D}\mathbf{x}=\mathbf{b}-\mathbf{R}\mathbf{x}\). Multiplication by \(\mathbf{D}^{-1}\) gives the fixed-point equation. Thus each condition implies the other. \(\square\)
This result identifies what the iteration is trying to reach, but it does not say that the sequence reaches a fixed point. The existence of a well-defined update only requires nonzero diagonal entries; whether repeated updates converge is a separate question.
Computing Successive Iterates
Worked Example: Two Jacobi Updates for a Two-Variable System
Apply two Jacobi updates to \(4x_1+x_2=9\), \(x_1+3x_2=7\), starting from \(\mathbf{x}^{(0)}=\begin{bmatrix}0\\0\end{bmatrix}\).
The coefficient matrix splits into its diagonal part and off-diagonal part as follows:
The coordinate updates are \(x_1^{(k+1)}=(9-x_2^{(k)})/4\) and \(x_2^{(k+1)}=(7-x_1^{(k)})/3\). Using the initial guess gives
For the second update, both formulas use the coordinates of \(\mathbf{x}^{(1)}\):
Check: Substitution of \(\mathbf{x}^{(2)}\) into the update formulas gives \((9-19/12)/4=89/48\) and \((7-5/3)/3=16/9\), so it produces the next iterate \(\mathbf{x}^{(3)}=\begin{bmatrix}89/48\\16/9\end{bmatrix}\). Also, direct multiplication gives \(\mathbf{A}\mathbf{x}^{(2)}=\begin{bmatrix}20/3+19/12\\5/3+19/4\end{bmatrix}=\begin{bmatrix}33/4\\77/12\end{bmatrix}\), which differs from \(\mathbf{b}=\begin{bmatrix}9\\7\end{bmatrix}\). The second iterate is an approximation, not an exact solution.
The matrix form can also be written as \(\mathbf{x}^{(k+1)}=\mathbf{D}^{-1}\mathbf{b}-\mathbf{D}^{-1}\mathbf{R}\mathbf{x}^{(k)}\). This form makes the repeated operation explicit: multiply the current vector by a fixed matrix, then add a fixed vector. It also confirms that the update is defined whenever \(\mathbf{D}\) is invertible.
Worked Example: Three Updates for a Three-Variable System
Use Jacobi iteration on \(4x_1+x_2+x_3=6\), \(x_1+5x_2+x_3=7\), and \(x_1+x_2+3x_3=5\), starting from \(\mathbf{x}^{(0)}=\begin{bmatrix}0\\0\\0\end{bmatrix}\). The matrix has diagonal entries \(4,5,3\), so the update is defined.
Solving each equation for its diagonal variable gives \(x_1^{(k+1)}=(6-x_2^{(k)}-x_3^{(k)})/4\), \(x_2^{(k+1)}=(7-x_1^{(k)}-x_3^{(k)})/5\), and \(x_3^{(k+1)}=(5-x_1^{(k)}-x_2^{(k)})/3\). From the zero initial guess,
Using only these three old coordinates, the next iterate is
For a third update, use \(\mathbf{x}^{(2)}\) in every coordinate formula:
Check: Substituting \(\mathbf{x}^{(3)}\) into the original left-hand sides gives \(4(17/15)+167/150+7/6=6+61/75\), \(17/15+5(167/150)+7/6=7+13/15\), and \(17/15+167/150+3(7/6)=5+56/75\). Thus \(\mathbf{A}\mathbf{x}^{(3)}-\mathbf{b}=\begin{bmatrix}61/75\\13/15\\56/75\end{bmatrix}\). As a separate check that the system has a solution, \(\begin{bmatrix}1\\1\\1\end{bmatrix}\) gives left-hand sides \(6,7,5\), respectively. The computed iterate is not that exact solution.
Reading the Update as a Matrix Formula
In the two-variable example, \(\mathbf{D}^{-1}=\begin{bmatrix}1/4&0\\0&1/3\end{bmatrix}\). The full Jacobi update can therefore be written
The diagonal part determines the division used for each new coordinate; the off-diagonal part collects the contributions from the other coordinates. This organization is useful because it turns a system of equations into a uniform rule that can be repeated. In applications with many variables, the update can be implemented by repeatedly using the known diagonal entries and the off-diagonal interactions.
There is an important limitation in the derivation. If any \(a_{ii}=0\), then \(\mathbf{D}^{-1}\) does not exist, and the displayed Jacobi rule cannot be applied in this form. A zero diagonal entry is not repaired by simply dividing by it; the system or method must first be reconsidered. Even when all diagonal entries are nonzero, the derivation alone gives no guarantee that successive iterates approach a solution.
Common Mistake: Updating Coordinates in Sequence
For the first example with \(\mathbf{x}^{(0)}=\begin{bmatrix}0\\0\end{bmatrix}\), the correct first iterate is \(\mathbf{x}^{(1)}=\begin{bmatrix}9/4\\7/3\end{bmatrix}\). A tempting but incorrect calculation is to find \(x_1^{(1)}=9/4\), then use that newly calculated value to set \(x_2^{(1)}=(7-9/4)/3=19/12\). That produces \(\begin{bmatrix}9/4\\19/12\end{bmatrix}\), not the Jacobi iterate, because the second coordinate formula must use \(x_1^{(0)}=0\). The correction is to compute every coordinate from the same old vector first; only then do the new coordinates form \(\mathbf{x}^{(1)}\).
Another useful check is to distinguish an iterate from a solution. An iterate is obtained by applying the update, while a solution satisfies \(\mathbf{A}\mathbf{x}=\mathbf{b}\). They coincide at a fixed point, as proved above, but an intermediate iterate need not satisfy the system exactly. Substitution into the original equations, or multiplication to find \(\mathbf{A}\mathbf{x}^{(k)}-\mathbf{b}\), checks how far the computed vector is from being an exact solution.
Worked Example: One Update from a Nonzero Initial Guess
Apply one Jacobi update to \(2x_1-x_2=1\), \(3x_1+4x_2=10\), starting from \(\mathbf{x}^{(0)}=\begin{bmatrix}1\\-1\end{bmatrix}\).
Here \(\mathbf{D}=\begin{bmatrix}2&0\\0&4\end{bmatrix}\) and \(\mathbf{R}=\begin{bmatrix}0&-1\\3&0\end{bmatrix}\). The coordinate rules are \(x_1^{(k+1)}=(1+x_2^{(k)})/2\) and \(x_2^{(k+1)}=(10-3x_1^{(k)})/4\). Thus
Check: The update matrix expression gives \(\mathbf{R}\mathbf{x}^{(0)}=\begin{bmatrix}1\\3\end{bmatrix}\), so \(\mathbf{D}^{-1}(\mathbf{b}-\mathbf{R}\mathbf{x}^{(0)})=\begin{bmatrix}1/2&0\\0&1/4\end{bmatrix}\begin{bmatrix}0\\7\end{bmatrix}=\begin{bmatrix}0\\7/4\end{bmatrix}\). Multiplying the new iterate by \(\mathbf{A}\) gives \(\begin{bmatrix}-7/4\\7\end{bmatrix}\), which differs from \(\mathbf{b}=\begin{bmatrix}1\\10\end{bmatrix}\), as expected for an intermediate iterate.
Check Your Understanding
Use the splitting and update rule to answer each question. Keep all coordinates in one update based on the same previous iterate.
- For \(\mathbf{A}=\begin{bmatrix}5&-2\\1&3\end{bmatrix}\), write \(\mathbf{D}\), \(\mathbf{R}\), and the two coordinate update formulas for \(\mathbf{A}\mathbf{x}=\begin{bmatrix}4\\8\end{bmatrix}\).
- Starting from \(\mathbf{x}^{(0)}=\begin{bmatrix}0\\0\end{bmatrix}\), compute one Jacobi update for the system in question 1.
- State the condition on the diagonal entries of \(\mathbf{A}\) that makes the Jacobi update as defined here available. Explain why it is needed.
- Prove that a fixed point of the Jacobi update solves \(\mathbf{A}\mathbf{x}=\mathbf{b}\).
- For the system \(2x_1-x_2=1\), \(3x_1+4x_2=10\), explain why using a newly computed \(x_1\) immediately in the same update for \(x_2\) does not follow the Jacobi rule.