🔢 Matrix
Advanced Matrix Calculator
Build a matrix up to 4 × 4, choose an operation, and press Calculate. Determinant, inverse, adjugate, transpose, trace, rank, reduced row echelon form, powers, products and linear systems — all worked out in your browser.
What this matrix calculator does
A matrix is a rectangular grid of numbers, and almost every operation on it is a rule for shuffling those numbers in a fixed way. This calculator works on real matrices of up to 4 × 4 and shows the full result, not just a single number, so you can check your own working line by line.
| Operation | What it means | Requirement |
|---|---|---|
| Determinant | A single number describing how the matrix scales volume; zero means it cannot be inverted. | A must be square |
| Inverse | The matrix that undoes A, so A × A⁻¹ is the identity matrix. | A square, determinant ≠ 0 |
| Adjugate | The transpose of the cofactor matrix. A⁻¹ = adj(A) ÷ det(A). | A must be square |
| Transpose | Rows become columns and columns become rows. | Any shape |
| Trace | The sum of the main diagonal, from top-left to bottom-right. | A must be square |
| Rank | How many rows are genuinely independent — the size of the largest non-zero determinant inside A. | Any shape |
| RREF | Reduced row echelon form: leading 1s with zeros above and below, the standard form for solving systems. | Any shape |
| A + B, A − B | Entry-by-entry addition or subtraction. | A and B the same shape |
| A × B | Row-by-column multiplication — you can only multiply when A's columns match B's rows. | A columns = B rows |
| Solve A x = b | Finds the vector x that satisfies the linear system, or reports that none or infinitely many exist. | A square |
Worked example
For the 2×2 matrix A with rows [2, 1] and [1, 3], the determinant is 2 × 3 − 1 × 1 = 5. Because the determinant is non-zero the matrix is invertible, and the inverse is 1/5 × [[3, −1], [−1, 2]]. Set the determinant to zero and the inverse no longer exists.
Everyday uses
- Solving systems of linear equations
- Linear algebra coursework and revision
- Transformations in graphics and robotics
- Engineering and statistics calculations
- Checking a hand-worked answer step by step
Frequently asked questions
More worked examples
- The determinant of a two by two matrix is ad minus bc, so the matrix with rows 3, 8 and 4, 6 has determinant 18 minus 32, which is -14.
- Transposing a two by three matrix gives a three by two matrix.
- Matrix multiplication is not commutative, so AB usually differs from BA.
- A two by three matrix cannot be multiplied by another two by three matrix, because the inner dimensions must match.
Two by two determinants
| Matrix | Determinant |
|---|---|
| [[1,0],[0,1]] | 1 |
| [[2,3],[4,5]] | -2 |
| [[3,8],[4,6]] | -14 |
| [[6,1],[1,6]] | 35 |
| [[5,5],[5,5]] | 0 |
Common mistakes to avoid
- Multiplying matrices element by element. That produces the Hadamard product, which is a different operation entirely.
- Assuming AB equals BA. Matrix multiplication is not commutative, and the two products can even have different shapes.
- Trying to invert a singular matrix. If the determinant is zero the inverse does not exist.
- Forgetting that the identity matrix behaves like the number one under multiplication, leaving any compatible matrix unchanged.
Further questions
Inverse matrix calculator with steps
The inverse of a 2×2 matrix is the adjugate divided by the determinant: for [[a, b], [c, d]], A⁻¹ = 1/(ad − bc) × [[d, −b], [−c, a]]. For 3×3 and larger matrices the same rule applies with cofactors, which is why the intermediate steps matter — one arithmetic slip changes the whole result.
Worked example for [[4, 7], [2, 6]]:
- Determinant: 4 × 6 − 7 × 2 = 24 − 14 = 10
- Adjugate: [[6, −7], [−2, 4]]
- Inverse: [[0.6, −0.7], [−0.2, 0.4]]
A matrix has no inverse when the determinant is zero — the rows are linearly dependent and the transformation collapses a dimension. The calculator reports that case explicitly rather than returning a matrix of infinities.