MATH · MATRIX
Matrix Calculator
Calculate the determinant or inverse of a 2×2 or 3×3 matrix, or add and multiply two matrices. Guards against singular matrices (det = 0) with a clear error rather than NaN.
About This Calculator
A matrix calculator handles the four core linear-algebra operations for 2×2 and 3×3 square matrices: determinant, inverse, addition, and multiplication. The inverse operation detects a singular matrix (determinant = 0) and returns a clear error rather than dividing by zero.
How It Works
Enter each matrix element row by row (left to right, top to bottom). Select the matrix size (2×2 or 3×3) and the operation. For Add and Multiply, fill in both Matrix A and Matrix B. Results are shown to 4 decimal places where needed.
The Formula
det(2×2): ad − bc det(3×3): a(ei−fh) − b(di−fg) + c(dh−eg) Inverse: adj(A) / det(A)
- A, B
- input matrices
- det(A)
- determinant of A
- adj(A)
- adjugate (transpose of cofactor matrix) of A
Frequently Asked Questions
- What does "singular matrix" mean?
- A matrix is singular when its determinant equals zero. Singular matrices have no inverse because computing it requires dividing by zero. Geometrically, a singular transformation collapses space (it squashes a plane into a line, for example).
- Why is my determinant negative?
- A negative determinant means the linear transformation reverses orientation (like a reflection). It is perfectly valid — only the magnitude matters for most purposes like computing the inverse.
- Can I invert a 4×4 matrix here?
- Only 2×2 and 3×3 are supported. For larger matrices, use a dedicated linear-algebra tool or software like MATLAB, NumPy, or Wolfram Alpha.
- What is the adjugate matrix?
- The adjugate (or classical adjoint) is the transpose of the cofactor matrix. For a 2×2 matrix [[a,b],[c,d]], the adjugate is [[d,−b],[−c,a]]. Dividing by the determinant gives the inverse.