Multifrontal Cholesky: the whole method on one 10 × 10 example
A guide that follows the method in the order it actually runs, with one short section for each point that tends to cause confusion, followed by an interactive walk-through of all 22 steps with their arithmetic.
1. The matrix
A is symmetric positive definite, 10 × 10. We want L with A = L·Lᵀ. Only the lower triangle is shown; blank positions are zeros. Here L has nonzeros in exactly the same positions as A, so there is no fill-in to worry about.
A (lower triangle)
L (the answer)
2. Supernodes: how the columns are cut
Is a supernode a list of nodes or of columns? Is the cut the same as in the supernodal method?
Both, and yes. Column j of the matrix and node j of the tree are the same object, so a supernode is a group of consecutive columns, or equally a group of tree nodes. The dashed lines in the figures above cut the ten columns into S1 to S5.
- Columns go in the same supernode when their nonzero patterns nest: each column has the rows of the previous one, minus its own diagonal. That makes the group a dense block with no holes.
- Every column belongs to exactly one supernode.
- The cut is decided from the pattern alone, before any arithmetic, so the supernodal and the multifrontal method start from the same S1 to S5.
| Supernode | Columns | Rows below them | Full row list |
|---|---|---|---|
| S1 | 1, 2 | 4, 9 | 1, 2, 4, 9 |
| S2 | 3 | 4, 6 | 3, 4, 6 |
| S3 | 4, 5, 6 | 9 | 4, 5, 6, 9 |
| S4 | 7, 8 | 9, 10 | 7, 8, 9, 10 |
| S5 | 9, 10 | none | 9, 10 |
3. The tree: from columns to fronts
How is the tree of fronts constructed?
First a tree on the columns: the parent of column j is the row of its first nonzero below the diagonal in L. Column 1 has rows 2, 4, 9 below it, so its parent is 2. Column 2 has rows 4, 9, so its parent is 4. And so on.
Then each supernode (dashed box) is collapsed into one node. Only the arrows that leave a box survive.
- A new supernode must start wherever two branches meet. Node 4 has two children (2 and 3), and node 9 has two children (6 and 8).
- The parent of a front is the front that owns its first below row. S1's below rows are 4, 9; column 4 is in S3; so S3 is the parent of S1.
- Fronts are processed children first: S1, S2, S3, S4, S5.
4. What a front is
Each supernode gets its own small dense square matrix, the front. It has one row and one column for every index in the supernode's row list. S1's row list is 1, 2, 4, 9, so its front is 4 × 4. It has three regions, and each region has one job.
Front of S1, just assembled
5. The four operations on a front, in order
Do we do the Cholesky on top, then SYRK below it?
Almost. The triangular solve has to come between them, because SYRK must be applied to finished entries of L, not to the raw values. Here is S1 with its numbers.
| # | Operation | Acts on | Before | After |
|---|---|---|---|---|
| 1 | Assemble | whole front | empty | entries of A, zeros in the trailing block |
| 2 | Dense Cholesky (POTRF) | pivot block, rows 1, 2 | [4; 2 5] | [2; 1 2] |
| 3 | Triangular solve (TRSM) | below block, rows 4, 9 | [2 3; 2 5] | [1 1; 1 2] |
| 4 | Update (SYRK) | trailing block | [0; 0 0] | [−2; −3 −5] = U1 |
Step 4 multiplies the finished below block by its own transpose, which gives [2; 3 5], and subtracts that from the trailing block. If SYRK were run on the raw below block [2 3; 2 5] it would give [13; 19 29], which is wrong.
After step 4 the pivot and below blocks are copied out as final columns of L, the trailing block is kept as U1, and the front is thrown away.
6. Naming: U1 is what S1 made
S3 has index 9, so shouldn't that be U3? Why is it added to U1?
The number in the name says who produced the matrix, not where it is used. And the direction is: a child's U is added into the parent's front. Nothing is ever added to a U.
So for S3: U1 and U2 are inputs, made earlier by its children. U3 is its output, and does not exist until S3 has finished its four operations.
| Front | Receives (inputs) | Produces (output) | Indices of the output | Sends it to |
|---|---|---|---|---|
| S1 | nothing, it is a leaf | U1 | 4, 9 | S3 |
| S2 | nothing, it is a leaf | U2 | 4, 6 | S3 |
| S3 | U1, U2 | U3 | 9 | S5 |
| S4 | nothing, it is a leaf | U4 | 9, 10 | S5 |
| S5 | U3, U4 | nothing, it is the root |
7. Where an update matrix goes
U1 has indices 4 and 9. Why is it for S3 and not for S5?
An update matrix goes, whole, to the front that owns its first index. U1's first index is 4, and column 4 belongs to S3. That front is always the parent in the tree.
- Why the first index: column 4 is the next one to be eliminated among those S1 affects, so it needs S1's contribution soonest.
- Why index 9 goes along: S3's front has a slot for index 9 too (its row list is 4, 5, 6, 9), so U1 does not need to be split. S3 carries that part for S5.
- Why it always fits: a child's below rows are always contained in its parent's row list. S1's below rows {4, 9} are inside S3's {4, 5, 6, 9}.
Adding a U into a front is called extend-add: each entry is added at the position that has the same row and column labels.
8. Why the children's U must be added
S3's front is assembled from A. Why are U1 and U2 then added to it?
Because the entries of A alone are not what S3 has to factor. Look at entry (4,4) in the ordinary Cholesky formula:
ℓ4,4 = √(a4,4 − ℓ4,1² − ℓ4,2² − ℓ4,3²) = √(7 − 1 − 1 − 1) = √4 = 2
The front starts with a4,4 = 7. The subtractions for columns 1 and 2 arrive inside U1 (as −2), and the one for column 3 inside U2 (as −1). Without them S3 would compute √7.
| Entry of S3's front | From A | From U1 | From U2 | Value S3 works with |
|---|---|---|---|---|
| (4,4) | 7 | −2 | −1 | 4 |
| (6,4) | 4 | −2 | 2 | |
| (6,6) | 10 | −4 | 6 | |
| (9,4) | 5 | −3 | 2 | |
| (9,9), trailing | 0 | −5 | −5, kept for S5 | |
| (5,4), (5,5), (6,5), (9,5), (9,6) | 2, 5, 3, 3, 4 | unchanged |
9. Following index 9 all the way up
Entry (9,9) is the best one to follow, because columns from three different supernodes contribute to it. The full formula is
ℓ9,9 = √(14 − (1 + 4) − (1 + 1 + 1) − (1 + 1)) = √4 = 2
with 5 from S1 (columns 1, 2), 3 from S3 (columns 4, 5, 6) and 2 from S4 (columns 7, 8). This is how those pieces travel:
| Moment | Where the (9,9) value lives | Value |
|---|---|---|
| S1 forms U1 | U1, entry (9,9) | −5 |
| S3 assembles from A | trailing slot of S3's front | 0 |
| S3 extend-adds U1 | trailing slot of S3's front | 0 + (−5) = −5 |
| S3 factors and solves | trailing slot, untouched | −5 |
| S3 forms U3 | U3, its only entry | −5 − 3 = −8 |
| S4 forms U4 | U4, entry (9,9) | −2 |
| S5 assembles from A | pivot block of S5's front | 14 |
| S5 extend-adds U3, then U4 | pivot block of S5's front | 14 − 8 − 2 = 4 |
| S5 factors | final entry of L | √4 = 2 |
The trailing slot of S3's front is U3 under construction. U1 deposits its share there, S3 adds its own, and only then is the result named U3. S1 never talks to S5 directly.
10. The stepper: all 22 steps with their arithmetic
Use Next and Back, the arrow keys, or the dots. Click a computation line or a cell of the front to match them up.
A, and L as it is produced
Tree of fronts
Current front
Update matrices waiting on the stack
Computation
11. Versus the supernodal method
Same matrix, same supernodes, same tree, same dense kernels, same L. The only difference is the route an update takes.
| Supernodal | Multifrontal | |
|---|---|---|
| Working block for S1 | 4 × 2 rectangle | 4 × 4 front (rectangle + trailing block) |
| Where S1's update goes | straight into S3's storage and into S5's storage | into its own trailing block, then to S3 only, as U1 |
| Who a supernode talks to | every later supernode it affects | its parent only |
| How (9,9) is updated | three separate direct updates: from S1, S3, S4 | two update matrices: U3 (S1 and S3 merged) and U4 |
| Is A modified in place? | yes, the blocks are updated where they sit | no, A is only read; all work is in fronts |
| Extra memory | little | the stack of update matrices |