Skip to content
CALX
Appearance

Appearance

Light or dark

Colour
Accessibility

Matrix calculator, 2×2 and 3×3: determinant, inverse, system

Determinant, inverse, transpose, products AB and BA, and linear system solving, with singularity detected at a relative threshold.

Parameters

Matrix A

Result

Awaiting the quantities required for the calculation.

Calculation, assumptions and sources

Overview2×2 and 3×3 matrices: determinant and trace, inverse by the cofactor matrix, transpose, products AB and BA, solving the system A·x = b.

2×2 and 3×3 matrices: determinant and trace, inverse by the cofactor matrix, transpose, products AB and BA, solving the system A·x = b. A singular matrix is detected by a threshold relative to its scale; it has no inverse, and its system has zero or infinitely many solutions.

Method & formulasdet(2×2) = ad − bc
det(2×2) = ad − bcdet(3×3): cofactor expansion along the first rowA⁻¹ = cofactor(A)ᵀ / det(A)A·x = b ⇒ x = A⁻¹·b

If the determinant is non-zero, the matrix is invertible and the system has a unique solution. If it is zero, the matrix flattens a direction: no inverse, no unique solution.

Determinant
the area factor (2×2) or volume factor (3×3) of the transformation; its sign says whether it flips orientation.
Trace
the sum of the diagonal terms.
Singular
of zero determinant: the transformation flattens space, two distinct points can merge.
Cofactor matrix
the matrix of cofactors; its transpose divided by the determinant gives the inverse.
Validity domainCofactor formulas suit sizes 2 and 3; beyond, their cost grows fast and Gaussian elimination or decompositions take over.

Cofactor formulas suit sizes 2 and 3; beyond, their cost grows fast and Gaussian elimination or decompositions take over. The singularity threshold is relative to the matrix’s scale: a determinant of 10⁻⁶ is zero for a matrix in the millions, non-zero for one in the thousandths. Near the threshold, floating-point arithmetic cannot tell a zero from a near-zero; a warning then replaces the inverse.

Reading the resultIn general AB ≠ BA: rotating then stretching is not stretching then rotating.

In general AB ≠ BA: rotating then stretching is not stretching then rotating. A singular system has no solution if its equations contradict each other, infinitely many if they repeat.