Matrix multiplication calculator
Type two matrices and get their product in exact fractions, with an entry worked out so you can see the pattern. If the sizes don’t fit, it tells you why.
| 19 | 22 |
| 43 | 50 |
- Each entry is a row of A times a column of B. The sizes 2 × 2 and 2 × 2 fit because A’s columns match B’s rows.
- For example, the top-left entry is 1·5 + 2·7 = 19
How to use it
- 1Type the matrix with one row per line and spaces between entries. Fractions like 1/2 and decimals both work.
- 2Leave the operation on “A × B”, and type the second matrix in its box.
- 3The answer stays in exact fractions, so nothing is rounded, and the row operations are listed underneath.
How matrix multiplication works
Each entry of the product is one row of A times one column of B: multiply matching numbers, then add. The entry in row i, column j uses row i of A and column j of B.
For A with rows (1, 2) and (3, 4), and B with rows (5, 6) and (7, 8), the top-left entry is 1·5 + 2·7 = 19 and the top-right is 1·6 + 2·8 = 22. The bottom row is 3·5 + 4·7 = 43 and 3·6 + 4·8 = 50.
Which sizes can be multiplied?
A × B works only when A has as many columns as B has rows. An m × n matrix times an n × p matrix gives an m × p matrix: the inner numbers must match, and the outer numbers give the size of the result. A 2 × 3 times a 3 × 4 gives a 2 × 4, but a 2 × 3 times a 2 × 3 is impossible.
Order matters
Unlike ordinary numbers, AB and BA are usually different, and one may not exist even when the other does. Matrix multiplication represents doing one transformation after another: rotating and then reflecting isn’t the same as reflecting and then rotating. It is associative, though: (AB)C = A(BC).
Frequently asked questions
How do you multiply a 2×2 matrix by a 2×2 matrix?
Can you multiply matrices of different sizes?
Is matrix multiplication commutative?
What is the identity matrix?
Related tools and guides
Inverse, determinant, multiply, RREF, rank and eigenvalues, in exact fractions.
The inverse of any square matrix, in exact fractions with steps.
Determinants up to 8 × 8 in exact fractions, with steps.
Reduced row echelon form with every row operation listed.
The characteristic polynomial, eigenvalues and eigenvectors.
Solve linear systems by elimination, in exact fractions.
It opens instantly, with no account and nothing to install.