Matrix Calculator: Inverse, Determinant
To multiply two matrices, multiply each row of the first by each column of the second and add up the products. [1 2; 3 4] × [5 6; 7 8] = [19 22; 43 50], where the top-left 19 is 1 × 5 + 2 × 7. Type each matrix with spaces between entries and semicolons between rows, then pick an operation.
Type a number and the answer appears straight away.
A × B[19 22; 43 50]
- Size
- 2 × 2 times 2 × 2 gives 2 × 2
| Column 1 | Column 2 | |
|---|---|---|
| Row 1 | 19 | 22 |
| Row 2 | 43 | 50 |
The math behind it: Matrix
(AB)ᵢⱼ = Σₖ Aᵢₖ × Bₖⱼ; det [a b; c d] = ad − bc; [a b; c d]⁻¹ = [d −b; −c a] / (ad − bc)
Matrix multiplication works row by column. In [1 2; 3 4] × [5 6; 7 8], the first row of the answer is 1 × 5 + 2 × 7 = 19 and 1 × 6 + 2 × 8 = 22, and the second row is 43 and 50. A needs as many columns as B has rows, and the answer has A's rows and B's columns, so a 2 × 3 matrix times a 3 × 4 matrix gives a 2 × 4. Order matters: A × B is usually not the same as B × A. Adding and subtracting are simpler, entry by entry, and need two matrices of the same size: [1 2; 3 4] + [5 6; 7 8] = [6 8; 10 12].
The determinant is a single number that tells you whether a square matrix can be undone. For a 2 × 2 it is ad − bc, so [1 2; 3 4] has a determinant of 1 × 4 − 2 × 3 = −2. Larger matrices are reduced to triangular form by row operations and the diagonal is multiplied out; the 3 × 3 matrix [2 −3 1; 2 0 −1; 1 4 5] has a determinant of 49. The calculator also gives the rank, the number of independent rows.
The inverse of A is the matrix that multiplies with A to give the identity matrix, the matrix version of 1. For a 2 × 2, swap a and d, change the signs of b and c and divide by the determinant: the inverse of [1 2; 3 4] is [−2 1; 1.5 −0.5]. A matrix with a determinant of 0, such as [1 2; 2 4], whose second row is just twice the first, is called singular and has no inverse. The transpose simply turns rows into columns, so [1 2 3; 4 5 6] becomes [1 4; 2 5; 3 6].
Answers are worked out in decimals and shown to 8 significant figures, so an inverse with fractions such as 1/3 appears as 0.33333333. For the slope of a line through two points, try the slope calculator. The scientific calculator handles single expressions, the exponent calculator works out powers, and the ratio calculator scales pairs of numbers.
Common questions
How do you multiply two matrices?
Multiply each row of the first matrix by each column of the second, entry by entry, and add the products. [1 2; 3 4] × [5 6; 7 8] = [19 22; 43 50], since 1 × 5 + 2 × 7 = 19. The first matrix must have as many columns as the second has rows.
How do you find the determinant of a 3x3 matrix?
Expand along a row, or reduce the matrix to triangular form and multiply the diagonal. The determinant of [2 −3 1; 2 0 −1; 1 4 5] is 49. For a 2 × 2 matrix [a b; c d] it is simply ad − bc.
How do you find the inverse of a 2x2 matrix?
Swap the two diagonal entries, change the sign of the other two and divide every entry by the determinant. For [1 2; 3 4] the determinant is −2, so the inverse is [−2 1; 1.5 −0.5].
Why does my matrix have no inverse?
Its determinant is 0, which happens when one row is a multiple or combination of the others. [1 2; 2 4] has no inverse because its second row is twice the first. Only square matrices can have an inverse.
Can you multiply matrices of different sizes?
Yes, as long as the inner sizes match. A 2 × 3 matrix times a 3 × 2 matrix works and gives a 2 × 2 answer, but a 1 × 3 matrix times a 1 × 2 matrix does not, because 3 columns cannot pair with 1 row.
You might also need
Checked and updated: