detA=∑n!terms±a1,αa2,βa3,γ⋯an,ω
where (α,β,γ,⋯,ω) is some permutation of (1,2,3,⋯,n)
e.g. 2 x 2 matrix
∣∣∣∣∣acbd∣∣∣∣∣=∣∣∣∣∣ac0d∣∣∣∣∣+∣∣∣∣∣0cbd∣∣∣∣∣=∣∣∣∣∣ac00∣∣∣∣∣+∣∣∣∣∣a00d∣∣∣∣∣+∣∣∣∣∣0cb0∣∣∣∣∣+∣∣∣∣∣00bd∣∣∣∣∣
=0+ad−bc+0=ad−bc
e.g. 3 x 3 matrix
∣∣∣∣∣∣∣adgbehcfi∣∣∣∣∣∣∣
=∣∣∣∣∣∣∣a000e000i∣∣∣∣∣∣∣+∣∣∣∣∣∣∣a0000h0f0∣∣∣∣∣∣∣+∣∣∣∣∣∣∣0d0b0000i∣∣∣∣∣∣∣+∣∣∣∣∣∣∣00gb000f0∣∣∣∣∣∣∣+∣∣∣∣∣∣∣0d000hc00∣∣∣∣∣∣∣+∣∣∣∣∣∣∣00g0e0c00∣∣∣∣∣∣∣
=aei−afh−bdi+bfg+cdh−ceg
detA=a11C11+a12C12+⋯+a1nC1n
e.g. 3 x 3 matrix
∣∣∣∣∣∣∣adgbehcfi∣∣∣∣∣∣∣
=∣∣∣∣∣∣∣a000eh0fi∣∣∣∣∣∣∣+∣∣∣∣∣∣∣0dgb000fi∣∣∣∣∣∣∣+∣∣∣∣∣∣∣0dg0ehc00∣∣∣∣∣∣∣
=a(det∣∣∣∣∣ehfi∣∣∣∣∣)+b(−det∣∣∣∣∣dgfi∣∣∣∣∣)+c(det∣∣∣∣∣dgeh∣∣∣∣∣)
=a(ei−fh)+b(−di+fg)+c(dh−eg)
=aei−afh−bdi+bfg+cdh−ceg