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.
SupernodeColumnsRows below themFull row list
S11, 24, 91, 2, 4, 9
S234, 63, 4, 6
S34, 5, 694, 5, 6, 9
S47, 89, 107, 8, 9, 10
S59, 10none9, 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.

Tree on the columnsTree of fronts S5S3S4S1S2 10965487213 S5S3S4S1S2 9, 104, 5, 67, 81, 23
  • 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

12491249 4252325000
Pivot block (rows and columns 1, 2). Filled from A. Becomes the diagonal part of L.
Below block (rows 4, 9; columns 1, 2). Filled from A. Becomes the rest of these columns of L.
Trailing block (rows and columns 4, 9). Starts at zero. Does not belong to S1's columns at all: it collects what S1 owes to later columns, and leaves as the update matrix U1.
The left part of a front (pivot and below blocks) is exactly the supernode's block from the supernodal method. The trailing block is the extra piece that only the multifrontal method has.

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.

#OperationActs onBeforeAfter
1Assemblewhole frontemptyentries of A, zeros in the trailing block
2Dense Cholesky (POTRF)pivot block, rows 1, 2[4; 2 5][2; 1 2]
3Triangular solve (TRSM)below block, rows 4, 9[2 3; 2 5][1 1; 1 2]
4Update (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.

FrontReceives (inputs)Produces (output)Indices of the outputSends it to
S1nothing, it is a leafU14, 9S3
S2nothing, it is a leafU24, 6S3
S3U1, U2U39S5
S4nothing, it is a leafU49, 10S5
S5U3, U4nothing, it is the root
The indices of an update matrix are always the below rows of the supernode that made it. U1 has indices 4, 9 because those are S1's below rows.

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 frontFrom AFrom U1From U2Value S3 works with
(4,4)7−2−14
(6,4)4−22
(6,6)10−46
(9,4)5−32
(9,9), trailing0−5−5, kept for S5
(5,4), (5,5), (6,5), (9,5), (9,6)2, 5, 3, 3, 4unchanged
A front = the entries of A for its own columns + everything the columns below it in the tree owe to it. The second part is delivered by the children's update matrices.

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:

MomentWhere the (9,9) value livesValue
S1 forms U1U1, entry (9,9)−5
S3 assembles from Atrailing slot of S3's front0
S3 extend-adds U1trailing slot of S3's front0 + (−5) = −5
S3 factors and solvestrailing slot, untouched−5
S3 forms U3U3, its only entry−5 − 3 = −8
S4 forms U4U4, entry (9,9)−2
S5 assembles from Apivot block of S5's front14
S5 extend-adds U3, then U4pivot block of S5's front14 − 8 − 2 = 4
S5 factorsfinal 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

written in this step read in this step finished entry of L entry of A, or assembled value

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.

SupernodalMultifrontal
Working block for S14 × 2 rectangle4 × 4 front (rectangle + trailing block)
Where S1's update goesstraight into S3's storage and into S5's storageinto its own trailing block, then to S3 only, as U1
Who a supernode talks toevery later supernode it affectsits parent only
How (9,9) is updatedthree separate direct updates: from S1, S3, S4two update matrices: U3 (S1 and S3 merged) and U4
Is A modified in place?yes, the blocks are updated where they sitno, A is only read; all work is in fronts
Extra memorylittlethe stack of update matrices