No. 064 December 2025.
A CAD kernel in C++, and a working paper
Determinants two ways: cofactor expansion is O(n!), LU is O(n³)
My CAD kernel, written in C++, needed the determinant of a 4 × 4 matrix. Cofactor expansion was the obvious way: expand along the first row and recurse on the minors. Then I read how it scales. Each n × n determinant calls n determinants one size smaller, so the work grows as n!. Factoring A into L and U costs about n³, and the determinant is just the product of U’s diagonal.
det A = Σj (−1)1+j a1j det M1jandA = LU⇒det A = ∏ Uii
The worked example from my notes, factored on this page:
det A = 2 × 4 × (−2.125) = −17
Cofactor expansion agrees: 2(18 − 10) − 2(10 − 40) + 3(5 − 36) = −17. The notes grew into a working paper, still in progress, with its abstract and introduction written; it is listed in the academic record.
what I don’t understand yet
When to pivot. My example never meets a small pivot, but in floating point a tiny one amplifies rounding error. Partial pivoting is in the paper’s plan, and I want to show the error growing numerically before I claim it.