Matrix Calculator
Work through 2x2 and 3x3 matrix operations like inverse, transpose, determinant, rank, trace, adjoint, and decompositions such as QR.
Enter the Details
Result will appear here...
What this calculator does
A matrix is a grid of numbers, and it is the workhorse of linear algebra, the maths behind everything from computer graphics to solving big systems of equations. This is the all-in-one tool for operating on them. Transpose one, find its determinant or inverse, work out its trace, rank or norm, or reach for heavier machinery like a QR or Cholesky decomposition.
It handles one matrix or two, and it runs right here in the browser.
Using the calculator
- Choose one matrix or two matrices, depending on the operation.
- Choose what kind of result you want: a matrix, a number, a decomposition, or something else. The list of operations updates to match.
- Pick the operation, enter your values, and press Calculate.
Grouping the operations by what they return, a matrix or a single number, makes the long list easier to navigate. Reset clears everything.
What a matrix is
A matrix is just a rectangular arrangement of numbers in rows and columns. We describe its size by those two counts, rows first: a "2 by 3" matrix has 2 rows and 3 columns. When the two counts are equal, like 3 by 3, it is a square matrix, and squareness matters, because some of the most important operations, the determinant and the inverse among them, only make sense for square matrices.
What makes matrices so useful is that a whole grid of numbers can be treated as a single object, added, multiplied and inverted as a unit. That lets a matrix stand in for a system of equations, a transformation of space, or a table of data, and lets you manipulate the whole thing at once.
The operations it can do
A guide to the main ones, and where to go for the full story:
- Transpose: flip the matrix over its diagonal, turning rows into columns and columns into rows.
- Determinant: squeeze a square matrix down to a single telling number. See the determinant calculator.
- Inverse: the matrix that undoes another one. See the inverse matrix calculator.
- Multiplication (in two-matrix mode): combine two matrices by the row-by-column rule. See the matrix multiplication calculator.
- Trace: add up the numbers on the main diagonal. Rank: how many genuinely independent rows or columns there are. Norm: a measure of a matrix's overall size.
- Adjoint and cofactor matrix: the building blocks used to construct an inverse by hand.
- Decompositions and more: QR and Cholesky decompositions, the characteristic polynomial and singular values, the tools of more advanced linear algebra, are here too for when you need them.
How it does the heavy lifting
Some of these operations, decompositions and singular values in particular, involve serious numerical work. This tool leans on numeric.js, a JavaScript library built for exactly this kind of matrix computation, so the heavier operations use a tested library rather than being reinvented from scratch. For the advanced decompositions and singular values, treat the result as a calculation aid and check anything important in a dedicated linear algebra system. It all still runs in your browser, with nothing sent anywhere.
Questions people ask
What is a matrix?
A rectangular grid of numbers arranged in rows and columns, treated as a single mathematical object. Its size is given as rows by columns, such as 2 by 3.
What operations can I do on a matrix?
Transpose, determinant, inverse, trace, rank, norms, adjoint and cofactor, multiplication with another matrix, and advanced ones like decompositions and singular values.
Why do some operations need a square matrix?
The determinant and inverse are only defined for square matrices, those with equal numbers of rows and columns, because of what they mean geometrically and algebraically.
When do I use one matrix versus two?
Operations on a single matrix, like transpose or determinant, use one. Operations that combine matrices, like multiplication, use two.
What is a transpose?
The matrix you get by flipping the original over its diagonal, so its rows become columns and its columns become rows.
References
A note on where this comes from. The word "matrix" was coined by James Joseph Sylvester in 1850, and the algebra of matrices, including multiplication and the inverse, was developed by Arthur Cayley, whose 1858 A Memoir on the Theory of Matrices gave the first abstract definition. For further reading, see Matrix (mathematics).
- Arthur Cayley, A Memoir on the Theory of Matrices (1858), which set out matrix addition, multiplication and inverses.
- numeric.js, a JavaScript numerical library, used here for the heavier matrix computations.
Okan Atalay is a results driven senior operations manager and a graduate of Industrial Engineering from Bilkent University. With over 22 years of experience in textile manufacturing and integrated operations, he has led large scale business process improvements and strategic planning initiatives. Currently, he serves as a top mathematics expert for a global ed tech platform, where he applies his analytical expertise to solve complex mathematical problems. At Eon Tools, he reviews converter and maths tools.