🔢 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.

Written and reviewed by SM Arijul Islam · Last reviewed · Editorial standards · Report an error

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.

OperationWhat it meansRequirement
DeterminantA single number describing how the matrix scales volume; zero means it cannot be inverted.A must be square
InverseThe matrix that undoes A, so A × A⁻¹ is the identity matrix.A square, determinant ≠ 0
AdjugateThe transpose of the cofactor matrix. A⁻¹ = adj(A) ÷ det(A).A must be square
TransposeRows become columns and columns become rows.Any shape
TraceThe sum of the main diagonal, from top-left to bottom-right.A must be square
RankHow many rows are genuinely independent — the size of the largest non-zero determinant inside A.Any shape
RREFReduced row echelon form: leading 1s with zeros above and below, the standard form for solving systems.Any shape
A + B, A − BEntry-by-entry addition or subtraction.A and B the same shape
A × BRow-by-column multiplication — you can only multiply when A's columns match B's rows.A columns = B rows
Solve A x = bFinds the vector x that satisfies the linear system, or reports that none or infinitely many exist.A square
Determinants, inverses and row reduction all run through Gaussian elimination with partial pivoting, which is more stable than expanding cofactors by hand. Results are shown to six decimals and values smaller than 1 × 10⁻¹⁰ are treated as zero, so rounding noise never leaves a stray 0.0000000001 behind.

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

Determinant, inverse, adjugate, transpose, trace, rank, reduced row echelon form, powers, scalar multiplication, addition, subtraction, multiplication and solving A x = b.
A singular matrix has a determinant of zero, which means its rows are linearly dependent and no inverse exists.
The number of linearly independent rows or columns. It shows whether a system has a unique solution, no solution or infinitely many.
Reducing a matrix to reduced row echelon form is the standard systematic method for solving systems of equations.

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

Worked determinants of simple two by two matrices
MatrixDeterminant
[[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

When the number of columns in the first matrix equals the number of rows in the second. An m by n matrix multiplies an n by p matrix to give m by p.
It is a single number describing a square matrix. Zero means the matrix is singular and has no inverse, while a non-zero value means it is invertible.
A square matrix with ones on the main diagonal and zeros everywhere else. Multiplying by it leaves a matrix unchanged.
Solving systems of simultaneous equations, computer graphics transforms, network and population modelling, statistics, and most of machine learning.

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.

Related calculators