Skip to main content

Linear solution techniques; CG two iterations

Short answer

Direct methods (Gauss elimination, LU, Cholesky) solve in finite steps; iterative methods (Jacobi, Gauss-Seidel, CG) improve a guess. With x0=(4,4,0), computing residuals and conjugate directions yields after two iterations x=(4,8,8).

Explain different solution techniques of linear equations. For the given linear system

[12−60−612−60−66]{x1x2x3}={24240}\begin{bmatrix} 12 & -6 & 0 \\ -6 & 12 & -6 \\ 0 & -6 & 6 \end{bmatrix}\begin{Bmatrix} x_1 \\ x_2 \\ x_3 \end{Bmatrix} = \begin{Bmatrix} 24 \\ 24 \\ 0 \end{Bmatrix}

using the starting vector x(0)=(4,4,0)Tx^{(0)} = (4, 4, 0)^T, carry out two iterations of the conjugate gradient method and show the result.

Linear system [A]{x}={b}[A]\{x\}=\{b\} is solved by:

  1. Direct methods (finite number of steps, exact apart from round-off): Gauss elimination (reduce to upper triangular form, back-substitute), Gauss-Jordan, LU decomposition, Cholesky decomposition A=LLTA=LL^T for symmetric positive definite AA, and the matrix inverse. In FEM they use banded or skyline storage.
  2. Iterative methods (start from a guess and improve): Jacobi, Gauss-Seidel, successive over-relaxation, and the conjugate gradient method. They suit very large sparse systems since the matrix is never changed and no fill-in occurs. Jacobi and Gauss-Seidel need diagonal dominance for convergence; CG needs a symmetric positive definite matrix.
DirectIterative
Fixed operation countNumber of iterations depends on tolerance
Fill-in within band/skylineKeeps sparsity
Good for many load cases (factor once)Good for very large systems

Conjugate gradient, two iterations

A=[12−60−612−60−66]A=\begin{bmatrix}12&-6&0\\-6&12&-6\\0&-6&6\end{bmatrix}, b={24,24,0}Tb=\{24,24,0\}^T, x0={4,4,0}Tx_0=\{4,4,0\}^T.

Ax0={12(4)−6(4), −6(4)+12(4), −6(4)}={24,24,−24}TAx_0=\{12(4)-6(4),\,-6(4)+12(4),\,-6(4)\}=\{24,24,-24\}^T, so

r0=b−Ax0={0,0,24}T,d0=r0r_0=b-Ax_0=\{0,0,24\}^T,\quad d_0=r_0

Iteration 1

Ad0={0,−144,144}Tα0=r0Tr0d0TAd0=5763456=0.1667x1=x0+α0d0={4, 4, 4}Tr1=r0−α0Ad0={0, 24, 0}Tβ0=576576=1,d1=r1+β0d0={0, 24, 24}T\begin{aligned} Ad_0&=\{0,-144,144\}^T\\ \alpha_0&=\frac{r_0^Tr_0}{d_0^TAd_0}=\frac{576}{3456}=0.1667\\ x_1&=x_0+\alpha_0d_0=\{4,\,4,\,4\}^T\\ r_1&=r_0-\alpha_0Ad_0=\{0,\,24,\,0\}^T\\ \beta_0&=\frac{576}{576}=1,\quad d_1=r_1+\beta_0d_0=\{0,\,24,\,24\}^T \end{aligned}

Iteration 2

Ad1={−144, 144, 0}Tα1=5763456=0.1667x2=x1+α1d1={4, 8, 8}Tr2=r1−α1Ad1={24, 0, 0}T\begin{aligned} Ad_1&=\{-144,\,144,\,0\}^T\\ \alpha_1&=\frac{576}{3456}=0.1667\\ x_2&=x_1+\alpha_1d_1=\{4,\,8,\,8\}^T\\ r_2&=r_1-\alpha_1Ad_1=\{24,\,0,\,0\}^T \end{aligned}

Answer: after two iterations x(2)={4, 8, 8}Tx^{(2)}=\{4,\,8,\,8\}^T with residual {24,0,0}T\{24,0,0\}^T. A third iteration gives the exact solution x={8,12,12}Tx=\{8,12,12\}^T (the system has n=3n=3 unknowns).

✓ Answer checked by Claude Opus 5.5 (high effort)

All Computational Techniques in Civil Engineering chapter 2 questions →