NivaarExam PrepOfficial exam papers ↗

04-BS-5 · December 2015

Question 7 of 7: Doolittle LU 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, December 2015. Closed-book, 3-hour exam; candidates were permitted one 8.5"x11" aid sheet (both sides) and an approved calculator. The exam instructs that any five questions constitute a complete paper (first five answers 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.11 (Fourier series/transforms, Sturm–Liouville problems), Ch.19–20 (interpolation, numerical integration, root-finding, LU decomposition).

Question 7: Doolittle LU Decomposition and Linear System Solve (a: marks n/s, b: marks n/s)

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}6 & -1 & 5\\ -18 & 7 & -13\\ 12 & 18 & 21\end{bmatrix}$, right-hand side $b=(8,-30,-13)^{T}$.

Find. (a) $L$ (unit lower triangular) and $U$ such that $A=LU$; (b) the solution $(x_1,x_2,x_3)$ of $Ax=b$.

Approach. Doolittle elimination: eliminate below each pivot, recording the multipliers as $L$'s entries and the reduced rows as $U$; then solve $Ax=b$ in two triangular sweeps, $Lw=b$ (forward) then $Ux=w$ (back-substitution).

  1. (a) Eliminate column 1. Pivot $u_{11}=6$, so $l_{21}=-18/6=-3$ and $l_{31}=12/6=2$. Subtract $l_{21}\times$row 1 from row 2, and $l_{31}\times$row 1 from row 3: $$\text{row2}\to(-18,7,-13)-(-3)(6,-1,5)=(0,4,2), \qquad \text{row3}\to(12,18,21)-2(6,-1,5)=(0,20,11).$$
  2. (a) Eliminate column 2. Pivot $u_{22}=4$, so $l_{32}=20/4=5$. Subtract $l_{32}\times$row 2 (of the reduced matrix) from row 3: $(0,20,11)-5(0,4,2)=(0,0,1)=u_{33}$. $$\boxed{L=\begin{bmatrix}1&0&0\\-3&1&0\\2&5&1\end{bmatrix}, \qquad U=\begin{bmatrix}6&-1&5\\0&4&2\\0&0&1\end{bmatrix}}$$ Check: $L U$ reconstructs $A$ exactly.
  3. (b) Forward solve $Lw=b$. $w_1=8$; $-3w_1+w_2=-30\Rightarrow w_2=-30+24=-6$; $2w_1+5w_2+w_3=-13\Rightarrow w_3=-13-16-5(-6)=-13-16+30=1$. So $w=(8,-6,1)^T$.
  4. (b) Back solve $Ux=w$. $x_3=w_3/1=1$. $4x_2+2x_3=-6\Rightarrow x_2=(-6-2)/4=-2$. $6x_1-x_2+5x_3=8\Rightarrow 6x_1 = 8+x_2-5x_3 = 8-2-5=1\Rightarrow x_1=1/6$. $$\boxed{x_1=\tfrac16,\quad x_2=-2,\quad x_3=1}$$ Substituting back into all three original equations confirms $Ax=b$ exactly.
Final results — Question 7
QuantityResult
$L$$\begin{bmatrix}1&0&0\\-3&1&0\\2&5&1\end{bmatrix}$
$U$$\begin{bmatrix}6&-1&5\\0&4&2\\0&0&1\end{bmatrix}$
$x_1$$1/6$
$x_2$$-2$
$x_3$$1$
Back to the paper →