Solution (source code)

= Solution

Update the unknowns in row order, immediately using newly computed components. The component equations are
$$
\begin{aligned}
x_1^{(n)}&=-1+x_2^{(n-1)}-x_3^{(n-1)},\\
x_2^{(n)}&=\tfrac12(2-x_1^{(n)}-x_3^{(n-1)})=\tfrac32-\tfrac12x_2^{(n-1)},\\
x_3^{(n)}&=\tfrac12(-2-x_1^{(n)}+x_2^{(n)})=\tfrac14-\tfrac34x_2^{(n-1)}+\tfrac12x_3^{(n-1)}.
\end{aligned}
$$
Thus \b[$G=\begin{pmatrix}0&1&-1\\0&-1/2&0\\0&-3/4&1/2\end{pmatrix}$] and \b[$c=(-1,3/2,1/4)^T$]. Using only old values in all three row equations would instead describe the <Jacobi method>, not the <Gauss-Seidel method>.