Matrix Calculator — Determinant, Inverse & More
Choose 2×2 or 3×3, fill in the matrices, and pick an operation. For 4×4 matrices use the Matrix tab in the full Calvo calculator.
How each operation works
- Determinant (2×2): for [[a, b], [c, d]] it is ad − bc. For 3×3, expand along the first row using cofactors.
- Inverse: A¹ exists only when det(A) ≠ 0. It equals the adjugate divided by the determinant. For a 2×2 matrix: (1/det) × [[d, −b], [−c, a]].
- Transpose: swap rows and columns.
- Multiplication: each entry is the dot product of a row of A with a column of B. Order matters: A×B is usually not equal to B×A.
Worked example: for A = [[1, 2], [3, 4]], det = 1×4 − 2×3 = −2, and the inverse is (1/−2) × [[4, −2], [−3, 1]] = [[−2, 1], [1.5, −0.5]].
What a matrix is
A matrix is a rectangular table of numbers arranged in rows and columns. A 2×2 matrix has two rows and two columns, and a 3×3 matrix has three of each. Matrices are used to solve systems of linear equations, to describe transformations in geometry and graphics, and in statistics, physics and computer science. They appear in the maths syllabus of FSc, ICS, A level and in first-year BS courses.
Using this calculator
Pick the size, then type the values of Matrix A (and Matrix B for operations that need two matrices). The boxes start as an identity matrix, with 1 on the diagonal and 0 elsewhere. Empty boxes count as 0. Then press the operation you need. Results are rounded to six decimal places.
A 3×3 determinant, step by step
Take A = [[1, 2, 3], [0, 1, 4], [5, 6, 0]]. Expand along the first row, using the sign pattern + − +:
det(A) = 1 × (1×0 − 4×6) − 2 × (0×0 − 4×5) + 3 × (0×6 − 1×5)
= 1 × (−24) − 2 × (−20) + 3 × (−5)
= −24 + 40 − 15 = 1.
Because the determinant is not 0, the inverse exists. For this matrix it is [[−24, 18, 5], [20, −15, −4], [−5, 4, 1]]. Type A into the calculator and press A¹ to check it.
A matrix with no inverse
For [[1, 2], [2, 4]] the determinant is 1×4 − 2×2 = 0. The second row is exactly twice the first, so the rows are not independent and no inverse exists. Such a matrix is called singular.
Multiplication depends on order
Let A = [[1, 2], [3, 4]] and B = [[0, 1], [1, 0]]. Then A × B = [[2, 1], [4, 3]], but B × A = [[3, 4], [1, 2]]. The two answers are different, so always keep the order the question gives you.
Solving equations with the inverse
The system 2x + y = 5 and x + y = 3 can be written as A X = C, where A = [[2, 1], [1, 1]] and C = [5, 3]. Here det(A) = 1 and A¹ = [[1, −1], [−1, 2]]. Then X = A¹ C gives x = 1×5 − 1×3 = 2 and y = −1×5 + 2×3 = 1. Checking: 2(2) + 1 = 5 and 2 + 1 = 3.
Useful properties
- Multiplying any matrix by the identity matrix leaves it unchanged: A × I = A.
- det(Aᵀ) = det(A), and det(A × B) = det(A) × det(B).
- (A × B)ᵀ = Bᵀ × Aᵀ. The order reverses.
- For a 2×2 matrix, |det| is the area of the parallelogram formed by its two rows. A determinant of 0 means that area collapses to a line.
Common mistakes
- Multiplying entry by entry. Matrix multiplication uses row-by-column dot products.
- Getting the signs wrong in the cofactor expansion. The pattern is + − + along the first row.
- Trying to invert a matrix whose determinant is 0.
- Adding matrices of different sizes. Addition and subtraction need the same size.
FAQ
When does a matrix have no inverse?
When its determinant is 0. Such a matrix is called singular.
Can I multiply matrices of different sizes?
In general yes if the columns of A equal the rows of B, but this page uses square matrices of the same size. Use the full Calvo calculator's Matrix tab for more.
Why is A×B different from B×A?
Matrix multiplication is not commutative. The row-by-column rule gives different results when the order changes.
Does it support 4×4?
The full Calvo calculator supports up to 4×4. This page focuses on 2×2 and 3×3.
What is an identity matrix?
A square matrix with 1 on the main diagonal and 0 everywhere else. It acts like the number 1 in multiplication.
What does the determinant tell me?
It tells you whether the matrix can be inverted (determinant not 0) and, for a 2×2 matrix, how much it scales area.
Are the results exact?
The calculator works in decimals and rounds to six places, so a value like 1/3 appears as 0.333333.
What does the transpose do?
It swaps rows and columns. The first row of A becomes the first column of Aᵀ.