Matrix calculator with steps: multiply, invert, determinant and more
This matrix calculator adds, subtracts, multiplies, transposes and raises matrices to powers, and finds determinants, inverses, reduced row echelon form (RREF) and eigenvalues, for matrices up to 5 by 5. Answers are exact, with fractions instead of rounded decimals, and every step of the working is shown. Pick an operation, type matrix A (and B if it needs one) and read the answer.
It opens on the eigenvalues of a 2 by 2 matrix. Open the full matrix calculator over this page to try your own.
Matrix Calculator
Multiply, invert and find determinants and eigenvalues
What the matrix calculator does
| Operation | Needs | What you get |
|---|---|---|
| A + B, A − B | Two matrices the same size | The sum or difference, entry by entry |
| A × B | Columns of A = rows of B | The product, with each entry worked out |
| Power | A square matrix and a whole number n | Aⁿ, including negative powers through the inverse |
| Transpose | Any matrix | Aᵀ, rows turned into columns |
| Determinant | A square matrix | det A, by formula, cofactors or row reduction |
| Inverse | A square matrix with det A ≠ 0 | A⁻¹, by formula for 2 by 2 or Gauss-Jordan elimination |
| Row reduce | Any matrix | RREF, with the rank, nullity and pivot columns |
| Eigenvalues | A square matrix | The characteristic polynomial, eigenvalues and eigenvectors |
| 2×2 transformation | A 2 by 2 matrix | What it does to the plane, drawn on a grid |
How to use the matrix calculator
- Choose an operation from the chips at the top of the Matrices section.
- Set the size of A with the rows and columns buttons, from 1 to 5. For square-only operations there is a single size button.
- Type each entry. Whole numbers, decimals and fractions all work: type a slash to make a fraction such as 2/3. New cells start at 0.
- If the operation uses B, set its size and fill it in too. For Power, type n in Power, n.
- Read the answer, then the working underneath. If something can't be done, such as multiplying a 2 by 3 by a 2 by 3, the calculator says why.
- For a quick start, the Examples section loads a ready-made multiplication, inverse, 4 by 4 determinant, row reduction, eigenvalue problem, rotation or shear.
Entries must be numbers or fractions: no letters or square roots. Practice questions on determinants and products, with worked solutions, are under Random problem in the Practice section.
Worked examples you can check in the calculator
Example 1: matrix addition
Add matrices of the same size by adding the entries in matching positions. Writing each matrix row by row, with a semicolon between rows:
The top left entry is 3 + 1 = 4, and so on. Subtraction works the same way. Matrices of different sizes can't be added.
Example 2: multiplying a 2 by 3 and a 3 by 2
To multiply, the number of columns in A must equal the number of rows in B. A 2 by 3 times a 3 by 2 works, and the answer is 2 by 2. Each entry is a row of A times a column of B: multiply matching entries and add.
Take A = [2, 0, 1; 1, 3, −1], a 2 by 3, and B = [1, 2; 0, 1; 4, −1], a 3 by 2:
| Entry of AB | Row of A × column of B | Value |
|---|---|---|
| Row 1, column 1 | 2 × 1 + 0 × 0 + 1 × 4 | 6 |
| Row 1, column 2 | 2 × 2 + 0 × 1 + 1 × (−1) | 3 |
| Row 2, column 1 | 1 × 1 + 3 × 0 + (−1) × 4 | −3 |
| Row 2, column 2 | 1 × 2 + 3 × 1 + (−1) × (−1) | 6 |
So AB = [6, 3; −3, 6]. The calculator shows a line like these for each entry. The matrix multiplication calculator guide goes through the method in more detail.
Example 3: determinant of a 3 by 3 matrix
Choose Determinant and set A to 3 by 3. The calculator expands along the top row, with signs plus, minus, plus. Each entry multiplies the 2 by 2 determinant left when you cover its row and column.
| 2 | 1 | 3 |
| 0 | −1 | 4 |
| 1 | 2 | 0 |
The determinant is −9. A 2 by 2 determinant is ad − bc. For 4 by 4 and 5 by 5, the calculator row reduces to a triangle and multiplies the diagonal, which is much quicker than cofactors.
Example 4: inverse of a 2 by 2 matrix
For a 2 by 2 matrix, swap the two entries on the main diagonal, change the signs of the other two, and divide by the determinant. For A = [4, 7; 2, 6], det A = 4 × 6 − 7 × 2 = 10, so:
| 3/5 | −7/10 |
| −1/5 | 2/5 |
The calculator gives the fractions exactly. For 3 by 3 and bigger it uses Gauss-Jordan elimination, which the inverse matrix calculator guide works through. If the determinant is 0, there is no inverse.
Example 5: solving simultaneous equations with RREF
To solve x + 2y = 5 and 3x − y = 1, write the augmented matrix, with the numbers on the right as a last column, and choose Row reduce:
| Step | Row 1 | Row 2 |
|---|---|---|
| Start | 1, 2, 5 | 3, −1, 1 |
| R2 − 3R1 | 1, 2, 5 | 0, −7, −14 |
| R2 ÷ (−7) | 1, 2, 5 | 0, 1, 2 |
| R1 − 2R2 | 1, 0, 1 | 0, 1, 2 |
The calculator shows each row operation like this. Reading the reduced rows, x = 1 and y = 2. The rank is 2. A rank lower than the number of unknowns means there is no unique solution. For equations typed as equations, the simultaneous equations calculator is quicker.
Example 6: eigenvalues and eigenvectors
The calculator opens on A = [2, 1; 1, 2]. An eigenvector keeps its direction when A acts on it, and the eigenvalue is how much it is stretched. For a 2 by 2 matrix the characteristic polynomial is λ² − (trace)λ + det A. The trace is 2 + 2 = 4 and det A = 3:
The eigenvalues are 1 and 3, with eigenvectors (1, −1) and (1, 1). Check: A times (1, 1) is (3, 3), which is 3 times (1, 1). When the polynomial has no simple roots the calculator gives decimals, and it says when eigenvalues are complex.
Example 7: a 2 by 2 transformation
Choose 2×2 transformation and type A = [0, −1; 1, 0]. The calculator draws the grid before and after and names it: a rotation by 90 degrees anticlockwise. It also gives the area scale factor, which is the size of the determinant. The point (3, 1) goes to (−1, 3). It recognises rotations, reflections, enlargements, stretches and shears.
Try one
Reading the answers
- Determinant 0 means the matrix squashes space flat: it has no inverse, and its rows are not independent.
- The sign of the determinant says whether a transformation flips the plane over (negative) or not (positive).
- Rank is the number of independent rows. For an n by n matrix, rank n means it has an inverse.
- Order matters in multiplication. AB and BA are usually different, and one of them may not exist at all.
- The identity matrix I, 1s down the diagonal and 0s elsewhere, acts like the number 1: AI = IA = A.
Common mistakes
- Multiplying entry by entry. Matrix multiplication is rows times columns, not matching positions.
- Checking the wrong sizes. For A × B, the inside numbers must match: (2 by 3)(3 by 2) works, (2 by 3)(2 by 3) doesn't.
- Swapping the order of a product. A × B and B × A are different calculations.
- Missing the minus sign in the middle term of a 3 by 3 determinant: the signs go plus, minus, plus.
- Dividing by a zero determinant. If det A = 0, there is no inverse, so stop.
- Rounding fractions to decimals part way through row reduction. Keep them as fractions, as the calculator does.
Common questions
What size matrices can the calculator handle?
Can I enter fractions and decimals?
Why does the calculator say my matrices can't be multiplied?
How do I solve a system of equations with this calculator?
What does RREF mean?
Can it find eigenvectors as well as eigenvalues?
Revision cards
Read the front, say your answer, then flip to check.
Where to go next
- Solve it
Matrix Calculator
Multiply, invert and find determinants and eigenvalues
Open the tool - Test it
College Linear Algebra
A new exam-style paper every day, with instant marking and a mark scheme
Start today's paper