Matrix Calculator
Add, subtract, multiply, transpose or scale matrices of any size up to twelve by twelve.
Results
What this tool does
A matrix is a table of numbers that behaves like a single object: you can add two of them, multiply them together, or turn one on its side. The rules are not the ones you know from ordinary arithmetic — multiplication is a composition of rows against columns, and the order matters. Type your matrices one row per line, pick what to do, and the result comes back with its determinant and trace when it is square, so you can see straight away whether it is invertible.
Formula
(A ± B)ᵢⱼ = aᵢⱼ ± bᵢⱼ · (A × B)ᵢⱼ = Σₖ theᵢₖ bₖⱼ · (Aᵀ)ᵢⱼ = aⱼᵢ · (cA)ᵢⱼ = c theᵢⱼ
Variables
| Symbol | Meaning | Unit |
|---|---|---|
a | First matrix, one row per line | — |
mode | What to do | — |
b | Second matrix, one row per line | — |
scalar | The number to multiply by | — |
RS | The result | — |
SZ | Size of the result | — |
DT | Determinant | — |
TR | Trace, the diagonal added up | — |
SQ | Is it square? | — |
SM | Everything added up | — |
BG | Largest entry | — |
SL | Smallest entry | — |
Worked example
- First matrix, one row per line1, 2 3, 4
- What to domultiply
- Second matrix, one row per line5, 6 7, 8
- The number to multiply by2
- The result19 22 43 50
- Size of the result2 x 2
- Determinant4.00000000
- Trace, the diagonal added up69.00000000
- Is it square?Yes
- Everything added up134.00000000
- Largest entry50.00000000
- Smallest entry19.00000000
Frequently asked questions
How do I type a matrix?
One row per line, with the numbers separated by commas or spaces. Every row must have the same number of entries. Up to twelve by twelve. For adding and subtracting, both matrices have to be exactly the same shape; for multiplying, the first one's columns must match the second one's rows, and the result has the first one's rows and the second one's columns.
Why is AB not the same as BA?
Because matrix multiplication is a composition of transformations, and doing two things in the other order generally gives a different result — rotate then stretch is not the same as stretch then rotate. With ordinary numbers the order never matters; with matrices it almost always does, and for non-square matrices BA may not even be defined. This is the single most important way matrix algebra differs from the arithmetic you already know.