Matrix 3x3 Determinant
Computes the determinant of a 3x3 matrix from its 9 inline elements.
ā
3Ć3 determinant: Sarrus rule and Laplace expansion
For a 3Ć3 matrix [[a, b, c], [d, e, f], [g, h, i]] the Sarrus rule gives det = aei + bfg + cdh - ceg - afh - bdi: add up the three left-to-right diagonals and subtract the three right-to-left ones. You can also use Laplace cofactor expansion. Expanding along the first row gives det = a(ei - fh) - b(di - fg) + c(dh - eg), the same number written out as 2Ć2 sub-determinants. To see it in numbers: |[1, 2, 3]; [4, 5, 6]; [7, 8, 10]| = 1Ā·(50 - 48) - 2Ā·(40 - 42) + 3Ā·(32 - 35) = 2 + 4 - 9 = -3. The same reading holds here as in any dimension. When det ā 0 the matrix is invertible and the three rows (or columns) are linearly independent; when det = 0 they are coplanar and the matrix is singular. Keep in mind that Sarrus only works for 3Ć3. For 4Ć4 or larger, fall back to Laplace or Gaussian elimination.
Applications
It drives Cramer's rule for 3Ć3 linear systems and gives the volume of the parallelepiped spanned by three 3D vectors (|det|). It's the Jacobian for changes of variable in triple integrals (spherical, cylindrical), an alternative way to get cross product magnitude, and it turns up across 3D computer graphics (orientation tests, ray-triangle intersection). Analytical geometry uses it too, for checking collinearity and coplanarity.
FAQ
Does Sarrus work for 4Ć4? No. The diagonal trick is a coincidence that happens to hold for 3Ć3 and nothing larger. From 4Ć4 onward, use Laplace or row reduction.
What does the sign of the determinant tell me? A positive value says the three vectors form a right-handed, positively oriented basis. Negative means left-handed. Either way, the magnitude is the volume, no matter the sign.
Is there a faster way for large matrices? Yes. Gaussian elimination computes det in O(n³): reduce to triangular form, then multiply the pivots. Laplace, by contrast, is O(n!).
Related Tools
Rent Adjustment Calculator
Compute annual rent adjustment by IGP-M or IPCA accumulated in the last 12 months (manually configurable).
Pregnancy Calculator
Compute estimated due date (EDD), gestational age and trimester from the last menstrual period (LMP).
Fertile Period Calculator
Compute fertile window and ovulation day from the first day of the last cycle and the average cycle length.