Browse All Calculators

Matrix Calculator

Free matrix calculator to add, subtract, multiply, transpose and invert matrices, or find the determinant, rank and RREF. Exact fractions with step-by-step working.

100% Free
No Sign-up
Instant Results
Works on Mobile

Matrix Calculator

Operation
Matrix A
×
Matrix B
×
Step-by-step working
  1. A and B are both 3×3, so they can be added entry by entry.
  2. Row 1: (1 + 1, 2 + 0, 3 + 2) = (2, 2, 5).
  3. Row 2: (0 + 3, 1 + 1, 4 + 0) = (3, 2, 4).
  4. Row 3: (5 + 2, 6 + 4, 0 + 1) = (7, 10, 1).
A + B
2
2
5
3
2
4
7
10
1
Size 3×3
Properties of the result
Size
3×3
Determinant
54
Rank
3
Trace
5
Check your answer
  • A + B = B + A: confirmed.
Quick note
All results are exact. Use the Decimals button to see rounded values, and change the sizes with the Rows and Columns menus.
Matrix Calculator - add, multiply, invert and find determinants of matrices online on HighCalc

Matrix Calculator: Add, Multiply, Invert and More

This free matrix calculator works with matrices from 1×1 up to 6×6. Enter the numbers, choose an operation, and you get the result straight away along with its size, determinant, rank and trace. It can add, subtract and multiply matrices, scale a matrix by a number, transpose it, find a determinant or an inverse, and reduce a matrix to its row echelon form. Every answer keeps exact fractions and comes with step-by-step working.

Quick answer: the matrix [[1, 2, 3], [0, 1, 4], [5, 6, 0]] has a determinant of 1, so its inverse exists and is [[−24, 18, 5], [20, −15, −4], [−5, 4, 1]]. Multiplying the two gives the identity matrix, which is how the calculator confirms the result.

What Is a Matrix?

A matrix is a rectangular grid of numbers arranged in rows and columns. A matrix with 3 rows and 2 columns is called a 3×2 matrix. Matrices are used to store data, describe transformations such as rotations and scaling, and write whole systems of equations in a compact form. If you only need to solve equations, the linear equations calculator does that directly.

How Each Operation Works

Addition and subtraction are done entry by entry and need matrices of the same size. Multiplying by a number scales every entry. Matrix multiplication is different: each entry of the result is a row of the first matrix combined with a column of the second, so the number of columns in A must match the number of rows in B. The transpose swaps rows and columns, so a 2×3 matrix becomes 3×2. The table shows a few examples.

OperationExampleResult
AddA + B with A = [[1, 2, 3], [0, 1, 4], [5, 6, 0]] and B = [[1, 0, 2], [3, 1, 0], [2, 4, 1]][[2, 2, 5], [3, 2, 4], [7, 10, 1]]
Multiply[[1, 2], [3, 4]] × [[0, 1], [1, 0]][[2, 1], [4, 3]]
Multiply (reversed)[[0, 1], [1, 0]] × [[1, 2], [3, 4]][[3, 4], [1, 2]]
Determinant[[4, 7], [2, 6]]4×6 − 7×2 = 10
Inverse[[4, 7], [2, 6]][[3/5, −7/10], [−1/5, 2/5]]
Rank[[1, 2, 3], [2, 4, 6], [1, 0, 1]]2

Order Matters in Multiplication

With ordinary numbers, 3 × 5 and 5 × 3 are the same. With matrices they usually are not. In the examples above, swapping the two matrices swaps the columns of the answer in one case and the rows in the other. Always check which matrix is A and which is B before reading the result.

Determinant and Inverse

The determinant is a single number worked out from a square matrix. When it is zero the matrix is singular and cannot be inverted. When it is not zero, the inverse exists and multiplying a matrix by its inverse gives the identity matrix. For a 2×2 matrix the determinant is ad − bc, and the inverse swaps the diagonal, changes the signs of the other two entries and divides by the determinant. Larger matrices are handled by exact row reduction, so the results stay as clean fractions.

Rank and Row Reduction

Row reduction uses simple operations, such as swapping rows or adding a multiple of one row to another, to bring a matrix to reduced row echelon form. The number of leading entries, called pivots, is the rank of the matrix. A square matrix has full rank exactly when its determinant is not zero. If you are working with polynomials or other expressions rather than grids of numbers, the polynomial calculator may be the better fit.

Who Uses a Matrix Calculator?

Students use it to check homework in algebra and linear algebra. Programmers and engineers use matrices in graphics, simulations and data work. Economists and scientists use them to model systems with many connected variables. For arithmetic with fractions, try the fraction calculator, and for general problems the math solver or the scientific calculator.

How to Use This Matrix Calculator

1

Pick an operation

Choose from add, subtract, multiply, scale, transpose, determinant, inverse, rank or RREF.

2

Set the sizes

Use the row and column menus to set each matrix between 1×1 and 6×6.

3

Enter the numbers

Fill in each cell with a whole number, decimal or negative. The result updates as you type.

4

Read the result and the working

See the answer, its properties, a check and the steps. Switch between fractions and decimals.

Features

Instant Results
The answer updates as you type
Exact Fractions
No rounding, with a decimal view when you want it
Nine Operations
Add, multiply, invert, determinant, rank and more
Matrices up to 6×6
Set rows and columns for each matrix
Step-by-Step Working
Follow the method and a built-in check
Mobile Friendly
Works smoothly on phones, tablets and desktops
Frequently Asked Questions
Common questions about the Matrix Calculator.
How do I multiply two matrices?
Each entry of the product is a row of the first matrix multiplied by a column of the second, with the products added up. The number of columns in A must equal the number of rows in B. For example, a 3×3 matrix times a 3×3 matrix gives a 3×3 matrix. Choose Multiply, enter both matrices and the calculator shows the size check and the first entries worked out.
Why can't I add or subtract matrices of different sizes?
Addition and subtraction work entry by entry, so every position in A needs a matching position in B. That only happens when both matrices have the same number of rows and columns. If the sizes differ, the calculator tells you which sizes it found instead of returning a wrong answer.
When does a matrix have an inverse?
Only a square matrix with a determinant that is not zero has an inverse. A matrix with determinant zero is called singular, and its rows or columns depend on each other. When that happens the calculator shows that no inverse exists. When the inverse does exist it is checked by multiplying A by A⁻¹, which must give the identity matrix.
What does the determinant tell me?
The determinant is a single number worked out from a square matrix. If it is zero the matrix cannot be inverted and the system of equations it represents has no single solution. For a 2×2 matrix it is ad − bc. The matrix [[4, 7], [2, 6]] has a determinant of 4×6 − 7×2 = 10. In a 2D transformation it also shows how much areas are scaled.
What are rank and RREF?
RREF is the reduced row echelon form, the tidy version of a matrix produced by row operations, with a leading 1 in each pivot row. The rank is the number of pivots, which tells you how many rows are truly independent. A 3×3 matrix with rank 2, such as [[1, 2, 3], [2, 4, 6], [1, 0, 1]], has a determinant of zero.
How big can the matrices be, and are fractions supported?
Each matrix can be anywhere from 1×1 up to 6×6. You can type whole numbers, decimals or negatives. Results are calculated with exact fractions, so a value such as 3/5 is not rounded. Use the Decimals button above the result if you would rather see decimal values.