Matrix Calculator
Choose an operation, set the size of each matrix and fill in the boxes. Answers are exact fractions, and the page explains when an operation is not possible.
Matrix A
Matrix B
Empty boxes count as 0. Fractions such as 1/2 are fine.
Worked examples
Multiplying two 2 by 2 matrices
(1 2; 3 4) × (5 6; 7 8)
(19 22; 43 50)
1×5 + 2×7 = 19, and so on.
An inverse
Inverse of (1 2; 3 4)
(-2 1; 3/2 -1/2)
The determinant is 1×4 - 2×3 = -2.
About Matrix Calculator
A matrix is a rectangular grid of numbers. Matrices describe systems of equations, geometric transformations, networks and tables of data, and they are a core topic in further maths and university courses. Two matrices of the same size can be added or subtracted entry by entry. They can be multiplied when the number of columns in the first matches the number of rows in the second, and the order matters: A times B is generally not the same as B times A.
A square matrix has a determinant, a single number that tells you whether it can be inverted. If the determinant is zero there is no inverse. Everything on this page is worked in exact fractions, so an inverse such as 3/2 and -1/2 comes out exactly, and the page multiplies the matrix by its inverse to show the identity matrix as a check. You can also find the transpose, the trace, the rank with the reduced row echelon form, and a whole-number power of a square matrix. Sizes go up to 4 by 4, and the page explains clearly when an operation is not possible.
How to use Matrix Calculator
- Choose the operation from the list.
- Set the number of rows and columns for matrix A, and for B if the operation needs it.
- Type the numbers into the grids. Empty boxes count as 0.
- Read the result, which appears below as a grid or a single number.
Common uses
- Checking matrix multiplication homework
- Finding the inverse for solving equations
- Checking whether a set of equations has a unique solution
- Further maths and engineering coursework
Frequently asked questions
When can I multiply two matrices?
When the number of columns in A equals the number of rows in B. A 2 by 3 matrix times a 3 by 4 matrix gives a 2 by 4 matrix.
What is a determinant?
It is a single number worked out from a square matrix. For a 2 by 2 matrix with rows (a, b) and (c, d) it is ad - bc. A matrix with a determinant of zero has no inverse.
What is the rank of a matrix?
It is the number of independent rows, found by reducing the matrix to row echelon form and counting the non-zero rows. A square matrix has an inverse only when its rank equals its size.
What is the trace?
The sum of the numbers on the main diagonal, from the top left to the bottom right, of a square matrix.
Are the answers exact?
Yes. Entries are handled as fractions, so there is no rounding error. A decimal such as 0.5 is read as 1/2.