🔢 Matrix Calculator
Enter one or two matrices and compute the determinant, inverse, transpose, sum, difference or product — for 2×2 and 3×3.
Matrix A
Result
-2
Determinant by cofactor expansion; inverse by Gauss–Jordan elimination (a singular matrix, determinant 0, has none). Multiplication is row-by-column. All exact arithmetic runs in your browser. 🔒
How the matrix calculator works
Pick a size and an operation and fill in the numbers. Addition and subtraction work element by element (same size). Multiplication takes the dot product of each row of A with each column of B. The transpose flips rows and columns. The determinant is found by cofactor expansion, and the inverse by Gauss–Jordan elimination — reducing [A | I] until the left side is the identity, leaving A⁻¹ on the right. A matrix with determinant zero is singular and has no inverse; the tool says so.
Determinant and inverse need a square matrix. Matrix multiplication is not commutative — A×B generally differs from B×A — and is only defined when A's column count equals B's row count. Everything is computed with floating-point arithmetic and shown to six significant figures.
Frequently asked questions
How do you multiply two matrices?
Each entry of the product is the dot product of a row of the first matrix with a column of the second: multiply matching elements and add. It's only defined when the first matrix has as many columns as the second has rows, and the result is generally not the same as multiplying them the other way round.
How do you find the determinant of a 3×3 matrix?
Expand along a row using cofactors: multiply each element by the determinant of the 2×2 matrix left after removing its row and column, with alternating + and − signs, and add. This tool does it for you and shows the value.
How do you find the inverse of a matrix?
Augment the matrix with the identity, [A | I], then use Gauss–Jordan elimination to turn the left half into the identity; the right half becomes A⁻¹. It exists only if the determinant is non-zero.
What is a singular matrix?
A square matrix whose determinant is zero. It has no inverse, because its rows (or columns) are linearly dependent — they don't span the full space. The calculator detects this and tells you instead of returning nonsense.
What is the transpose of a matrix?
The matrix you get by swapping rows and columns — element (i, j) becomes (j, i). A 2×3 matrix transposes to 3×2. It's used throughout linear algebra, from dot products to covariance.
Is matrix multiplication commutative?
No. In general A×B ≠ B×A, and often only one of the two is even defined. Order matters, which is why the tool labels the operation A×B specifically.