From the lesson's elimination, the multipliers were 2 (R2),
1 (R3, first pass) and 2 (R3, second pass):
A = L @ U
| 2 1 1 | | 1 0 0 | | 2 1 1 |
| 4 3 3 | = | 2 1 0 | @ | 0 1 1 |
| 2 3 1 | | 1 2 1 | | 0 0 −2 |
check row 2: 2·[2,1,1] + 1·[0,1,1] = [4,3,3] ✓
check row 3: 1·[2,1,1] + 2·[0,1,1] + 1·[0,0,−2] = [2,3,1] ✓
Cholesky of A = [[4, 2], [2, 5]]:
want L = [[l₁₁, 0], [l₂₁, l₂₂]] with L Lᵀ = A
l₁₁² = 4 → l₁₁ = 2
l₂₁ · l₁₁ = 2 → l₂₁ = 1
l₂₁² + l₂₂² = 5 → l₂₂ = √(5 − 1) = 2
L = [[2, 0], [1, 2]]; L Lᵀ = [[4, 2], [2, 1+4]] = [[4, 2], [2, 5]] ✓
A 3×3 check, A = [[4, 12, −16], [12, 37, −43], [−16, −43, 98]]:
l₁₁ = √4 = 2
l₂₁ = 12/2 = 6
l₃₁ = −16/2 = −8
l₂₂ = √(37 − 6²) = √1 = 1
l₃₂ = (−43 − (−8)(6)) / 1 = 5
l₃₃ = √(98 − (−8)² − 5²) = √9 = 3
L = [[2, 0, 0], [6, 1, 0], [−8, 5, 3]]
check row 3 of L Lᵀ: [−8·2, −8·6 + 5·1, 64 + 25 + 9] = [−16, −43, 98] ✓
log det A = 2·Σ log l_ii = 2·ln(2·1·3) = 2·ln 6 ≈ 3.5835
direct check: det A = 36, and ln 36 ≈ 3.5835 ✓
(the square roots are exactly why positive definiteness is required)
Gaussian processes use both facts: the predictive mean needs Kα = y, solved once from the Cholesky factor, and the marginal likelihood needs log det K, which the diagonal of L gives for free. Ridge regression does the same trick for (XᵀX + λI)w = Xᵀy.