Skip to main content

Numerical Methods · Linear systems, least squares, and eigenproblems

Two conjugate-gradient steps close an SPD two-by-two residual

Problem

Let \[ A=\begin{pmatrix}4&1\\1&3\end{pmatrix},\qquad b=\begin{pmatrix}1\\2\end{pmatrix}, \] and consider the linear system $Ax=b$ in exact arithmetic. The conjugate-gradient iteration from $x_0=0$ is \begin{align*} r_0&=b-Ax_0,\qquad p_0=r_0,\\ \alpha_k&=\frac{r_k^\top r_k}{p_k^\top Ap_k},\qquad x_{k+1}=x_k+\alpha_k p_k,\qquad r_{k+1}=r_k-\alpha_k Ap_k,\\ \beta_{k+1}&=\frac{r_{k+1}^\top r_{k+1}}{r_k^\top r_k},\qquad p_{k+1}=r_{k+1}+\beta_{k+1}p_k, \end{align*} stopping when $r_{k}=0$. 1. Prove that $A$ is symmetric positive definite by leading minors (or by eigenvalues). Compute those eigenvalues as $(7\pm\sqrt{5})/2$. 2. Starting from $x_0=0$, compute $r_0$, $p_0$, $\alpha_0$, $x_1$, $r_1$, $\beta_1$, $p_1$, $\alpha_1$, $x_2$, and $r_2$ as exact rationals. Verify $Ax_2=b$. 3. Verify the two identities $r_1^\top r_0=0$ and $p_0^\top Ap_1=0$. Then use the stated exact-arithmetic CG orthogonality theorem to explain why a general SPD $n\times n$ problem terminates with $r_n=0$ after at most $n$ steps. 4. Audit both sentences: (i) "CG is just steepest descent, so the next search direction is $p_1=r_1$ and $\beta_1$ may be ignored"; (ii) "the residuals are $A$-orthogonal, while the search directions are Euclidean-orthogonal." Compute the rejected steepest-descent vector $r_1$ and show that it is not $A$-orthogonal to $p_0$. Do not factor $A$ by Gaussian elimination, and do not replace the iteration by a nonlinear Newton update.

Hint

The leading minors of $A$ are $4$ and $\det A=11$. The residual $r_0$ is $b$ itself because $x_0=0$.

Check your work

Work the problem yourself first. Then open it in Training to check your answer and read the full worked solution.

The answer check and full solution for this problem come with ProofAnvil Practice membership ($19 USD monthly). See membership. Or start with the free Numerical Methods sample problem: Try the free sample problem.

More Numerical Methods practice problems

Back to Numerical Methods

An original ProofAnvil practice problem, written for this course. ProofAnvil is a practice course, not a homework-answer service.