Determinants
Determinant by Cofactor Expansion
Compute the determinant of a 3x3 matrix by expanding along row 1. For each entry a_1j, the 2x2 minor M_1j is computed by deleting row 1 and column j; the cofactor is C_1j = (-1)^(1+j) * M_1j. An accumulator collects the products a_1j * C_1j one term at a time.
cofactor expansion
det(A) = sum over j of a_1j * C_1j, where C_1j = (-1)^(1+j) * M_1j and M_1j is the determinant of the 2x2 submatrix formed by deleting row 1 and column j.