Let the matrix be
[
begin{pmatrix}
a & b & c \
d & e & f \
g & h & i
end{pmatrix}
]
Use the formula
[
det = a(ei – fh) – b(di – fg) + c(dh – eg)
]
Multiply each top-row entry by the determinant of its 2×2 minor
Alternate the signs as (+), (-), (+)
Add the three signed results together
