NivaarExam PrepOfficial exam papers ↗

04-BS-5 · May 2016

Question 7 of 7: Cholesky ($LL^{T}$) Decomposition and Linear-System Solve

Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)

Notes on this paper

EGBC National Examination — 04-BS-5 Advanced Mathematics, May 2016. Closed-book, 3-hour exam; candidates were permitted one 8.5"x11" aid sheet (both sides) and an approved Casio/Sharp calculator. The exam instructs that any five (5) questions constitute a complete paper (only the first five answers as they appear in the answer book are marked); every question is solved below as a full study resource.

Reference texts: Kreyszig, Advanced Engineering Mathematics, 10th ed. — Ch.5 (Power Series Solutions of ODEs), Ch.11 (Fourier Series and Integrals), Ch.19–20 (Interpolation, Numerical Integration, Root-Finding, LU/Cholesky Factorization).

Question 7: Cholesky ($LL^{T}$) Decomposition and Linear-System Solve (a: 10, b: 10 marks)

Question text not reproduced: the examination questions are © Engineers and Geoscientists BC. Open the official past paper (linked at the top of this page) to read the question, then follow the worked solution below.

Given. $A=\begin{bmatrix}4&10&8\\10&29&26\\8&26&34\end{bmatrix}$ (symmetric positive definite) and right-hand side $b=(-4,-11,-5)^{T}$.

Find. (a) The lower-triangular Cholesky factor $L$ (and $L^{T}$). (b) The solution $x=(x_1,x_2,x_3)$.

Approach. Derive $L$ entry-by-entry column-by-column from $A=LL^{T}$; then solve $Ly=b$ by forward substitution and $L^{T}x=y$ by back substitution.

  1. (a) Column 1. $l_{11}=\sqrt{a_{11}}=\sqrt{4}=2$; $l_{21}=a_{21}/l_{11}=10/2=5$; $l_{31}=a_{31}/l_{11}=8/2=4$.
  2. (a) Column 2. $l_{22}=\sqrt{a_{22}-l_{21}^{2}}=\sqrt{29-25}=2$; $l_{32}=(a_{32}-l_{31}l_{21})/l_{22}=(26-20)/2=3$.
  3. (a) Column 3. $l_{33}=\sqrt{a_{33}-l_{31}^{2}-l_{32}^{2}}=\sqrt{34-16-9}=3$. Hence $$\boxed{L=\begin{bmatrix}2&0&0\\5&2&0\\4&3&3\end{bmatrix}},\qquad L^{T}=\begin{bmatrix}2&5&4\\0&2&3\\0&0&3\end{bmatrix}$$ (directly verified: $LL^{T}=A$ exactly, entry by entry).
  4. (b) Forward substitution, $Ly=b$. $$2y_1=-4\Rightarrow y_1=-2;\qquad 5y_1+2y_2=-11\Rightarrow y_2=-\tfrac12;\qquad 4y_1+3y_2+3y_3=-5\Rightarrow y_3=\tfrac32$$
  5. (b) Back substitution, $L^{T}x=y$. $$3x_3=\tfrac32\Rightarrow x_3=\tfrac12;\qquad 2x_2+3x_3=-\tfrac12\Rightarrow x_2=-1;\qquad 2x_1+5x_2+4x_3=-2\Rightarrow x_1=\tfrac12$$ $$\boxed{(x_1,x_2,x_3)=(0.5,\ -1,\ 0.5)}$$ (directly verified: substituting back into all three original equations reproduces $-4,-11,-5$ exactly.)
Final results — Question 7
QuantityResult
$L$$\begin{bmatrix}2&0&0\\5&2&0\\4&3&3\end{bmatrix}$
$y$ ($Ly=b$)$(-2,\ -0.5,\ 1.5)$
$x$ ($L^{T}x=y$)$(0.5,\ -1,\ 0.5)$

The whole-number entries of $L$ are not a coincidence of rounding: $A$ was built so that every square root in the Cholesky recursion lands on a perfect square (4, 4, 9), which is why this system is a natural textbook example rather than one requiring decimal approximation. Because $A$ is diagonally dominant as well as SPD, the same factorization would also succeed (numerically stably) via plain Gaussian elimination without pivoting, but Cholesky remains the cheaper choice whenever symmetry is known in advance, exactly as it is here.

Back to the paper →