Matrix Multiplication Calculator
Multiply two to four matrices with exact fractions, see how every entry is computed, and move data in and out as Python lists.
Matrices
Each tab is one matrix. The product multiplies them in tab order, so A·B·C means (A·B)·C.
Up to 12 rows and 12 columns.
Use integers, decimals, or fractions such as 1/3. Paste rows from a spreadsheet or a Python list into any cell.
Inputs
Product
Updates as you type.
How an entry is computed
Select any entry of the product to see the row-times-column sum behind it.
Entry (1, 1) multiplies row 1 of A by column 1 of B, pairing values in order and adding the products.
How matrix multiplication works
You can multiply by only when has as many columns as has rows. If is and is , the product is .
Each entry of the product is a row of multiplied by a column of : pair the values in order, multiply each pair, and add the results.
For example, the top-left entry below is :
Order matters
and are usually different, and may not even be defined. With three or more matrices, grouping does not change the answer, , but the order of the matrices does. This calculator always multiplies the tabs from left to right.
Tips for using the calculator
- Enter integers, decimals, or fractions such as
1/3. Results are exact; switch to Decimals for a rounded view. - Paste a block copied from a spreadsheet, or a Python or NumPy list such as
[[1, 2], [3, 4]], into any cell to fill the grid at once. - Copy list gives you a Python list that works directly with
numpy.array(...). - Use the dashed zones at the right and bottom edges of the grid to add a column or a row.
- Select any entry of the product to see the sum behind it.
To solve instead of multiplying, try the System of Linear Equations Calculator.
Related calculators
Keep working with equations and other algebra tools.
Matrix Calculator
Type a whole matrix expression such as 2AᵀB⁻¹ + I and get an exact answer, with every operation in order, plus the rank, determinant, and other properties of the result.
System of Linear Equations Calculator
Solve systems with up to 12 unknowns in exact fractions, find out if there is one solution, none, or infinitely many, and see why.
Fraction Calculator
Add, subtract, multiply, and divide between two fractions with detailed step-by-step solutions.