Matrix Calculator
Add, multiply, transpose, and find the determinant and inverse of a matrix online.
About this calculator
A matrix calculator performs the core operations of linear algebra: addition and subtraction, multiplication, scalar multiplication, transpose, determinant and inverse for square matrices. Set the size, type in the numbers, and pick an operation to see the result matrix instantly.
You choose the number of rows and columns (up to 5×5), fill in the entries, and pick an operation. Addition and subtraction work entry by entry on two matrices of the same size; multiplication takes the dot product of each row of the first matrix with each column of the second, so the first matrix’s column count must equal the second’s row count. Transpose flips rows and columns, while the determinant and inverse apply only to square matrices — and the inverse exists only when the determinant is not zero.
For a worked example, the 2×2 matrix [[1, 2], [3, 4]] has determinant 1·4 − 2·3 = -2, and because that is non-zero it has an inverse, (1/-2)·[[4, -2], [-3, 1]] = [[-2, 1], [1.5, -0.5]]. Its transpose is [[1, 3], [2, 4]]. Students and engineers use it for solving linear systems, transforming coordinates and vectors, computer graphics, and checking linear-algebra homework quickly.
Frequently asked questions
What size matrices are supported?
You can set rows and columns from 1×1 up to 5×5 for each matrix. Determinant and inverse require a square matrix.
Why can’t I multiply my two matrices?
Matrix multiplication requires the number of columns of the first matrix to equal the number of rows of the second. The calculator tells you when the sizes don’t match.
When does a matrix have no inverse?
A square matrix has no inverse when its determinant is zero — it is called singular. The calculator reports this instead of a result.
How do I find the determinant of a 2×2 or 3×3 matrix?
Set the matrix to square, enter the numbers and choose the determinant operation. For a 2×2 it computes ad − bc; for a 3×3 it expands along a row. A zero result means the matrix is singular and has no inverse.
What is the transpose of a matrix?
The transpose swaps rows and columns, so the entry in row i, column j moves to row j, column i. A 2×3 matrix becomes 3×2. Choose the transpose operation to see it for any size.
How does scalar multiplication work?
Every entry of the matrix is multiplied by the same number, so multiplying [[1, 2], [3, 4]] by 3 gives [[3, 6], [9, 12]]. It scales the whole matrix without changing its shape.
Is matrix multiplication commutative?
No. In general A×B is not the same as B×A, and one order may be valid while the other is not defined at all, because multiplication depends on the columns of the first matrix matching the rows of the second.
Results are estimates for general guidance only, not financial, medical or tax advice.