M9 · Chapter 3 · Conjugate gradient
Lectures 11–13 (17–24 Sep), MT2 material: conjugacy, the conjugate direction method, Expanding Subspace, CG and its facts, counting steps by eigenvalues, structured matrices, CG for $Ax=b$. Full theory and worked examples: M2.
Each stop = a concept card (plain words → picture → symbols) followed by questions that start trivial and end tricky. Answer before opening the explanation. Levels: L1 term L2 use L3 trap L4 exam.
1. Why steepest descent zig-zags
In plain words: to minimise a bowl-shaped function you walk downhill. If the bowl is a long narrow valley, walking straight down the steepest slope and stopping at the lowest point of that line sends you to the other wall, so you cross the valley again and again instead of walking along it. We want a smarter set of directions that never undo each other's work.
Words and symbols on this stop: $x\in\mathbb R^d$ = the unknown point ($d$ numbers). $f(x)=\frac12x^\top Qx-h^\top x+c$ = a quadratic bowl; $Q$ = a symmetric $d\times d$ matrix, positive definite ($Q\succ0$) means every eigenvalue is $>0$, i.e. a true bowl with one lowest point $x^*=Q^{-1}h$. Gradient $g=\nabla f(x)=Qx-h$ = the vector pointing uphill. Level set = all points with equal $f$ (ellipses). Exact line search = move along a direction to the exact lowest point on that line. $\kappa=\lambda_{\max}/\lambda_{\min}$ = condition number (how stretched the ellipses are). $E(x)=\frac12(x-x^*)^\top Q(x-x^*)=f(x)-f^*$ = the error.
Precisely: steepest descent with exact line search on a quadratic satisfies $g^{(k+1)\top}g^{(k)}=0$ and contracts the error by at most $\big(\frac{\kappa-1}{\kappa+1}\big)^2$ per step, which is close to 1 when $\kappa$ is large. CG replaces the gradient directions by $Q$-conjugate directions and finishes in $\le d$ steps.
In steepest descent with exact line search, the new gradient is perpendicular to the direction just travelled (so consecutive gradients are orthogonal).
Explanation
True. Exact line search picks the step $t$ that minimises $\varphi(t)=f(x+tu)$, so $\varphi^{\prime}(t)=\nabla f(x+tu)^\top u=0$ at the chosen step: the new gradient is perpendicular to $u$. In steepest descent $u=-g^{(k)}$, so $g^{(k+1)\top}g^{(k)}=0$. This is exactly why successive steps turn by 90° and the path zig-zags. (M2 §0, M1.)
If $Q=\lambda I$ (all eigenvalues equal), steepest descent with exact line search reaches $x^*$ in one step from any start.
Explanation
True. Level sets are circles, and $g=Qx-h=\lambda(x-x^*)$ points straight away from the centre, so $-g$ points straight at it. The exact step is $\alpha=\frac{g^\top g}{g^\top Qg}=\frac1\lambda$, giving $x-\frac1\lambda g=x^*$. (Example: $Q=5I$ steps by $\frac15g$.) The zig-zag only appears when eigenvalues differ. (M2 N3.)
$Q=\mathrm{diag}(1,9)$, $f=\frac12x^\top Qx$, start $x^{(0)}=(9,1)$. After one steepest-descent step with exact line search, what is $E(x^{(1)})/E(x^{(0)})$ (here $E=f-f^*=f$)?
- (a) $0.64$
- (b) $0.8$
- (c) $0.25$
- (d) $0$
Explanation
(a). $g=Qx^{(0)}=(9,9)$, $g^\top g=162$, $g^\top Qg=81\cdot1+81\cdot9=810$, so $\alpha=0.2$ and $x^{(1)}=(9,1)-0.2(9,9)=(7.2,-0.8)$. $E(x^{(0)})=\frac12(81+9)=45$, $E(x^{(1)})=\frac12(51.84+5.76)=28.8$, ratio $0.64=\big(\frac{9-1}{9+1}\big)^2$. This start is the worst case, and the ratio is the same at every later step: the method never terminates exactly. (b) $0.8$ is the factor for the length $\|x\|_Q$, not for $E$ (which is its square). (c) $0.25$ is the bound for eigenvalues in $[30,90]$, not here. (d) $0$ would need $\kappa=1$. (M1 exact-line-search rate.)
Mark all correct statements about why conjugate gradient (CG) exists.
- (a) After a line search along one steepest-descent direction, the new direction is orthogonal to the old one but not $Q$-conjugate, so later steps partly spoil earlier progress.
- (b) CG aims to minimise a $d$-dimensional positive definite quadratic in at most $d$ steps.
- (c) CG needs the inverse matrix $Q^{-1}$ to build its directions.
- (d) CG chooses its directions to be mutually orthogonal in the ordinary sense ($u^\top v=0$).
Explanation
(a), (b). (a) Consecutive steepest-descent directions are orthogonal but not $Q$-conjugate, so later steps partly spoil earlier progress and the same coordinate gets re-corrected again and again. (b) Choosing directions that never spoil earlier progress gives finite termination in $\le d$ steps. (c) False: CG uses only gradients and one product $Qu$ per step; computing $Q^{-1}$ would already solve the problem. (d) False: the directions are $Q$-conjugate, $u_i^\top Qu_j=0$, which is not $u_i^\top u_j=0$ (example in stop 2: $(1,1)$ and $(4,-1)$ for $Q=\mathrm{diag}(1,4)$). (M2 §0.)
2. Q-conjugacy
In plain words: ordinary perpendicular means "angle 90° in the usual picture". The ellipses of $f$ are a distorted picture. Two directions are $Q$-conjugate if they become perpendicular when you stretch space until the ellipses turn into circles. In the stretched picture each direction can be handled separately.
Words and symbols on this stop: $u^\top Qv$ = the "$Q$-inner product" of $u$ and $v$ (a number: $u$ transposed times $Q$ times $v$). $Q$-conjugate set $u_1,\dots,u_m$: nonzero vectors with $u_i^\top Qu_j=0$ for all $i\ne j$. Linearly independent = none is a combination of the others. Gram–Schmidt = a recipe that turns independent vectors $v_1,\dots,v_d$ into a perpendicular (here conjugate) set by subtracting the unwanted parts. $A_{ij}$ = how much of $u_j$ to subtract from $v_i$.
Precisely: $u_i^\top Qu_j=0$ ($i\ne j$). If $Q\succ0$: conjugate $\Rightarrow$ linearly independent, at most $d$ vectors, not unique. $Q$-Gram–Schmidt: $u_1=v_1$, $u_i=v_i-\sum_{j<i}A_{ij}u_j$ with $A_{ij}=\dfrac{v_i^\top Qu_j}{u_j^\top Qu_j}$.
Two vectors $u,v$ are $Q$-conjugate when $u^\top Qv=0$. For $Q=I$ this is the same as ordinary orthogonality $u^\top v=0$.
Explanation
True. That is the definition; with $Q=I$ the middle matrix disappears: $u^\top Iv=u^\top v$. So "conjugate" is orthogonality measured with a different ruler. (M2 §A.)
$Q=\mathrm{diag}(1,4)$ and $u=(1,1)$. Which $v$ is $Q$-conjugate to $u$?
- (a) $(4,-1)$
- (b) $(-1,1)$
- (c) $(1,-1)$
- (d) $(4,1)$
Explanation
(a). $u^\top Qv=1\cdot v_1+1\cdot4v_2=v_1+4v_2$. For $(4,-1)$: $4-4=0$. (b) $(-1,1)$: $-1+4=3\ne0$ (it is the orthogonal vector, $u\cdot v=0$, but not conjugate). (c) $(1,-1)$: $1-4=-3$. (d) $(4,1)$: $4+4=8$. Note the winner is not perpendicular to $u$ ($u\cdot v=3$). (M2 §A.)
$Q=\begin{pmatrix}2&1\\1&2\end{pmatrix}$, $v_1=(1,0)$, $v_2=(0,1)$. Gram–Schmidt with $Q$ gives $u_1=v_1$ and $u_2=v_2-A_{21}u_1$. What is $u_2$?
- (a) $(0,1)$ (already conjugate)
- (b) $(-\tfrac12,1)$
- (c) $(\tfrac12,1)$
- (d) $(-1,1)$
Explanation
(b). $A_{21}=\frac{v_2^\top Qu_1}{u_1^\top Qu_1}=\frac{1}{2}$ since $Qu_1=(2,1)$, so $u_2=(0,1)-\frac12(1,0)=(-\frac12,1)$. Check: $u_1^\top Qu_2=(2,1)\cdot(-\frac12,1)=0$. (a) $(1,0)$ and $(0,1)$ are orthogonal but $v_1^\top Qv_2=1\ne0$, so they are not conjugate. (c) $(\frac12,1)$: $2\cdot\frac12+1=2\ne0$ (wrong sign of the correction). (d) $(-1,1)$: $-2+1=-1\ne0$ (subtracted too much). (M2 §A, MT2 2026 Q3(b).)
For a given matrix $Q\succ0$, conjugate directions are unique.
Explanation
False. The eigenvectors of $Q$ form one conjugate set; applying $Q$-Gram–Schmidt to any basis gives another (the previous question did it for $(1,0),(0,1)$). Even simpler: multiplying a direction by 5 keeps the set conjugate. His key: False. (M2 §A, P1.)
A matrix whose columns are conjugate directions has full (column) rank.
Explanation
True (for $Q\succ0$ and nonzero columns). Suppose $\sum_jc_ju_j=0$. Multiply by $u_i^\top Q$: all cross terms vanish and $c_i\,u_i^\top Qu_i=0$. Since $u_i^\top Qu_i>0$, $c_i=0$ for every $i$: the columns are linearly independent, so there are at most $d$ of them. His key: True. (M2 §A fact 1.)
$a_1,\dots,a_n\in\mathbb R^d$ ($n<d$) are linearly dependent and also $Q$-conjugate, $Q$ real symmetric. What can be said about $Q$?
- (a) This is impossible for every symmetric $Q$.
- (b) It is possible only if $Q$ is not positive definite.
- (c) It is possible only if $Q=0$.
- (d) It is possible for every $Q$, since conjugacy has nothing to do with independence.
Explanation
(b). If $Q\succ0$ the proof in the previous question shows conjugate nonzero vectors are independent, so dependence forces $Q$ to fail positive definiteness (singular or indefinite). It does happen: in $\mathbb R^3$ take $Q=\mathrm{diag}(1,0,0)$, $a_1=e_2$, $a_2=2e_2$: $a_1^\top Qa_2=0$ but $a_2=2a_1$. (a) the example just given is a counterexample. (c) $\mathrm{diag}(1,0,0)$ is nonzero. (d) for $Q\succ0$ it is impossible. (M2 P12.)
3. The conjugate direction method
In plain words: pick a start $a$ and a set of conjugate directions. Describe every point as "start plus $y_1$ steps along $u_1$ plus $y_2$ steps along $u_2$…". Because the directions are conjugate, the function splits into independent one-variable parabolas, one per $y_i$. Solve each parabola alone and you are done in $d$ steps: moving along $u_2$ cannot wreck what you did along $u_1$.
Words and symbols on this stop: $a$ = start point. $U=[u_1\ \dots\ u_m]$ = matrix whose columns are the directions. $y=(y_1,\dots,y_m)$ = how far to go along each ($x=a+Uy=a+\sum y_iu_i$). Conjugate direction method = exact line search along $u_1$, then $u_2$, … (in the book: $x^{(k+1)}=x^{(k)}+\alpha_ku^{(k)}$). $\nabla f(a)$ = gradient at the start. (CQ) = the exam’s name for the convex quadratic $f(x)=\frac12x^\top Qx-h^\top x+c$, $Q\succ0$.
Precisely: $f(a+Uy)=f(a)+\sum_i\big(y_i\nabla f(a)^\top u_i+\frac12y_i^2u_i^\top Qu_i\big)$ and the minimiser is $y_i=-\dfrac{\nabla f(a)^\top u_i}{u_i^\top Qu_i}$. With $d$ independent conjugate directions, $x^{(d)}=x^*$.
If the columns $u_1,\dots,u_m$ of $U$ are $Q$-conjugate, then $U^\top QU$ is a diagonal matrix, so $f(a+Uy)$ is a sum of separate one-variable quadratics, one in each $y_i$.
Explanation
True. The entry $(i,j)$ of $U^\top QU$ is $u_i^\top Qu_j$, which is $0$ for $i\ne j$, so the matrix is diagonal. Then $f(a+Uy)=f(a)+\sum_i\big(y_i\nabla f(a)^\top u_i+\frac12y_i^2u_i^\top Qu_i\big)$: no products $y_iy_j$ remain, so each $y_i$ can be minimised alone. (M2 §B.)
$Q=\mathrm{diag}(1,4)$, $f(x)=\frac12x^\top Qx-h^\top x$ with $h=(1,4)$, start $a=0$, conjugate directions $u_1=(1,1)$, $u_2=(4,-1)$. Minimising over $a+y_1u_1+y_2u_2$ gives $(y_1,y_2)=$?
- (a) $(1,0)$
- (b) $(1,1)$
- (c) $(0,1)$
- (d) $(5,0)$
Explanation
(a). Use $y_i=-\frac{\nabla f(a)^\top u_i}{u_i^\top Qu_i}$ with $\nabla f(a)=Qa-h=(-1,-4)$. For $u_1$: $\nabla f(a)^\top u_1=-5$, $u_1^\top Qu_1=1+4=5$, so $y_1=1$. For $u_2$: $\nabla f(a)^\top u_2=-4+4=0$, so $y_2=0$ (the $u_2$-parabola is already at its bottom). The point $a+u_1=(1,1)=Q^{-1}h$ is $x^*$. (b),(c) would need nonzero $\nabla f(a)^\top u_2$. (d) forgets to divide by $u_1^\top Qu_1=5$. (M2 §B, MT2 2026 Q2.)
In the conjugate direction method (exact line searches along $Q$-conjugate directions), a later line search can undo the progress made along an earlier direction.
Explanation
False. This is the whole point. The line search along $u_k$ finds the same $y_k$ as the decoupled formula (because $x^{(k)}-a$ is a combination of earlier directions, all conjugate to $u_k$, so $g^{(k)\top}u_k=\nabla f(a)^\top u_k$), and later steps move only along directions conjugate to $u_k$, which leave the $u_k$-parabola untouched. Contrast steepest descent, whose consecutive directions are not conjugate. (M2 §B step 4.)
At every iteration of the Conjugate Direction Algorithm applied to a quadratic (CQ), the function value decreases.
Explanation
True. His key: True. With an exact line search along $u$ the decrease is $\frac{(g^\top u)^2}{2\,u^\top Qu}$, which is $>0$ whenever $g^\top u\ne0$, i.e. until the minimiser is reached (then there is nothing left to decrease). Do not confuse this with "every direction is a descent direction": the direction may point uphill ($g^\top u>0$), in which case $\alpha_k$ comes out negative and the step still goes downhill. (M2 §B.)
$g(y)=f(a+Ay)$ with $A\in\mathbb R^{d\times m}$, and the columns $a_1,\dots,a_m$ of $A$ are $Q$-conjugate. The optimality condition and its solution are:
- (a) $A^\top\big(\nabla f(a)+QAy\big)=0$, solved by $y_i=-\dfrac{\nabla f(a)^\top a_i}{a_i^\top Qa_i}$
- (b) $\nabla f(a)=0$, so no $y$ is needed
- (c) $A^\top QA=I$, so $y=-A^\top\nabla f(a)$
- (d) $A^\top\nabla f(a)=0$ only; $y$ can be anything
Explanation
(a). By the chain rule $\nabla_yg=A^\top\nabla f(a+Ay)=A^\top(\nabla f(a)+QAy)$; $g$ is convex (Hessian $A^\top QA\succeq0$), so this is the optimality condition. Conjugacy makes $A^\top QA$ diagonal, and the $i$-th equation reads $a_i^\top\nabla f(a)+y_ia_i^\top Qa_i=0$. (b) $a$ is an arbitrary start, not a stationary point. (c) conjugacy gives a diagonal $A^\top QA$, not $I$ (the diagonal entries are $a_i^\top Qa_i$). (d) drops the term $QAy$ (the gradient changes as $y$ moves). (M2 §B, P8.)
4. The Expanding Subspace theorem
In plain words: each new conjugate step adds one new direction you can move in, and the best point you reach is the best point in all the directions used so far, not just the last one. Point, then line, then plane, then 3-space… until the whole space is covered and you are at the minimiser.
Words and symbols on this stop: $\mathrm{span}\{u^{(0)},\dots,u^{(k-1)}\}$ = all combinations $c_0u^{(0)}+\dots+c_{k-1}u^{(k-1)}$ (a line, plane, … through the origin). $x^{(0)}+\mathrm{span}\{\dots\}$ = the same set shifted to pass through the start $x^{(0)}$. $g^{(k)}=\nabla f(x^{(k)})$ = gradient. $u^{(k)}$ = $k$-th direction.
Precisely (Expanding Subspace theorem): for $x^{(k+1)}=x^{(k)}+\alpha_ku^{(k)}$ with conjugate $u^{(k)}$ and exact steps, (i) $g^{(k)\top}u^{(i)}=0$ for $i<k$, (ii) $x^{(k)}$ minimises $f$ over $x^{(0)}+\mathrm{span}\{u^{(0)},\dots,u^{(k-1)}\}$.
Expanding Subspace theorem: in the conjugate direction method with exact line searches, the new gradient $g^{(k)}$ is perpendicular to every earlier direction $u^{(0)},\dots,u^{(k-1)}$.
Explanation
True. This is the first half of the theorem. The perpendicularity to $u^{(k-1)}$ is just the exact line search; its extension to all earlier $u^{(i)}$ comes from conjugacy: $g^{(k)}=g^{(i+1)}+\sum_{j=i+1}^{k-1}\alpha_jQu^{(j)}$ and $u^{(i)\top}Qu^{(j)}=0$ for $j\ne i$. (M2 §B.)
After $k$ steps of the conjugate direction method, $x^{(k)}$ minimises $f$ over which set?
- (a) only the line $x^{(k-1)}+t\,u^{(k-1)}$
- (b) all of $\mathbb R^d$ (for every $k$)
- (c) $x^{(0)}+\mathrm{span}\{u^{(0)},\dots,u^{(k-1)}\}$
- (d) $\mathrm{span}\{u^{(0)},\dots,u^{(k-1)}\}$ (through the origin, not through $x^{(0)}$)
Explanation
(c). The "expanding subspace" is the affine set through the start spanned by all directions used so far: a point, a line, a plane, … (b) only when $k=d$ (the span is then everything). (a) that is merely the last line search; the theorem says more, because the earlier progress is kept. (d) forgets the offset $x^{(0)}$. (M2 §B.)
The Expanding Subspace theorem does not apply to arbitrary conjugate directions.
Explanation
False. The theorem needs only that the directions are $Q$-conjugate and the line searches are exact; it is not special to CG’s directions. (Gradients being mutually orthogonal, by contrast, is special to CG: see the MSQ below.) His key: False. (M2 P3.)
The Expanding Subspace theorem has a unique minimum when applied to (CQ).
Explanation
True. His key: True. Reading: at each step the minimiser of $f$ over the affine set $x^{(0)}+\mathrm{span}\{u^{(0)},\dots,u^{(k-1)}\}$ is unique when the directions are independent and $u_i^\top Qu_i>0$ (then $f$ restricted to that set is strictly convex), and at $k=d$ this is the global minimiser. The wording of the question is loose; if it is asked again, answer True and add this sentence. (M2 §B.)
Conjugate direction method, $Q\succ0$, any conjugate set, exact line searches. Mark all correct statements.
- (a) $g^{(k)\top}u^{(i)}=0$ for all $i<k$.
- (b) $f(x^{(k)})\le f(x^{(k-1)})$ for every $k$.
- (c) The gradients $g^{(0)},g^{(1)},\dots$ are always mutually orthogonal.
- (d) With $d$ independent conjugate directions it stops at $x^*$ after $d$ steps.
Explanation
(a), (b), (d). (a) Expanding Subspace. (b) An exact line search never raises $f$. (d) The expanding subspace is then all of $\mathbb R^d$. (c) False: orthogonal gradients are a special property of CG. Counterexample: $Q=\mathrm{diag}(1,4)$, start $(1,1)$, $h=0$, directions $e_1,e_2$ (conjugate, since $Q$ is diagonal): $g^{(0)}=(1,4)$, after the first step $x=(0,1)$ and $g^{(1)}=(0,4)$, and $g^{(0)}\cdot g^{(1)}=16\ne0$ (yet $g^{(1)\top}e_1=0$ as the theorem says). (M2 §B, §C2.)
5. The CG algorithm and its facts
In plain words: conjugate directions are great but building them by Gram–Schmidt is expensive. CG gets them almost for free: each new direction is the new downhill direction plus a bit of the old direction, and the bit is chosen to make it conjugate to the old one. A small miracle makes it conjugate to all earlier ones.
Words and symbols on this stop: $g^{(k)}=Qx^{(k)}-h$ = gradient. $u^{(k)}$ = direction. $\alpha_k$ = step length (exact line search). $\beta_k$ = mixing number (how much of the old direction to keep). $\|g\|^2=g^\top g$. Krylov space = $\mathrm{span}\{g^{(0)},Qg^{(0)},Q^2g^{(0)},\dots\}$. Descent direction $u$: $g^\top u<0$ (moving a little along $u$ lowers $f$). Restart = forget the old direction ($\beta=0$).
Precisely: $g^{(0)}=Qx^{(0)}-h$, $u^{(0)}=-g^{(0)}$; for $k=0,1,\dots$ while $g^{(k)}\ne0$: $\alpha_k=\frac{g^{(k)\top}g^{(k)}}{u^{(k)\top}Qu^{(k)}}$, $x^{(k+1)}=x^{(k)}+\alpha_ku^{(k)}$, $g^{(k+1)}=g^{(k)}+\alpha_kQu^{(k)}$, $\beta_k=\frac{g^{(k+1)\top}g^{(k+1)}}{g^{(k)\top}g^{(k)}}$, $u^{(k+1)}=-g^{(k+1)}+\beta_ku^{(k)}$. Facts: directions conjugate, gradients orthogonal, equal spans (Krylov), finite termination in $\le d$ steps.
In CG the first search direction is $u^{(0)}=-g^{(0)}$, the steepest-descent direction.
Explanation
True. There is no earlier direction to be conjugate to, so CG starts with plain steepest descent. Hence the first CG step is exactly the first steepest-descent step with exact line search. (M2 §C, N5.)
$Q=\begin{pmatrix}3&1\\1&3\end{pmatrix}$, $f=\frac12x^\top Qx-h^\top x$ with $h=(2,0)$, $x^{(0)}=0$. The first CG step length $\alpha_0=\dfrac{g^{(0)\top}g^{(0)}}{u^{(0)\top}Qu^{(0)}}$ is:
- (a) $\frac12$
- (b) $3$
- (c) $\frac14$
- (d) $\frac13$
Explanation
(d). $g^{(0)}=Qx^{(0)}-h=(-2,0)$, so $g^{(0)\top}g^{(0)}=4$ and $u^{(0)}=(2,0)$. $Qu^{(0)}=(6,2)$, so $u^{(0)\top}Qu^{(0)}=12$ and $\alpha_0=\frac4{12}=\frac13$. (b) is the reciprocal (numerator and denominator swapped). (c) $\frac14$ divides by $\|g\|^2$ only. (a) $\frac12$ would be the step for $Q=2I$. Continuing: $x^{(1)}=(\frac23,0)$, $g^{(1)}=(0,\frac23)$, $\beta_0=\frac19$, $u^{(1)}=(\frac29,-\frac23)$, $\alpha_1=\frac38$, $x^{(2)}=(\frac34,-\frac14)=x^*$. (M2 §C3.)
The gradients $g^{(0)},g^{(1)},\dots$ produced by CG are mutually $Q$-conjugate.
Explanation
False. The gradients are mutually orthogonal ($g^{(i)\top}g^{(j)}=0$); the directions $u^{(i)}$ are the conjugate ones. Counterexample from the run above: $g^{(0)}=(-2,0)$, $g^{(1)}=(0,\frac23)$; they are orthogonal, but $g^{(0)\top}Qg^{(1)}=(-2,0)\cdot(\frac23,2)=-\frac43\ne0$. Memory aid: "gradients orthogonal, directions conjugate". (M2 N4.)
In the conjugate gradient algorithm, the subspace spanned by the conjugate directions is the same as the subspace spanned by the gradients of the iterates.
Explanation
True. $\mathrm{span}\{u^{(0)},\dots,u^{(k)}\}=\mathrm{span}\{g^{(0)},\dots,g^{(k)}\}=\mathrm{span}\{g^{(0)},Qg^{(0)},\dots,Q^kg^{(0)}\}$ (the last is the Krylov space). Reason: $u^{(k)}=-g^{(k)}+\beta_{k-1}u^{(k-1)}$ and $g^{(k+1)}=g^{(k)}+\alpha_kQu^{(k)}$, so each new vector is a combination of the old ones plus one more power of $Q$. The two sets of vectors differ (gradients are orthogonal, directions conjugate), only their spans agree. His key: True. (M2 §C2.)
In the CG method the conjugate directions are always descent directions.
Explanation
His key: False. Be careful: for CG with exact line search on a quadratic, $g^{(k)\top}u^{(k)}=-\|g^{(k)}\|^2+\beta_{k-1}g^{(k)\top}u^{(k-1)}=-\|g^{(k)}\|^2<0$ (the second term vanishes by Expanding Subspace), so every CG direction is a descent direction while $g^{(k)}\ne0$; on that reading the key looks wrong. It fits a wider reading: for a general conjugate set, or nonlinear CG with inexact line search, descent is not guaranteed. Exam advice: answer False as the key does, and if space allows, write the one-line quadratic computation. (M2 §C2, P4.)
Restarting the CG method after every 1 iteration will always lead to faster convergence.
Explanation
False. Restarting means setting $\beta=0$, i.e. $u^{(k+1)}=-g^{(k+1)}$: that is steepest descent, which is slower. On $Q=\mathrm{diag}(1,9)$ from $(9,1)$ CG is exact after 2 steps, but restart-every-step keeps $E_{k+1}/E_k=0.64$ forever ($E_2/E_0=0.4096$). His key: False. (M2 P5.)
If we reset the conjugate gradient method after every iteration we will recover Newton’s method.
Explanation
False. Resetting after every iteration gives $u^{(k)}=-g^{(k)}$ with an exact line search: steepest descent, not Newton (Newton uses $-Q^{-1}g$, the whole Hessian). (Newton’s method = jump to the minimiser of the local quadratic model, step $-Q^{-1}g$; Ch 4.) Same fact as the previous item, now with a different wrong ending. (M2 §C2, M7.)
CG on $f=\frac12x^\top Qx-h^\top x$ with $Q\succ0$. Mark all correct statements.
- (a) $u^{(i)\top}Qu^{(j)}=0$ for all $i\ne j$.
- (b) $g^{(i)\top}g^{(j)}=0$ for all $i\ne j$.
- (c) $\beta_k=\dfrac{\|g^{(k+1)}\|^2}{\|g^{(k)}\|^2}$.
- (d) $u^{(k)}$ is perpendicular to $u^{(k-1)}$ (ordinary dot product zero).
Explanation
(a), (b), (c). (a) conjugate directions, (b) orthogonal gradients, (c) the mixing number is the ratio of squared gradient lengths (it is chosen to make $u^{(k+1)}$ conjugate to $u^{(k)}$). (d) False: directions are conjugate, not orthogonal. In the run of this stop, $u^{(0)}=(2,0)$ and $u^{(1)}=(\frac29,-\frac23)$ have dot product $\frac49\ne0$, yet $u^{(0)\top}Qu^{(1)}=0$. (M2 §C1–C2.)
The Conjugate Gradient algorithm finds the global unconstrained minimum of $h(x)=\frac12x^\top Qx+b^\top x+c$ in at most $d$ iterations (here the exam writes the function as $h$ and the linear vector as $b$).
Explanation
His key: True, with $Q\succ0$ (finite termination in exact arithmetic: the expanding subspace is all of $\mathbb R^d$ after $d$ steps). Strictly as written, $Q$ is only said to be symmetric: for an indefinite $Q$ such as $\mathrm{diag}(1,-1)$ there is no minimum at all ($h(0,t)=-\frac{t^2}2\to-\infty$). If you have room, write "True if $Q\succ0$". (M2 P7.)
6. Counting steps: the polynomial view
In plain words: after $k$ steps CG has the best possible point of the form "start plus a combination of $g,Qg,\dots,Q^{k-1}g$". Each such point is "the start error multiplied by a polynomial in $Q$". The polynomial acts on each eigen-direction as a plain number $R(\lambda_i)$. If you can find a polynomial that is $1$ at $0$ and $0$ at every eigenvalue that matters, the error is exactly zero. So the number of CG steps = the number of different eigenvalues the starting error touches.
Words and symbols on this stop: $(\lambda_i,v_i)$ = eigenvalue and eigenvector of $Q$ ($Qv_i=\lambda_iv_i$). Start error $x^{(0)}-x^*=\sum c_iv_i$; it touches $\lambda_i$ if $c_i\ne0$. $P_{k-1}$ = polynomial of degree $k-1$; $R_k(\lambda)=1+\lambda P_{k-1}(\lambda)$, degree $k$ with $R_k(0)=1$. $E(x)=\frac12(x-x^*)^\top Q(x-x^*)$. $\kappa=\lambda_{\max}/\lambda_{\min}$. $aa^\top$ = rank-one matrix: it only scales the direction $a$ (more in stop 7).
Precisely (his bound): $E(x^{(k)})\le\max_{1\le i\le d}\big(1+\lambda_iP_{k-1}(\lambda_i)\big)^2E(x^{(0)})$ for every polynomial $P_{k-1}$ of degree $k-1$; only touched eigenvalues count. $r$ distinct eigenvalues gives $\le r$ steps. $k=1$: $P_0=c$, best $c=-\frac2{\lambda_{\min}+\lambda_{\max}}$, bound $\big(\frac{\lambda_{\max}-\lambda_{\min}}{\lambda_{\max}+\lambda_{\min}}\big)^2$. General rate $2\big(\frac{\sqrt\kappa-1}{\sqrt\kappa+1}\big)^k$ in $\|\cdot\|_Q$.
If $Q\succ0$ has exactly $r$ distinct eigenvalues, CG reaches the minimiser in at most $r$ iterations from any start.
Explanation
True. CG at step $k$ uses the best polynomial $R_k$ of degree $k$ with $R_k(0)=1$. Take $R_r(\lambda)=\prod_{j=1}^r(1-\lambda/\tau_j)$ over the distinct eigenvalues $\tau_j$: it equals $1$ at $\lambda=0$ and vanishes at every eigenvalue, so the error $E(x^{(r)})$ is $0$. For $r=d$ this is the usual "at most $d$". (M2 §D2.)
$Q=\mathrm{diag}(2,2,5)$, $f=\frac12x^\top Qx-h^\top x$, $h=(2,0,5)$, start $x^{(0)}=0$. How many CG iterations are needed?
- (a) 1
- (b) 2
- (c) 3
- (d) 0
Explanation
(b). $g^{(0)}=-h=(-2,0,-5)$ has a component in the eigenvalue-2 direction ($e_1$) and the eigenvalue-5 direction ($e_3$): two different eigenvalues touched, so 2 steps ($x^*=(1,0,1)$). (a) would need $g^{(0)}$ in a single eigenspace (for instance $h=(2,4,0)$ lies in the eigenvalue-2 space: 1 step). (c) counts $d=3$ instead of touched eigenvalues; the repeated 2 counts once. (d) the start is not the minimiser. (M2 N2.)
All eigenvalues of $Q$ lie in $[30,90]$. Taking $P_0(\lambda)=c=-\frac1{60}$ in the CG bound gives which bound on $E(x^{(1)})/E(x^{(0)})$?
- (a) $0.5$
- (b) $0.25$
- (c) $0.3$
- (d) $0.6$
Explanation
(b). $1+c\lambda$ runs from $1-\frac{30}{60}=0.5$ at $\lambda=30$ to $1-\frac{90}{60}=-0.5$ at $\lambda=90$, so $\max|1+c\lambda_i|=0.5$ and $E(x^{(1)})\le0.5^2E(x^{(0)})=0.25E(x^{(0)})$. Hence "$E(x^{(1)})\le0.3E(x^{(0)})$" is true, with the better bound $0.25$ (MT2 2026 Q4(b)). (a) $0.5$ is the bound on the norm factor, not on $E$ (which squares it). (c) $0.3$ is the number in the question, not what the calculation gives. (d) comes from a badly chosen $c$, e.g. $c=-1/90$ gives $\max|1+c\lambda|=\frac23$, bound $0.44$. (M2 §D2.)
If a conjugate direction method applied to (CQ) finished in 5 iterations, then $Q$ has 5 distinct eigenvalues.
Explanation
False. Two ways to break it. (1) The start error may touch only 5 of more than 5 distinct eigenvalues: $Q=\mathrm{diag}(1,\dots,6)$ with a start error having no $v_6$ part finishes in 5 steps. (2) A general conjugate direction method does not care about eigenvalues at all: on $\mathrm{diag}(1,1,1,1,2)$ with the directions $e_1,\dots,e_5$ it needs 5 steps although there are only 2 distinct eigenvalues. Converse direction is fine: $r$ distinct eigenvalues gives $\le r$ CG steps. His key: False. (M2 P6.)
There are functions on $\mathbb R^d$ for which the conjugate gradient algorithm is guaranteed to finish in 2 iterations.
Explanation
True. Any positive definite quadratic whose $Q$ has exactly two distinct eigenvalues, for instance $Q=\alpha I+\beta uu^\top$ ($\alpha>0$, $\alpha+\beta\|u\|^2>0$, $\beta\ne0$): eigenvalue $\alpha$ on the space perpendicular to $u$ and $\alpha+\beta\|u\|^2$ along $u$. Or $\mathrm{diag}(\lambda_1,\lambda_2,\dots,\lambda_2)$. Example $2I+3uu^\top$ with $\|u\|=1$ has eigenvalues $2$ (five times) and $5$ in $\mathbb R^6$: 2 steps from every start. His key: True. (M2 §D2.)
If all eigenvalues of $Q$ lie in $[2,8]$, one CG step guarantees $E(x^{(1)})\le0.3\,E(x^{(0)})$.
Explanation
False. The one-step bound is $\big(\frac{\lambda_{\max}-\lambda_{\min}}{\lambda_{\max}+\lambda_{\min}}\big)^2=\big(\frac{6}{10}\big)^2=0.36$ (best $c=-\frac2{10}=-\frac15$ gives $|1+c\lambda|\le0.6$), and it is attained: $Q=\mathrm{diag}(2,8)$, start $(8,2)$, one steepest-descent (= first CG) step gives exactly $E_1/E_0=0.36>0.3$. Contrast the $[30,90]$ case where the ratio $\frac{60}{120}$ is small enough. (M2 §D2, S5.)
7. Structured matrices σI + rank-one pieces
In plain words: a matrix like $\sigma I+aa^\top+2bb^\top$ is "the identity scaled, plus a few simple stretches in special directions". You do not need a determinant: just apply the matrix to the special vectors and to anything perpendicular to them. Most directions are only scaled by $\sigma$, so there are very few different eigenvalues and CG is very quick.
Words and symbols on this stop: $aa^\top$ = a $d\times d$ matrix of rank one (it maps $x\mapsto a(a^\top x)$: keeps only the part of $x$ along $a$). $\|a\|=1$ = unit length. $a^\top b=0$ = orthogonal. PSD ($\succeq0$) = eigenvalues $\ge0$ (zero allowed) vs PD ($\succ0$) = all $>0$. In his papers the scalar is written $\alpha I+uu^\top+2vv^\top$ (here $\alpha$ is a number in the matrix, not a step length).
Precisely: for orthonormal $a,b$: eigenvalues $\sigma+1$ (eigenvector $a$), $\sigma+2$ ($b$), $\sigma$ ($d-2$ times). In general $\sigma I+(\text{rank }r)$ has at most $r+1$ distinct eigenvalues, so CG needs at most $r+1$ steps. Number of CG steps = number of those eigenvalues that $g^{(0)}$ touches. With $Q$ singular and $w$ in its null space there is no minimum and CG breaks down.
$Q=\sigma I+aa^\top+2bb^\top$ with $\|a\|=\|b\|=1$ and $a^\top b=0$. Then $Qa=$
- (a) $(\sigma+2)a$
- (b) $\sigma a$
- (c) $(\sigma+1)a$
- (d) $(\sigma+3)a$
Explanation
(c). $Qa=\sigma a+a(a^\top a)+2b(b^\top a)=\sigma a+a+0=(\sigma+1)a$. (b) forgets the $aa^\top$ term. (a) $\sigma+2$ is the eigenvalue of $b$ (where $2bb^\top$ acts), not of $a$. (d) adds both pieces, but $b^\top a=0$ kills the second. Similarly $Qb=(\sigma+2)b$ and $Qw=\sigma w$ for $w\perp a,b$. (M2 §E1.)
What are the eigenvalues (with repeats) of $Q=3I+2aa^\top$ in $\mathbb R^4$, $\|a\|=1$?
- (a) $3,3,5,5$
- (b) $3,5,5,5$
- (c) $5,5,5,5$
- (d) $3,3,3,5$
Explanation
(d). $Qa=3a+2a(a^\top a)=5a$: eigenvalue 5 once. For $w\perp a$: $Qw=3w$, a $3$-dimensional space: eigenvalue 3 three times. So two distinct eigenvalues, hence CG takes at most 2 steps from any start (and 1 step if the start error is along $a$ only, e.g. $h=4a$ from $x^{(0)}=0$: $x^*=\frac45a$). (b) swaps the multiplicities (rank one adds to one direction only). (c) would be $5I$. (a) rank one cannot move two eigenvalues. (M2 §E3.)
$Q=\alpha I+uu^\top+2vv^\top$ with $\alpha>0$, $\|u\|=\|v\|=1$, $u^\top v=0$, $f(x)=\frac12x^\top Qx+w^\top x+c$ with $w^\top u=w^\top v=0$, $w\ne0$. CG from $x^{(0)}=0$ needs how many iterations?
- (a) 2
- (b) 1
- (c) 3
- (d) $d$
Explanation
(b). $g^{(0)}=Qx^{(0)}+w=w$, which is perpendicular to $u$ and $v$, hence lies in the $\alpha$-eigenspace: $Qw=\alpha w$. Only one distinct eigenvalue is touched. Explicitly $\alpha_0=\frac{w^\top w}{w^\top Qw}=\frac1\alpha$, $x^{(1)}=-\frac1\alpha w=x^*$, $g^{(1)}=0$. (Optimum value $f^*=c-\frac{\|w\|^2}{2\alpha}$.) (a), (c) would count the eigenvalues $\alpha+1,\alpha+2$ of $Q$ that the start does not touch. (d) ignores the structure. (M2 §E2.)
$Q=uu^\top+2vv^\top$ (no $\alpha I$) with $\|u\|=\|v\|=1$, $u^\top v=0$, $d\ge3$, $f=\frac12x^\top Qx+w^\top x+c$ with $w\perp u,v$, $w\ne0$. CG from $x^{(0)}=0$ converges in one iteration.
Explanation
False. Now $Q$ is only positive semidefinite and $Qw=0$, so the first step needs $u^{(0)\top}Qu^{(0)}=w^\top Qw=0$ in the denominator of $\alpha_0$: CG breaks down at once. The reason is that no minimiser exists: $f(-tw)=-t\|w\|^2+c\to-\infty$ as $t\to\infty$. Compare the $\alpha>0$ version, which takes one step. (PSD instead of PD is one of his favourite twists.) (M2 §E2.)
Same $Q=uu^\top+2vv^\top$, but now $w=0.6\,u+0.8\,v$. How many CG iterations from $x^{(0)}=0$, and where does it end?
- (a) 1 iteration, at $-w$
- (b) 2 iterations, at $-(0.6\,u+0.4\,v)$
- (c) 2 iterations, at $-w$
- (d) it breaks down
Explanation
(b). $g^{(0)}=w$ lies in $\mathrm{span}\{u,v\}$ with eigenvalues $1$ (along $u$) and $2$ (along $v$): both touched ($0.6,0.8\ne0$), so 2 iterations. The minimiser solves $Qx=-w$ inside that span: $x=-(0.6u+\frac{0.8}{2}v)=-(0.6u+0.4v)$. (a) would be the case $w\parallel u$ or $w\parallel v$ (one coefficient 0, one eigenvalue touched). (c) $-w$ would need $Qx=-w$ with $Q$ acting as the identity, but $Q$ doubles the $v$-part. (d) breakdown only occurs when $w^\top Qw=0$, i.e. $w\perp u,v$. (M2 §E2.)
8. CG for a linear system Ax = b
In plain words: solving the linear system $Ax=b$ and finding the bottom of the bowl $\frac12x^\top Ax-b^\top x$ are the same job, provided $A$ really is a bowl (symmetric and positive definite). So CG is a method for linear systems too, written with the residual $b-Ax$ (minus the gradient). If $A$ is not a bowl, change the system first.
Words and symbols on this stop: $A\in\mathbb R^{d\times d}$, $b\in\mathbb R^d$ = the system. Residual $r=b-Ax$. Leading minors = determinants of the top-left $1\times1$, $2\times2$, … blocks; Sylvester's criterion: a symmetric matrix is PD exactly when all leading minors are positive. Normal equations = $A^\top Ax=A^\top b$.
Precisely (2020 Q4): $u^{(0)}=r^{(0)}$; $\alpha_k=\frac{\|r^{(k)}\|^2}{u^{(k)\top}Au^{(k)}}$, $x^{(k+1)}=x^{(k)}+\alpha_ku^{(k)}$, $r^{(k+1)}=r^{(k)}-\alpha_kAu^{(k)}$, $\beta_k=\frac{\|r^{(k+1)}\|^2}{\|r^{(k)}\|^2}$, $u^{(k+1)}=r^{(k+1)}+\beta_ku^{(k)}$. Needs $A$ symmetric PD; otherwise use $A^\top Ax=A^\top b$ (invertible $A$).
If $A$ is symmetric positive definite, solving $Ax=b$ is the same problem as minimising $\varphi(x)=\frac12x^\top Ax-b^\top x$.
Explanation
True. $\nabla\varphi(x)=Ax-b$, so $\nabla\varphi=0\iff Ax=b$, and because $A\succ0$ the function $\varphi$ is strictly convex, so this single stationary point is the global minimiser. The residual $r=b-Ax$ is minus the gradient. (M2 §F.)
$A_1=\begin{pmatrix}4&1&1\\1&3&2\\1&2&2\end{pmatrix}$ and $A_2=\begin{pmatrix}4&1&1\\1&3&2\\1&2&1\end{pmatrix}$. The CG algorithm for $Ax=b$ (residual form) can be applied directly to:
- (a) both
- (b) only $A_1$
- (c) only $A_2$
- (d) neither
Explanation
(b). Both are symmetric, so test positive definiteness with the leading minors (Sylvester): $A_1$: $4$, $4\cdot3-1=11$, $\det A_1=4(6-4)-1(2-2)+1(2-3)=7$, all $>0$: PD, CG applies. $A_2$: $4$, $11$, $\det A_2=4(3-4)-1(1-2)+1(2-3)=-4<0$: not PD (indefinite), so $\varphi$ has no minimum and $u^\top Au$ can be $\le0$. (a) ignores $\det A_2$. (c) reversed. (d) $A_1$ qualifies. (M2 §F.)
CG can be applied directly to $Ax=b$ for any symmetric invertible $A$.
Explanation
False. Invertible is not enough; CG needs symmetric positive definite. The matrix $A_2$ above is symmetric and invertible ($\det=-4\ne0$) but indefinite. Counterexample in 1-D: $A=(-1)$, $\varphi=-\frac12x^2-bx$ has no minimum. (M2 N6.)
For $A_2$ above (symmetric, invertible, not positive definite), which modification lets CG find the solution of $A_2x=b$?
- (a) Run CG with $\beta_k=0$ in every iteration.
- (b) Apply CG to $-A_2x=-b$.
- (c) Apply CG to the normal equations $A_2^\top A_2\,x=A_2^\top b$.
- (d) Run ordinary CG for more than $d$ iterations.
Explanation
(c). $A_2^\top A_2$ is symmetric and positive definite (all eigenvalues are squares of nonzero numbers), and $A_2^\top A_2x=A_2^\top b$ has the same solution as $A_2x=b$ because $A_2$ is invertible. (Price: the condition number is squared.) (b) $-A_2$ is still indefinite (its eigenvalues are minus those of $A_2$). (a) $\beta=0$ is steepest descent, which also needs a bowl. (d) extra iterations do not fix an undefined step $u^\top A_2u\le0$. His answer in 2020 Q4: use $A^\top Ax=A^\top b$. (M2 §F.)
The rigorous version
- Conjugacy. Nonzero $u_1,\dots,u_m$ are $Q$-conjugate if $u_i^\top Qu_j=0$ for $i\ne j$. If $Q\succ0$ they are linearly independent ($m\le d$). Not unique. For $Q$ not positive definite, dependence can occur (2016 Q2).
- $Q$-Gram–Schmidt. Given independent $v_1,\dots,v_d$: $u_1=v_1$, $u_i=v_i-\sum_{j<i}A_{ij}u_j$, $A_{ij}=\dfrac{v_i^\top Qu_j}{u_j^\top Qu_j}$.
- Decoupling. For conjugate columns of $U$: $f(a+Uy)=f(a)+\sum_i\big(y_i\nabla f(a)^\top u_i+\frac12y_i^2u_i^\top Qu_i\big)$, minimised by $y_i=-\dfrac{\nabla f(a)^\top u_i}{u_i^\top Qu_i}$; optimality condition $U^\top(\nabla f(a)+QUy)=0$.
- Expanding Subspace theorem. For the conjugate direction method $x^{(k+1)}=x^{(k)}+\alpha_ku^{(k)}$, $\alpha_k=-\frac{g^{(k)\top}u^{(k)}}{u^{(k)\top}Qu^{(k)}}$: $g^{(k)\top}u^{(i)}=0$ for $i<k$, and $x^{(k)}$ minimises $f$ over $x^{(0)}+\mathrm{span}\{u^{(0)},\dots,u^{(k-1)}\}$. Hence $x^{(d)}=x^*$ for $d$ independent directions.
- CG algorithm. $u^{(0)}=-g^{(0)}$; $\alpha_k=\frac{\|g^{(k)}\|^2}{u^{(k)\top}Qu^{(k)}}$, $x^{(k+1)}=x^{(k)}+\alpha_ku^{(k)}$, $g^{(k+1)}=g^{(k)}+\alpha_kQu^{(k)}$, $\beta_k=\frac{\|g^{(k+1)}\|^2}{\|g^{(k)}\|^2}$, $u^{(k+1)}=-g^{(k+1)}+\beta_ku^{(k)}$ ($\alpha_k$: exact line search; $\beta_k$: makes $u^{(k+1)}$ conjugate to $u^{(k)}$).
- CG theorem. $u^{(i)\top}Qu^{(j)}=0$, $g^{(i)\top}g^{(j)}=0$ ($i\ne j$); $\mathrm{span}\{u^{(0..k)}\}=\mathrm{span}\{g^{(0..k)}\}=\mathrm{span}\{g^{(0)},Qg^{(0)},\dots,Q^kg^{(0)}\}$; $g^{(k)\top}u^{(k)}=-\|g^{(k)}\|^2$; $x^{(k)}=x^*$ for some $k\le d$.
- CG bound. $E(x^{(k)})\le\max_{1\le i\le d}\big(1+\lambda_iP_{k-1}(\lambda_i)\big)^2E(x^{(0)})$ for every polynomial $P_{k-1}$ of degree $k-1$; only eigenvalues touched by the start error count. $r$ distinct eigenvalues (touched) $\Rightarrow$ at most $r$ steps. One step: $\big(\frac{\lambda_{\max}-\lambda_{\min}}{\lambda_{\max}+\lambda_{\min}}\big)^2$. Rate: $\|x^{(k)}-x^*\|_Q\le2\big(\frac{\sqrt\kappa-1}{\sqrt\kappa+1}\big)^k\|x^{(0)}-x^*\|_Q$.
- Structured $Q$. $Q=\sigma I+aa^\top+2bb^\top$ ($a,b$ orthonormal): eigenvalues $\sigma$ ($d-2$ times), $\sigma+1$, $\sigma+2$. $\sigma I+$ rank $r$: at most $r+1$ distinct. $Q$ singular and $w$ in the null space: no minimum, CG breaks down.
- Linear systems. CG for $Ax=b$ needs $A$ symmetric PD (Sylvester: all leading minors $>0$); otherwise run it on $A^\top Ax=A^\top b$.
Final mixed round (exam level)
Questions from every stop, L3/L4. Try these without looking back at the cards.
CG on a quadratic with $Q\succ0$. Mark all correct statements.
- (a) $g^{(k)\top}g^{(i)}=0$ for $i<k$.
- (b) $u^{(k)\top}Qu^{(i)}=0$ for $i<k$.
- (c) $x^{(k)}$ minimises $f$ over $x^{(0)}+\mathrm{span}\{g^{(0)},Qg^{(0)},\dots,Q^{k-1}g^{(0)}\}$.
- (d) $u^{(k)}$ is a multiple of $-g^{(k)}$ for every $k$.
Explanation
(a), (b), (c). Orthogonal gradients, conjugate directions, and optimality over the Krylov space (the Expanding Subspace theorem plus equal spans). (d) False: $u^{(k)}=-g^{(k)}+\beta_{k-1}u^{(k-1)}$ with $\beta_{k-1}\ne0$ in general; only $u^{(0)}=-g^{(0)}$. Example in stop 5: $u^{(1)}=(\frac29,-\frac23)$ is not parallel to $-g^{(1)}=(0,-\frac23)$. (M2 §C.)
After the same number $n$ of iterations from the same start on a positive definite quadratic, CG has a function value no larger than gradient descent with any choice of $n$ step sizes.
Explanation
True. Gradient descent’s $n$-th iterate, with any step sizes, lies in $x^{(0)}+\mathrm{span}\{g^{(0)},Qg^{(0)},\dots,Q^{n-1}g^{(0)}\}$, and CG’s $x^{(n)}$ is the best point in exactly that set (Expanding Subspace plus equal spans). Not "faster at every step along the way for a fixed rule", but never worse at step $n$. (M2 §D3, N7.)
$\kappa=100$. To reduce the error by a given factor, steepest descent needs a number of steps proportional to ___ and CG to ___.
- (a) $\sqrt\kappa$ ; $\kappa$
- (b) $\kappa$ ; $\sqrt\kappa$
- (c) $\kappa$ ; $\kappa$
- (d) $\kappa^2$ ; $\kappa$
Explanation
(b). Per step, in the norm $\|z\|_Q=\sqrt{z^\top Qz}$: steepest descent contracts by $\frac{\kappa-1}{\kappa+1}=\frac{99}{101}\approx0.98$; CG by about $\frac{\sqrt\kappa-1}{\sqrt\kappa+1}=\frac{9}{11}\approx0.82$ (Chebyshev polynomial bound). Since $\frac{\kappa-1}{\kappa+1}\approx1-\frac2\kappa$ and $\frac{\sqrt\kappa-1}{\sqrt\kappa+1}\approx1-\frac2{\sqrt\kappa}$, the step counts scale like $\kappa$ and $\sqrt\kappa$. (a) reversed. (c) would mean CG has no advantage. (d) exaggerates steepest descent. (M2 §D3.)
$Q=\mathrm{diag}(1,2,3,4,5,6)$, $f=\frac12x^\top Qx-h^\top x$ with $h=(1,0,1,0,1,0)$, start $x^{(0)}=0$. How many CG iterations?
- (a) 2
- (b) 6
- (c) 1
- (d) 3
Explanation
(d). $g^{(0)}=-h$ has components only along $e_1,e_3,e_5$: eigenvalues $1,3,5$, three distinct values touched, so 3 iterations ($x^*=(1,0,\frac13,0,\frac15,0)$). (b) counts $d$. (c), (a) undercount the touched eigenvalues. (M2 §D2.)
$Q\succ0$ in $\mathbb R^{10}$ with eigenpairs $(\lambda_i,v_i)$, start $x^{(0)}=0$, $f=\frac12x^\top Qx-h^\top x$ with $h=\alpha v_5+\beta v_9$ ($\alpha,\beta\ne0$). Then CG converges in 2 iterations regardless of the other eigenvalues.
Explanation
True. $g^{(0)}=-h\in\mathrm{span}\{v_5,v_9\}$ and $Q^kg^{(0)}=-\lambda_5^k\alpha v_5-\lambda_9^k\beta v_9$, so the Krylov space never leaves $\mathrm{span}\{v_5,v_9\}$. The polynomial $R_2(\lambda)=(1-\frac\lambda{\lambda_5})(1-\frac\lambda{\lambda_9})$ is $0$ on both touched eigenvalues, so $E(x^{(2)})=0$. (If $\lambda_5=\lambda_9$: 1 step.) The printed solution of $E(x^{(0)})$ drops a factor $\frac12$, which cancels in the ratio. (M2 P11.)
Mark all correct statements.
- (a) $Q=2I+aa^\top+bb^\top$ in $\mathbb R^6$ with $a,b$ independent (not nec. orthogonal): CG takes at most 3 iterations from any start.
- (b) CG for $Ax=b$ needs $A$ symmetric positive definite.
- (c) For $Q=\alpha I+uu^\top+2vv^\top$ ($\alpha>0$) in $\mathbb R^d$, CG from a generic start takes $d$ iterations.
- (d) On any positive definite quadratic in $\mathbb R^d$, CG needs exactly $d$ iterations.
Explanation
(a), (b). (a) $Q-2I$ has rank $\le2$, so eigenvalue 2 sits on a space of dimension $\ge4$ and $Q$ has at most 3 distinct eigenvalues (e.g. for orthonormal $a,b$: $2$ four times and $3$ twice; in general $2$ plus two eigenvalues from the plane spanned by $a,b$). (b) Needed so that the linear system is a convex minimisation. (c) False: only 3 distinct eigenvalues ($\alpha,\alpha+1,\alpha+2$), so at most 3 iterations. (d) False: "at most $d$"; with repeated eigenvalues or a start touching few eigenvalues it is fewer (e.g. $Q=5I$: 1). (M2 §E, N1.)