Math 128A, Fall 2026 · Per-Olof Persson
A linear system is the one problem in this course that can be solved exactly in finitely many steps — no iteration, no truncation error, just arithmetic. That is what direct means. What remains is everything else: how many operations it costs, and how round-off behaves along the way. Both turn out to matter, and the second one is why §6.2 exists.
Write the system as \(A\mathbf{x} = \mathbf{b}\), where \[ A = [a_{ij}] = \begin{bmatrix} a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{n1} & a_{n2} & \cdots & a_{nn} \end{bmatrix}, \qquad \mathbf{x} = \begin{bmatrix} x_1 \\ x_2 \\ \vdots \\ x_n \end{bmatrix}, \qquad \mathbf{b} = \begin{bmatrix} b_1 \\ b_2 \\ \vdots \\ b_n \end{bmatrix}. \]
Everything is done on the augmented matrix \([A, \mathbf{b}]\), since the row operations act on \(A\) and \(\mathbf{b}\) together. The goal is to clear everything strictly below the diagonal.
It is done one column at a time. At step \(k\) the pivot row \(k\) is used to clear column \(k\) beneath it, and the zeros from earlier steps are left undisturbed.
In pseudocode, with \(m\) the multiplier: \[ \begin{aligned} &\textbf{for } i = 1 : n-1 \\ &\quad \textbf{for } j = i+1 : n \\ &\quad\quad m \leftarrow a_{ji}\,/\,a_{ii} &&\text{1 division} \\ &\quad\quad \textbf{for } k = i : n \\ &\quad\quad\quad a_{jk} \leftarrow a_{jk} - m\cdot a_{ik} &&\text{1 multiply, 1 subtract} \\ &\quad\quad \textbf{end} \\ &\quad\quad b_j \leftarrow b_j - m\cdot b_i \\ &\quad \textbf{end} \\ &\textbf{end} \end{aligned} \]
Elimination leaves an upper triangular system, \[ \left[\begin{array}{ccccc|c} \times & \times & \cdots & & \times & \times \\ 0 & \times & \cdots & & \times & \times \\ 0 & 0 & \times & \cdots & \times & \times \\ \vdots & \vdots & & \ddots & \vdots & \vdots \\ 0 & 0 & \cdots & 0 & \times & \times \end{array}\right], \] which is solved from the bottom up: the last equation gives \(x_n\) directly, and each earlier one then has only a single unknown left. \[ \begin{aligned} &\mathbf{x} \leftarrow \mathbf{b} \\ &\textbf{for } i = n : -1 : 1 \\ &\quad \textbf{for } j = i+1 : n \\ &\quad\quad x_i \leftarrow x_i - a_{ij}\cdot x_j \\ &\quad \textbf{end} \\ &\quad x_i \leftarrow x_i / a_{ii} \\ &\textbf{end} \end{aligned} \]
How expensive is this? Count the arithmetic in the elimination phase, ignoring the \(\mathbf{b}\) vector. Three summation identities do all the work: \[ \sum_{i=1}^{n} 1 = n, \qquad \sum_{i=1}^{n} i = \frac{n(n+1)}{2}, \qquad \sum_{i=1}^{n} i^2 = \frac{n(n+1)(2n+1)}{6}. \]
Divisions. The inner loop performs one division for each \(j\) from \(i+1\) to \(n\), that is \(n-i\) of them, so \[ \sum_{i=1}^{n-1}(n-i) = \sum_{i=1}^{n-1}n - \sum_{i=1}^{n-1}i = n(n-1) - \frac{(n-1)n}{2} = \frac{n(n-1)}{2}. \]
Multiplications. For each of those \(n-i\) values of \(j\) the innermost loop runs over \(k = i : n\), which is \(n-i+1\) values, so \[ \begin{aligned} \sum_{i=1}^{n-1}(n-i)(n-i+1) &= \sum_{i=1}^{n-1}\left(n^2 - 2ni + n + i^2 - i\right) \\ &= \sum_{i=1}^{n-1}\left[(n^2+n) - (2n+1)i + i^2\right] \\ &= (n^2+n)(n-1) - (2n+1)\frac{(n-1)n}{2} + \frac{(n-1)n(2n-1)}{6} \\ &= \cdots = \frac{n(n^2-1)}{3}. \end{aligned} \]
So elimination costs \(O(n^3)\) operations while back-substitution costs only \(O(n^2)\) — the factorization dominates, which is the observation §6.5 exploits.
Elimination as written divides by \(a_{ii}\), so it fails outright if a pivot is zero. The repair is obvious — exchange rows — but the interesting case is when the pivot is merely small.
A zero pivot.
\[ \left[\begin{array}{cc|c} 0 & 1 & 1 \\ 1 & 1 & 2 \end{array}\right] \xrightarrow{\ \text{exchange rows}\ } \left[\begin{array}{cc|c} 1 & 1 & 2 \\ 0 & 1 & 1 \end{array}\right], \] and back-substitution gives \(x_2 = 1\), then \(x_1 = 2 - 1 = 1\), so \[ \mathbf{x} = \begin{bmatrix} 1 \\ 1 \end{bmatrix}. \]
A small pivot is just as bad.
Perturb the zero to something tiny but nonzero: \[ \left[\begin{array}{cc|c} 10^{-20} & 1 & 1 \\ 1 & 1 & 2 \end{array}\right] \xrightarrow{\ \ } \left[\begin{array}{cc|c} 10^{-20} & 1 & 1 \\ 0 & 1 - 10^{20} & 2 - 10^{20} \end{array}\right]. \]
Elimination is legal now — the pivot is nonzero — but in floating point both \(1 - 10^{20}\) and \(2 - 10^{20}\) round to \(-10^{20}\), because the leading digits swamp the trailing ones. This is exactly the cancellation of §1.2. So back-substitution gives \[ x_2 = \frac{-10^{20}}{-10^{20}} = 1, \qquad x_1 = \frac{1 - x_2}{10^{-20}} = \frac{0}{10^{-20}} = 0, \] that is \(\mathbf{x} \approx \begin{bmatrix} 0 \\ 1\end{bmatrix}\) — the first component is completely wrong.
The moral: pivot even when \(a_{ii} \ne 0\).
Partial pivoting exchanges rows so that the largest available entry in the column becomes the pivot.
The same system, with partial pivoting.
\[ \left[\begin{array}{cc|c} 1 & 1 & 2 \\ 10^{-20} & 1 & 1 \end{array}\right] \xrightarrow{\ \ } \left[\begin{array}{cc|c} 1 & 1 & 2 \\ 0 & 1 - 10^{-20} & 1 - 2\cdot 10^{-20} \end{array}\right]. \]
Now the perturbations are small relative to the entries they sit in, so \(1 - 10^{-20} \approx 1\) and \(1 - 2\cdot 10^{-20} \approx 1\). Back-substitution gives \(x_2 = 1\) and \(x_1 = 2 - 1 = 1\): \[ \mathbf{x} \approx \begin{bmatrix} 1 \\ 1 \end{bmatrix}, \] which is exact. The same arithmetic, in a different order.
The two shapes that elimination produces are worth naming. An upper triangular matrix has zeros below the diagonal and a lower triangular matrix has zeros above it: \[ U = \begin{bmatrix} \times & \cdots & & \times \\ 0 & \times & & \vdots \\ \vdots & & \ddots & \vdots \\ 0 & \cdots & 0 & \times \end{bmatrix}, \qquad L = \begin{bmatrix} \times & 0 & \cdots & 0 \\ \times & \times & & \vdots \\ \vdots & & \ddots & 0 \\ \times & \cdots & & \times \end{bmatrix}. \]
First check that both sides even make sense. If \(A\) is \(n\times m\), \(B\) is \(m\times k\) and \(C\) is \(k\times p\), then
\[ \underbrace{A}_{n\times m}\underbrace{(BC)}_{m\times p} = n\times p, \qquad \underbrace{(AB)}_{n\times k}\underbrace{C}_{k\times p} = n\times p, \] so both products are \(n\times p\) and can be compared entrywise.
Expanding the left side, \[ \text{LHS}_{ij} = \bigl[A(BC)\bigr]_{ij} = \sum_{s=1}^{m} A_{is}(BC)_{sj} = \sum_{s=1}^{m} A_{is}\sum_{\ell=1}^{k}B_{s\ell}C_{\ell j} = \sum_{s=1}^{m}\sum_{\ell=1}^{k} A_{is}B_{s\ell}C_{\ell j}, \] and the right side, \[ \text{RHS}_{ij} = \bigl[(AB)C\bigr]_{ij} = \sum_{\ell=1}^{k}(AB)_{i\ell}C_{\ell j} = \sum_{\ell=1}^{k}\left(\sum_{s=1}^{m}A_{is}B_{s\ell}\right)C_{\ell j} = \sum_{\ell=1}^{k}\sum_{s=1}^{m} A_{is}B_{s\ell}C_{\ell j}. \]
The two double sums have the same terms; only the order of summation differs, and a finite sum does not care. Hence \(\bigl[(AB)C\bigr]_{ij} = \bigl[A(BC)\bigr]_{ij}\) for every \(i, j\). ■
Suppose \(B\) and \(C\) are both inverses of \(A\): \[ AB = I, \quad BA = I, \qquad AC = I, \quad CA = I . \] Then \[ C = CI = C(AB) = (CA)B = IB = B, \] using associativity in the middle step. So \(B = C\): there is only one inverse, and we may write \(A^{-1}\). ■
From \(A^{-1}A = I\) we see that \(A\) is an inverse of \(A^{-1}\). By uniqueness it is the inverse, so \((A^{-1})^{-1} = A\). ■
Multiply out, cancelling from the inside: \[ \bigl(B^{-1}A^{-1}\bigr)(AB) = B^{-1}\bigl(A^{-1}A\bigr)B = B^{-1}IB = B^{-1}B = I . \] So \(B^{-1}A^{-1}\) is an inverse of \(AB\), and by uniqueness it is the inverse. Note the order reverses. ■
Working entrywise, and using that transposing swaps indices, \[ \bigl[(AB)^{t}\bigr]_{ij} = (AB)_{ji} = \sum_{s=1}^{k} A_{js}B_{si} = \sum_{s=1}^{k}\bigl(A^{t}\bigr)_{sj}\bigl(B^{t}\bigr)_{is} = \sum_{s=1}^{k}\bigl(B^{t}\bigr)_{is}\bigl(A^{t}\bigr)_{sj} = \bigl(B^{t}A^{t}\bigr)_{ij}. \] ■
Using the previous result, \[ \bigl(A^{t}\bigr)\bigl(A^{-1}\bigr)^{t} = \bigl(A^{-1}A\bigr)^{t} = I^{t} = I, \] so \((A^{-1})^{t}\) is an inverse of \(A^{t}\), and by uniqueness it is the inverse. ■
Finding \(A^{-1}\) means finding \(B\) with \(AB = I_n\), which is \(n\) linear systems sharing the same matrix — one for each column of \(I\). They can be solved together by augmenting with the whole identity: \[ \bigl(A \mid I\bigr) \xrightarrow{\ \text{elimination}\ } \bigl(U \mid Y\bigr) \xrightarrow{\ \text{back-substitution}\ } B . \]
The inverse of a \(2\times 2\) matrix.
Let \[ A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}, \qquad ad - bc \ne 0, \] and look for \(B = \begin{pmatrix} e & f \\ g & h \end{pmatrix}\). Assuming \(a \ne 0\), one elimination step gives \[ \left(\begin{array}{cc|cc} a & b & 1 & 0 \\ c & d & 0 & 1 \end{array}\right) \xrightarrow{\ \ } \left(\begin{array}{cc|cc} a & b & 1 & 0 \\ 0 & d - \frac{cb}{a} & -\frac{c}{a} & 1 \end{array}\right). \]
Reading off the second column of \(B\) from the second system, then the first: \[ g = \frac{-\frac{c}{a}}{\,d - \frac{cb}{a}\,} = \frac{-c}{ad-bc}, \qquad h = \frac{1}{\,d - \frac{cb}{a}\,} = \frac{a}{ad-bc}, \] and then \[ e = \frac{1 - bg}{a} = \frac{1 + \frac{bc}{ad-bc}}{a} = \frac{\frac{ad-bc+bc}{ad-bc}}{a} = \frac{ad}{a(ad-bc)} = \frac{d}{ad-bc}, \] \[ f = \frac{-bh}{a} = \frac{-b}{ad-bc}. \]
Collecting these, \[ A^{-1} = B = \frac{1}{ad-bc}\begin{pmatrix} d & -b \\ -c & a \end{pmatrix}, \] the formula worth memorising — and note where the hypothesis \(ad-bc \ne 0\) was needed.
The determinant is defined by cofactor expansion, recursively in the size: \[ \det[a] = a, \qquad \det\begin{bmatrix} a & b \\ c & d\end{bmatrix} = (-1)^{1+1}ad + (-1)^{1+2}bc = ad - bc, \] and for \(3\times 3\), \[ \det\begin{bmatrix} a & b & c \\ d & e & f \\ g & h & i \end{bmatrix} = a(ei - fh) - b(di - fg) + c(dh - eg) = aei + bfg + cdh - afh - bdi - ceg . \]
That is \(3! = 6\) terms. For \(4\times 4\) it is \(4! = 24\) terms, and in general \(n!\) — hopeless beyond very small \(n\).
The practical method uses elimination instead. Row operations of the form “subtract a multiple of one row from another” leave the determinant unchanged, and the determinant of a triangular matrix is the product of its diagonal.
A determinant by elimination.
\[ A = \begin{bmatrix} 1 & 2 & 0 \\ 2 & 1 & -1 \\ 3 & 1 & 1 \end{bmatrix} \xrightarrow{\ \ } \begin{bmatrix} 1 & 2 & 0 \\ 0 & -3 & -1 \\ 0 & -5 & 1 \end{bmatrix} \xrightarrow{\ \ } \begin{bmatrix} 1 & 2 & 0 \\ 0 & -3 & -1 \\ 0 & 0 & 1 - \frac{5}{3}(-1) \end{bmatrix} = U, \] where the last pivot is \(1 + \frac53 = \frac83\). Hence \[ \det A = \det U = 1\cdot(-3)\cdot\frac{8}{3} = -8 . \] This costs \(O(n^3)\) operations rather than \(O(n!)\).
Gaussian elimination without pivoting does more than solve one system — it computes a factorization of \(A\).
Once \(A = LU\) is known, solving \(A\mathbf{x} = \mathbf{b}\) means solving \(LU\mathbf{x} = \mathbf{b}\) in two triangular stages:
Each stage costs \(O(n^2)\), against \(O(n^3)\) for the factorization. So for many right-hand sides sharing one matrix, \[ A\mathbf{x} = \mathbf{b}_1, \qquad A\mathbf{x} = \mathbf{b}_2, \qquad \ldots \] the expensive work is done once and reused.
Each elimination step is itself a matrix multiplication. Subtracting \(m_1\) times row 1 from row 3 and \(m_2\) times row 1 from row 4, for instance, is left multiplication by a matrix that differs from the identity only in column 1: \[ \begin{bmatrix} 1 & & & \\ & 1 & & \\ -m_1 & & 1 & \\ -m_2 & & & 1 \end{bmatrix} \begin{bmatrix} 1 & 2 & 3 & 4 \\ 5 & 6 & 7 & 8 \\ 9 & 10 & 11 & 12 \\ 13 & 14 & 15 & 16 \end{bmatrix} = \begin{bmatrix} 1 & 2 & 3 & 4 \\ 5 & 6 & 7 & 8 \\ 9-5m_1 & 10-6m_1 & 11-7m_1 & 12-8m_1 \\ 13-5m_2 & 14-6m_2 & 15-7m_2 & 16-8m_2 \end{bmatrix}. \]
A complete \(LU\) factorization.
Take \[ A = \begin{bmatrix} 1 & 4 & 7 \\ 2 & 5 & 8 \\ 3 & 6 & 9 \end{bmatrix}. \]
First column. The multipliers are \(m_{21} = \frac21 = 2\) and \(m_{31} = \frac31 = 3\), so \[ M^{(1)} = \begin{bmatrix} 1 & 0 & 0 \\ -2 & 1 & 0 \\ -3 & 0 & 1\end{bmatrix}, \qquad A^{(2)} = M^{(1)}A = \begin{bmatrix} 1 & 4 & 7 \\ 0 & -3 & -6 \\ 0 & -6 & -12 \end{bmatrix}. \]
Second column. Now \(m_{32} = \frac{-6}{-3} = 2\), so \[ M^{(2)} = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & -2 & 1\end{bmatrix}, \qquad U = A^{(3)} = M^{(2)}A^{(2)} = \begin{bmatrix} 1 & 4 & 7 \\ 0 & -3 & -6 \\ 0 & 0 & 0 \end{bmatrix}. \]
Undoing the steps. We have \(M^{(2)}M^{(1)}A = U\), so \[ A = \left[M^{(2)}M^{(1)}\right]^{-1}U = \underbrace{\left[M^{(1)}\right]^{-1}\left[M^{(2)}\right]^{-1}}_{\textstyle L}U , \] the order reversing by the rule of §6.3. Inverting an elimination matrix just flips the sign of its multipliers — adding back what was subtracted — so \[ L = \begin{bmatrix} 1 & 0 & 0 \\ m_{21} & 1 & 0 \\ m_{31} & m_{32} & 1\end{bmatrix} = \begin{bmatrix} 1 & 0 & 0 \\ 2 & 1 & 0 \\ 3 & 2 & 1\end{bmatrix}, \] and therefore \[ A = LU = \begin{bmatrix} 1 & 0 & 0 \\ 2 & 1 & 0 \\ 3 & 2 & 1\end{bmatrix} \begin{bmatrix} 1 & 4 & 7 \\ 0 & -3 & -6 \\ 0 & 0 & 0\end{bmatrix}. \]
The multipliers land in \(L\) exactly where they were used, which is why elimination can overwrite \(A\) with both factors in place.
Check it directly for the two steps above: \[ \begin{bmatrix} 1 & & \\ -2 & 1 & \\ -3 & & 1\end{bmatrix} \begin{bmatrix} 1 & & \\ 2 & 1 & \\ 3 & & 1\end{bmatrix} = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1\end{bmatrix} = I, \] \[ \begin{bmatrix} 1 & & \\ & 1 & \\ & -2 & 1\end{bmatrix} \begin{bmatrix} 1 & & \\ & 1 & \\ & 2 & 1\end{bmatrix} = I . \] Multiplying the two inverses in the right order rebuilds \(L\): \[ \left[M^{(1)}\right]^{-1}\left[M^{(2)}\right]^{-1} = \begin{bmatrix} 1 & & \\ 2 & 1 & \\ 3 & & 1\end{bmatrix} \begin{bmatrix} 1 & & \\ & 1 & \\ & 2 & 1\end{bmatrix} = \begin{bmatrix} 1 & & \\ 2 & 1 & \\ 3 & 2 & 1\end{bmatrix}. \] Note that the multipliers do not interfere — that is special to this order, and it is what makes the construction work. ■
Row exchanges are matrix multiplications too. A permutation matrix is the identity with its rows reordered, and multiplying by it on the left applies that reordering.
Exchanging rows 2 and 4.
The permutation \((k_1, k_2, k_3, k_4) = (1, 4, 3, 2)\) gives \[ \underbrace{\begin{bmatrix} 1 & & & \\ & & & 1 \\ & & 1 & \\ & 1 & & \end{bmatrix}}_{\textstyle P} \underbrace{\begin{bmatrix} 1 & 2 & 3 & 4 \\ 5 & 6 & 7 & 8 \\ 9 & 10 & 11 & 12 \\ 13 & 14 & 15 & 16 \end{bmatrix}}_{\textstyle A} = \begin{bmatrix} 1 & 2 & 3 & 4 \\ 13 & 14 & 15 & 16 \\ 9 & 10 & 11 & 12 \\ 5 & 6 & 7 & 8 \end{bmatrix}. \]
With pivoting, then, elimination produces \(PA = LU\) rather than \(A = LU\).
Some matrices can be factored faster, or without pivoting, because of their structure. This section collects the cases worth recognising.
Checking diagonal dominance.
\[ A = \begin{bmatrix} 5 & -3 & -2 \\ 1 & -2 & 0 \\ 0 & 3 & 3 \end{bmatrix} \] Row by row, comparing each diagonal entry against the sum of the others: \[ \begin{aligned} |5| &\ge |-3| + |-2| = 5, \\ |-2| &> |1| + |0| = 1, \\ |3| &\ge |0| + |3| = 3 . \end{aligned} \] All three hold, so \(A\) is diagonally dominant — and such a matrix needs no pivoting at all.
A symmetric matrix is positive definite if \(\mathbf{x}^{t}A\mathbf{x} > 0\) for every \(\mathbf{x} \ne \mathbf{0}\). Three consequences follow by choosing \(\mathbf{x}\) cleverly.
Suppose \(A\mathbf{x} = \mathbf{0}\) for some \(\mathbf{x}\). Multiplying by \(\mathbf{x}^{t}\) gives \(\mathbf{x}^{t}A\mathbf{x} = 0\). But \(A\) is positive definite, so this forces \(\mathbf{x} = \mathbf{0}\). The only solution of \(A\mathbf{x} = \mathbf{0}\) is trivial, so \(A\) is nonsingular. ■
Take \(\mathbf{x} = \mathbf{e}_i\), the vector with \(1\) in position \(i\) and zeros elsewhere. Then \[ \mathbf{x}^{t}A\mathbf{x} = a_{ii} > 0 \] since \(A\) is positive definite. So every diagonal entry is positive. ■
For \(i \ne j\), take \(\mathbf{x}\) with \(\alpha\) in position \(i\), \(1\) in position \(j\) and zeros elsewhere. Then \[ \mathbf{x}^{t}A\mathbf{x} = a_{ii}\alpha^2 + 2\alpha a_{ij} + a_{jj} > 0 \] for every real \(\alpha\). A quadratic in \(\alpha\) that is never zero has no real roots, so its discriminant is negative: \[ 4a_{ij}^2 - 4a_{ii}a_{jj} < 0 \qquad\Longrightarrow\qquad a_{ij}^2 < a_{ii}a_{jj}. \] So no off-diagonal entry can be large compared with the diagonal — a positive definite matrix is diagonally weighted by necessity. ■
Testing positive definiteness by leading minors.
\[ A = \begin{bmatrix} 4 & 2 & 0 \\ 2 & 8 & 1 \\ 0 & 1 & 1\end{bmatrix} \] is symmetric, so the test applies. Its leading principal submatrices are \[ A_1 = \begin{bmatrix} 4 \end{bmatrix}, \qquad A_2 = \begin{bmatrix} 4 & 2 \\ 2 & 8\end{bmatrix}, \qquad A_3 = A, \] with determinants \[ \det A_1 = 4 > 0, \qquad \det A_2 = 32 - 4 = 28 > 0, \qquad \det A_3 = 24 > 0 . \] All positive, so \(A\) is positive definite.
For a symmetric positive definite matrix the \(LU\) factorization can be made symmetric too, which halves both the work and the storage.
The \(LDL^{t}\) factorization.
Run elimination on the same matrix: \[ A = \begin{bmatrix} 4 & 2 & 0 \\ 2 & 8 & 1 \\ 0 & 1 & 1\end{bmatrix} \xrightarrow[\;m_{31}=0\;]{\;m_{21}=\frac12\;} \begin{bmatrix} 4 & 2 & 0 \\ 0 & 7 & 1 \\ 0 & 1 & 1\end{bmatrix} \xrightarrow{\;m_{32}=\frac17\;} \begin{bmatrix} 4 & 2 & 0 \\ 0 & 7 & 1 \\ 0 & 0 & \frac67\end{bmatrix} = U . \]
The pivots \(4, 7, \frac67\) are all positive and \(A\) is symmetric, confirming that \(A\) is positive definite. The multipliers give \[ L = \begin{bmatrix} 1 & & \\ \frac12 & 1 & \\ 0 & \frac17 & 1\end{bmatrix}, \qquad A = LU . \]
Now split the pivots off \(U\). Defining \[ D = \begin{bmatrix} 4 & & \\ & 7 & \\ & & \frac67 \end{bmatrix}, \] the rows of \(U\) divided by their pivots are precisely \(L^{t}\): \[ U = D\underbrace{\begin{bmatrix} 1 & \frac12 & 0 \\ & 1 & \frac17 \\ & & 1 \end{bmatrix}}_{\textstyle L^{t}}, \] and therefore \[ A = LDL^{t}. \]
Cholesky: \(A = \tilde L\tilde L^{t}\).
Because \(A\) is positive definite, every entry of \(D\) is positive and \(D^{1/2}\) makes sense. Setting \[ \tilde L = L\,D^{1/2} = L\begin{bmatrix} \sqrt4 & & \\ & \sqrt7 & \\ & & \sqrt{\frac67}\end{bmatrix} = \begin{pmatrix} 2 & 0 & 0 \\ 1 & \sqrt7 & 0 \\ 0 & \frac{1}{\sqrt7} & \sqrt{\frac67} \end{pmatrix}, \] we get \[ A = LDL^{t} = LD^{1/2}D^{1/2}L^{t} = \bigl(LD^{1/2}\bigr)\bigl(LD^{1/2}\bigr)^{t} = \tilde L\tilde L^{t}, \] using \(\left(D^{1/2}\right)^{t} = D^{1/2}\) since \(D\) is diagonal. This is the Cholesky factorization: one triangular factor instead of two, and it exists precisely for symmetric positive definite matrices.
A band matrix has all its nonzeros confined to a narrow diagonal band: \(a_{ij} = 0\) whenever \(j - i \ge p\) or \(i - j \ge q\), so \(p\) bounds how far the band reaches above the diagonal and \(q\) how far below, giving bandwidth \(p + q - 1\).
Elimination never creates a nonzero outside the band, so the work drops from \(O(n^3)\) to \(O(n)\) for fixed bandwidth — which is why the tridiagonal case (\(p = q = 2\)) made the cubic spline algorithm of §3.5 cheap.