Matrix Calculator
- Free
- No sign-up
- Works on phones
- Shows the working
This matrix calculator multiplies matrices and finds the determinant, inverse and transpose, and adds or subtracts matrices, for sizes up to \( 6 \times 6 \). Inverses are shown with exact fractions where possible, and the calculator explains when an operation isn’t possible (for example, when the sizes don’t match for multiplication, or a matrix has no inverse).
It’s free and needs no sign-up.
How to enter a matrix
Type the rows separated by semicolons and the entries separated by spaces or commas. So
$$\begin{pmatrix}1 & 2 \\ 3 & 4\end{pmatrix}$$
is typed 1, 2; 3, 4. Matrix B is only needed for multiply, add and subtract.
Operations
| Operation | Requirement | Result size |
|---|---|---|
| \( A \times B \) | columns of A = rows of B | rows of A × columns of B |
| \( A \pm B \) | same size | same size |
| \( \det A \) | square | a number |
| \( A^{-1} \) | square, \( \det A \neq 0 \) | same size |
| \( A^T \) | any | rows and columns swapped |
Worked example: multiplication
With A and B as loaded above, each entry of AB is a row of A times a column of B:
$$AB = \begin{pmatrix}1\cdot5 + 2\cdot7 & 1\cdot6 + 2\cdot8 \\ 3\cdot5 + 4\cdot7 & 3\cdot6 + 4\cdot8\end{pmatrix} = \begin{pmatrix}19 & 22 \\ 43 & 50\end{pmatrix}$$
A \( 2 \times 3 \) matrix times a \( 3 \times 2 \) matrix gives a \( 2 \times 2 \): for example \( \begin{pmatrix}1&2&3\\4&5&6\end{pmatrix}\begin{pmatrix}7&8\\9&10\\11&12\end{pmatrix} = \begin{pmatrix}58&64\\139&154\end{pmatrix} \). The full method is in matrix multiplication.
Worked example: determinant and inverse
For \( A = \begin{pmatrix}4 & 7 \\ 2 & 6\end{pmatrix} \): \( \det A = 4\cdot6 - 7\cdot2 = 10 \), and
$$A^{-1} = \frac{1}{10}\begin{pmatrix}6 & -7 \\ -2 & 4\end{pmatrix} = \begin{pmatrix}\frac35 & -\frac{7}{10} \\ -\frac15 & \frac25\end{pmatrix}$$
The \( 3 \times 3 \) matrix with rows \( (2, 0, 1) \), \( (1, 3, 2) \), \( (1, 1, 2) \) has determinant 6.
Common mistakes
- Multiplying entry by entry. Matrix multiplication is row-times-column, not position-by-position.
- Assuming \( AB = BA \). Matrix multiplication is not commutative; usually \( AB \neq BA \).
- Inverting a singular matrix. If \( \det A = 0 \), there’s no inverse.
- Mismatched sizes. Check columns of A against rows of B before multiplying.
Matrices in calculus
The determinant of the matrix of second partial derivatives (the Hessian) is the D in the second derivative test for functions of two variables, and Jacobian determinants appear when changing variables in double integrals. See multivariable calculus.
Related guides
- Matrix Multiplication, Determinant and Inverse
- Multivariable Calculus
- Partial Derivatives
- Polynomials
Further reading
- Matrix multiplication (Wikipedia) — definition, properties and algorithms.
- Determinant (Wikipedia) — formulas, properties and geometric meaning.
FAQ
How do you multiply two matrices?
Multiply each row of the first by each column of the second (multiply matching entries and add). The number of columns of the first must equal the number of rows of the second.
How do you find the determinant of a 2 × 2 matrix?
\( \det\begin{pmatrix}a&b\\c&d\end{pmatrix} = ad - bc \).
When does a matrix have an inverse?
When it’s square and its determinant is not zero.
What is the transpose of a matrix?
The matrix with rows and columns swapped: row 1 becomes column 1, and so on.
