Skip to content

Matrix Calculator

Choose the size, fill in the entries and pick an operation. Row operations and cofactor expansions are shown step by step.

A

Entries can be fractions or expressions like 1/2, -3, √2 or 2π.

Operations available

OperationRequirementNotes
DeterminantSquare matrixZero means the matrix is singular
InverseSquare, determinant ≠ 0A·A⁻¹ = I
TransposeAny sizeSwaps rows and columns
RREF and rankAny sizeRow reduction with each row operation shown
Multiply A × BColumns of A = rows of BOrder matters: AB is usually not BA
Add and subtractSame sizeEntry by entry
Power Aⁿ and scalar k·ASquare for powersRepeated multiplication

Example: determinant and inverse of a 2×2

A = [[2, 1], [5, 3]]

  1. det(A) = ad − bc = 2·3 − 1·5 = 1.
  2. For [[a, b], [c, d]] the inverse is (1/det) · [[d, −b], [−c, a]].
  3. A⁻¹ = [[3, −1], [−5, 2]].
  4. Check: A·A⁻¹ = [[6 − 5, −2 + 2], [15 − 15, −5 + 6]] = [[1, 0], [0, 1]].

Answer: det = 1, inverse = [[3, −1], [−5, 2]]

When a matrix has no inverse

If det(A) = 0 the matrix is singular and has no inverse. In a system of equations this means the equations are either dependent or inconsistent. The matrix calculator tells you the determinant is 0 and that the matrix is singular.

Rank and row reduction

The rank is the number of non-zero rows left after reduction to row echelon form, and equals the number of independent rows. A 3×3 matrix with rank 2 has determinant 0. Row reduction is also how a system Ax = b is solved by Gauss–Jordan elimination.

Multiplying matrices

Each entry of AB is the dot product of a row of A with a column of B. A 2×3 matrix times a 3×4 matrix gives a 2×4 matrix, but swapping the order is not even possible here, because 4 ≠ 2.

Frequently asked questions

What is the largest size supported?

Up to 6×6 for the operations that need a square matrix, and any size up to 6×6 for the others.

Other calculators