Math · Algebra
Matrix calculator.
Choose 2x2 or 3x3, fill in matrix A (and B for add, subtract or multiply) and pick an operation. Entries can be integers, decimals or fractions like 1/3, and answers stay exact.
For A = [[1, 2], [3, 4]] the determinant is 1×4 − 2×3 = −2, so the inverse exists and is [[−2, 1], [3/2, −1/2]].
Your numbers
Your result
Fill the form and press Calculate.
What each operation does
Addition and subtraction work entry by entry and need matrices of the same size. Multiplication takes each row of A against each column of B: entry (i, j) is the sum of A(i, k) × B(k, j), and in general A × B is not equal to B × A. The determinant of a 2×2 matrix [a b; c d] is ad − bc. For a 3×3 matrix expand along the first row. A matrix has an inverse only if its determinant is not 0. For a 2×2 matrix the inverse is (1 / (ad − bc)) [d −b; −c a]; for 3×3 the inverse is the adjugate divided by the determinant. The transpose swaps rows and columns.
Worked example
A = [[1, 2], [3, 4]]: det = 1 × 4 − 2 × 3 = −2, so A⁻¹ = (1 / −2) [[4, −2], [−3, 1]] = [[−2, 1], [3/2, −1/2]]. With B = [[0, 1], [1, 0]], A × B = [[2, 1], [4, 3]]. For the 3×3 matrix [[2, 0, 1], [1, 3, 2], [1, 1, 2]] the determinant is 6 and the inverse is [[2/3, 1/6, −1/2], [0, 1/2, −1/2], [−1/3, −1/3, 1]]; multiplying it back by the original gives the identity matrix.
Limits
Only 2×2 and 3×3 matrices are supported, and fractions are exact only while the numerators and denominators stay within safe whole-number range. Row reduction (RREF) is not included.
Sources, opened 15 October 2026: OpenStax, Algebra and Trigonometry 2e, 11.5 Matrices and Matrix Operations (rows, columns and matrix operations); OpenStax, Algebra and Trigonometry 2e, 11.7 Solving Systems with Inverses (2×2 inverse A⁻¹ = 1/(ad − bc) [d −b; −c a] where ad − bc ≠ 0); Wikipedia, Determinant (3×3 determinant aei + bfg + cdh − ceg − bdi − afh and the rule of Sarrus).
Frequently asked questions
How do you find the determinant of a 2x2 matrix?
For [a b; c d] it is ad − bc. For [[1, 2], [3, 4]] that is 1 × 4 − 2 × 3 = −2.
When does a matrix have an inverse?
Only when its determinant is not 0. A matrix with determinant 0 is called singular and has no inverse.
How do you multiply two matrices?
Each entry of the product is a row of the first matrix multiplied entry by entry with a column of the second and summed. The number of columns of A must equal the number of rows of B.
Is matrix multiplication commutative?
No. A × B and B × A are usually different, so the order you enter the matrices matters.
Can I enter fractions and decimals?
Yes. Entries such as 1/3 or 0.5 are read as exact fractions, and results are shown as fractions with a decimal in brackets where it differs.
Learning aid
Educational calculator with worked steps. Check answers and the required method against your own course or textbook. Nothing you type leaves your browser.