Matrix calculator
Add, subtract and multiply matrices, and compute determinants and transposes.
Calculator inputs
Results
Enter your values and press “Calculate” to see the result.
In short
- What it calculates
- Add, subtract and multiply matrices, and compute determinants and transposes.
- Formula used
2×2 determinant: |A| = a₁₁·a₂₂ − a₁₂·a₂₁- Example
- A = [1 2 3 / 4 5 6 / 7 8 10]
Matrix calculator
Type the matrix the way you would write it on paper: one row per line, values separated by spaces or commas.
Any size is accepted, limited only by how much you can comfortably type.
How it works
The determinant is computed by Gaussian elimination with partial pivoting, a numerically stable method even for large matrices. Addition and subtraction require identical dimensions, and the product requires the columns of A to match the rows of B.
Formula
2×2 determinant: |A| = a₁₁·a₂₂ − a₁₂·a₂₁
Product: cᵢⱼ = Σₖ aᵢₖ · bₖⱼ
Transpose: (Aᵀ)ᵢⱼ = aⱼᵢ
Worked example
A = [1 2 3 / 4 5 6 / 7 8 10]
Gaussian elimination:
|A| = −3
A non-zero determinant means the matrix is invertible.
Explanation
Matrix multiplication is not commutative
A times B rarely equals B times A, and often it cannot even be computed both ways because the dimensions do not match. This is not a mathematical quirk: it reflects that matrices represent transformations, and rotating then scaling does not produce the same result as scaling then rotating.
What they are for outside the classroom
All computer graphics rests on them: every rotation, translation or scaling of an object on screen is a matrix multiplication. Systems of linear equations, Markov chains, the PageRank algorithm and much of machine learning are matrix operations.
The determinant tells you whether an inverse exists
If the determinant is zero, the matrix has no inverse and the associated system has no unique solution. Geometrically it means the transformation flattens space into a lower dimension, and that loss of information cannot be undone.
Rows and columns must match
To multiply, the number of columns in the first must equal the number of rows in the second. The result inherits the rows of the first and the columns of the second. It is the first check to make before calculating anything.
Frequently asked questions
Can I use commas instead of spaces?
Yes. Spaces, commas, semicolons and tabs all work as column separators.
Why is matrix multiplication not commutative?
Because each entry of the result combines a row of A with a column of B; swapping them changes both the dimensions and the products.
Why does my matrix multiplication give an error?
Because the dimensions do not match. The number of columns in the first matrix must equal the number of rows in the second.
What does a determinant of zero mean?
That the matrix has no inverse and the associated system has no unique solution. The transformation reduces dimensions and loses information.
Need to calculate something else?
These tools are often used alongside this calculator.
Quadratic equation
Solve ax² + bx + c = 0 with the discriminant, both roots and the parabola vertex.
Scientific
Trigonometry, logarithms, exponentials and factorials, with a degrees/radians switch.
Linear regression
Least-squares line or plane with coefficients, intervals, prediction, assumption checks and fit and residual…
Average
Paste your list of numbers and get the mean, median, mode, range and standard deviation.
Calculator
Type the whole expression and get the result instantly, brackets and functions included.
Percentage
The four most common percentage calculations in a single tool.