Skip to main content

Conjugate gradient three iterations (10,-6,0)

Short answer

Starting from zero, the conjugate gradient computations give x1=1.2, x2=0, x3=0 after one iteration; after two, (2.1818, 1.6364, 0); after three, x1=2.4, x2=2.0, x3=0.8, with zero residual.

Carry out three iterations of the conjugate gradient method for the following system of linear equations:

[10−60−68−20−25]{x1x2x3}={1200}\begin{bmatrix} 10 & -6 & 0 \\ -6 & 8 & -2 \\ 0 & -2 & 5 \end{bmatrix}\begin{Bmatrix} x_1 \\ x_2 \\ x_3 \end{Bmatrix} = \begin{Bmatrix} 12 \\ 0 \\ 0 \end{Bmatrix}

A=[10−60−68−20−25]A=\begin{bmatrix}10&-6&0\\-6&8&-2\\0&-2&5\end{bmatrix} (symmetric, positive definite), b={12,0,0}Tb=\{12,0,0\}^T. Take x0={0,0,0}Tx_0=\{0,0,0\}^T, so r0=b={12,0,0}Tr_0=b=\{12,0,0\}^T, d0=r0d_0=r_0.

Iteration 1

Ad0={120,−72,0}Tα0=1441440=0.1x1={1.2, 0, 0}Tr1={0, 7.2, 0}Tβ0=51.84144=0.36,d1={4.32, 7.2, 0}T\begin{aligned} Ad_0&=\{120,-72,0\}^T\\ \alpha_0&=\frac{144}{1440}=0.1\\ x_1&=\{1.2,\,0,\,0\}^T\\ r_1&=\{0,\,7.2,\,0\}^T\\ \beta_0&=\frac{51.84}{144}=0.36,\quad d_1=\{4.32,\,7.2,\,0\}^T \end{aligned}

Iteration 2

Ad1={0, 31.68, −14.4}Tα1=51.84228.10=0.22727x2={2.1818, 1.6364, 0}Tr2={0, 0, 3.2727}Tβ1=10.710751.84=0.20661,d2={0.8926, 1.4876, 3.2727}T\begin{aligned} Ad_1&=\{0,\,31.68,\,-14.4\}^T\\ \alpha_1&=\frac{51.84}{228.10}=0.22727\\ x_2&=\{2.1818,\,1.6364,\,0\}^T\\ r_2&=\{0,\,0,\,3.2727\}^T\\ \beta_1&=\frac{10.7107}{51.84}=0.20661,\quad d_2=\{0.8926,\,1.4876,\,3.2727\}^T \end{aligned}

Iteration 3

Ad2={0, 0, 13.388}Tα2=10.710743.815=0.24444x3={2.4, 2.0, 0.8}Tr3={0, 0, 0}T\begin{aligned} Ad_2&=\{0,\,0,\,13.388\}^T\\ \alpha_2&=\frac{10.7107}{43.815}=0.24444\\ x_3&=\{2.4,\,2.0,\,0.8\}^T\\ r_3&=\{0,\,0,\,0\}^T \end{aligned}
Iterationx1x_1x2x_2x3x_3∥r∥\|r\|
000012
11.2000007.2
22.18181.636403.273
32.40002.00000.80000

Answer: x1=2.4, x2=2.0, x3=0.8x_1=2.4,\ x_2=2.0,\ x_3=0.8. Check: 10(2.4)−6(2)=1210(2.4)-6(2)=12, −6(2.4)+8(2)−2(0.8)=0-6(2.4)+8(2)-2(0.8)=0, −2(2)+5(0.8)=0-2(2)+5(0.8)=0.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Computational Techniques in Civil Engineering chapter 2 questions →