Introduction
This matrix multiplication calculator lets you multiply two matrices together, raise a matrix to a power, or multiply a matrix by a scalar. Enter your values, press calculate, and get your answer instantly with step-by-step work shown for every entry. The calculator handles matrices up to 10×10 and supports integers, decimals, fractions, and even complex numbers.
Matrix multiplication is a key operation in linear algebra. To multiply two matrices, you take the dot product of each row in the first matrix with each column in the second. The number of columns in the first matrix must equal the number of rows in the second. This tool checks that rule for you, does all the math, and breaks each step down so you can follow along and learn. You can also verify your own answers using the built-in checker.
How to Use Our Matrix Multiplication Calculator
Enter your matrices and choose an operation. The calculator will show the product, step-by-step work, and a heatmap of the result.
Pick an operation mode. Choose "Matrix × Matrix" to multiply two matrices together. Choose "Matrix Power" to raise a square matrix to an exponent. Choose "Scalar × Matrix" to multiply every element in a matrix by a single number.
Try a quick example. Click any example button to load sample values and see results right away. This is a good way to learn how the tool works.
Set your matrix size. Enter the number of rows and columns for each matrix. For Matrix × Matrix mode, the number of columns in Matrix A must equal the number of rows in Matrix B. The compatibility badge tells you if your sizes work.
Click "Set Matrices" to build the input grids. You can also just start typing — the grids update when you change the size.
Fill in your matrix values. Type a number into each cell. You can use whole numbers, decimals, fractions like 1/2, or complex numbers like 3+2i. Use arrow keys or Tab to move between cells.
For Matrix Power mode, enter an exponent. Type a whole number from 0 to 10. Power 0 gives the identity matrix. Power 1 returns the original matrix. If you need help with exponent rules outside of matrices, try our exponent calculator.
For Scalar mode, enter a scalar value. Type any number, fraction, or complex number. Every cell in the matrix will be multiplied by this value.
Click "Calculate" to get your answer. You can also press Enter from any cell or input field.
Switch between Decimal and Fraction format to view the result in the form you need. Our decimal to fraction calculator can help if you need to convert individual values. Click "Copy Result" to copy the answer to your clipboard.
Use the answer checker to test your own work. Click "Show Checker," type your answers into the grid, and click "Verify" to see which entries are correct.
Chain your results. In Matrix × Matrix mode, click "Use Result as Matrix A" or "Use Result as Matrix B" to carry your answer into a new calculation.
What Is Matrix Multiplication?
A matrix is a grid of numbers arranged in rows and columns. You can think of it like a table or a spreadsheet. Matrix multiplication is a way to combine two matrices into a new one by following a specific set of rules. For other matrix operations like addition, subtraction, and finding inverses, see our general matrix calculator.
To multiply two matrices, you take each row from the first matrix and each column from the second matrix. You multiply the matching numbers together, then add up all the results. That sum becomes one number in the answer matrix. You repeat this for every row-and-column pair until the entire result is filled in. This process of multiplying paired elements and summing them is known as the dot product.
When Can You Multiply Two Matrices?
You can only multiply two matrices when the number of columns in the first matrix equals the number of rows in the second matrix. For example, a 2×3 matrix (2 rows, 3 columns) can be multiplied by a 3×2 matrix (3 rows, 2 columns) because the 3s match. The result will be a 2×2 matrix. If those inner numbers do not match, the multiplication cannot be done.
Other Operations This Calculator Supports
Scalar multiplication is simpler. A scalar is just a single number. To multiply a scalar by a matrix, you multiply that number by every element inside the matrix. The result is a matrix of the same size.
Matrix exponentiation means multiplying a square matrix by itself a certain number of times. For example, A³ means A × A × A. The matrix must be square, meaning it has the same number of rows and columns. Any square matrix raised to the power of 0 gives the identity matrix, which acts like the number 1 in regular math. A related property of square matrices is the determinant, a single number that tells you whether a matrix is invertible.
Where Is Matrix Multiplication Used?
Matrix multiplication is used in many fields. Computer graphics use it to rotate, scale, and move images on screen. Scientists use it to solve systems of equations. It also shows up in physics, engineering, data science, and machine learning. Learning how to multiply matrices is a key skill in linear algebra, a branch of math that deals with vectors and matrices.