Quick answer

Each example starts from a symmetric positive definite A, computes L column by column, and checks reconstruction.

Formula

  • A = L Lᵀ
  • Examples: 2×2, 3×3, 4×4 diagonal

Introduction

Copy any matrix below into the Cholesky Decomposition Calculator and compare your handwritten L to the on-screen grid.

Examples progress in size. Master the 2×2 pattern before adding the bookkeeping of a third column.

When an example leaves notation compact, open the formula guide for the full sums. For procedure, see how to perform Cholesky decomposition.

How to read each example

Each setup states A explicitly. Symmetry is visible from equal off-diagonals. SPD is assumed in these curated matrices so square roots stay real.

Working lines show the critical square roots and divisions without repeating every zero above the diagonal in L.

Results list L in matrix form. Multiply L Lᵀ as a separate exercise even when the article already states the answer.

Diagonal SPD examples illustrate that when A is diagonal, L is diagonal with L[i,i] = sqrt(A[i,i]). That special case is worth memorizing.

Non-diagonal examples show how fill-in below the diagonal appears even when A has many zeros.

Use examples as templates: substitute your homework numbers into the same column order.

Formulas referenced in the examples

  • L[i,i] = sqrt( A[i,i] - sum_{k<i} L[i,k]² )
  • L[i,j] = ( A[i,j] - sum_{k<j} L[i,k] L[j,k] ) / L[j,j]

Example 1 uses both rules twice. Example 2 uses them across three columns. Example 3 applies only diagonal square roots.

When verifying, compute (L Lᵀ)[i,j] by dotting row i of L with row j of L because L is lower triangular.

If your reconstruction differs only in the last decimal, compare rounding policies with the calculator display.

How to study these examples

  1. Read the setup A. Confirm symmetry visually.
  2. Follow column 1. Compute the first column of L before touching column 2.
  3. Continue through column n. Finish each diagonal before off-diagonals below it.
  4. Write the final L. Include zeros above the diagonal mentally even if the display omits them.
  5. Verify A = L Lᵀ. At least check one diagonal and one off-diagonal entry.

Three worked matrices

2×2: A = [[4, 2], [2, 3]] gives L = [[2, 0], [1, sqrt(2)]]. Verify (L Lᵀ)[1,2] = L[1,1]L[2,1] = 2 and (L Lᵀ)[2,2] = 1² + (sqrt(2))² = 3.

3×3: A = [[25, 15, -5], [15, 18, 0], [-5, 0, 11]] yields L = [[5, 0, 0], [3, 3, 0], [-1, 1, 3]]. Recompute the (3,3) entry last because it depends on earlier columns.

4×4 diagonal: A = diag(4, 9, 16, 25) gives L = diag(2, 3, 4, 5). This is the fastest check that your sqrt rule is wired correctly.