Matrix Multiplication Simulator
Multiply matrices online with an interactive calculator. Enter your own matrix values, choose matrix dimensions, explore multiplication step by step, calculate matrix powers, and export your results. The simulator checks dimension compatibility and updates your calculations instantly.
Matrix Calculator
Configure matrices A and B, then calculate their product.
Matrix Power Calculator
Calculate repeated multiplication of a square matrix: A², A³, A⁴, and higher powers.
Scalar Multiplication
Multiply every entry in a matrix by a chosen scalar value.
Result
A × B produces a 2 × 2 matrix.
Step-by-Step Calculation
See how each entry of the product matrix is calculated from a row of A and a column of B.
Calculate a matrix product to display the detailed working steps here.
Matrix Multiplication Formula
Matrix multiplication combines rows from the first matrix with columns from the second matrix.
The entry in row i and column j of the product is:
In other words, multiply each value in a row of A by the corresponding value in a column of B, then add the products together. Repeat this process for every position in the resulting matrix.
How to Use the Matrix Multiplication Simulator
1. Choose matrix dimensions
Set the number of rows in A, the shared dimension, and the number of columns in B. The shared dimensions must match.
2. Enter matrix values
Type numbers into the matrix cells. You can also use the presets, identity buttons, or random-value controls.
3. Calculate the product
Select Calculate A × B. The simulator checks compatibility and displays the resulting matrix.
4. Explore the working
Review the individual row-by-column calculations and export the resulting matrix as a CSV file.
Important Properties of Matrix Multiplication
| Property | Rule | Meaning |
|---|---|---|
| Associativity | (AB)C = A(BC) | Compatible matrix products can be grouped in either order. |
| Distributivity | A(B + C) = AB + AC | Multiplication distributes over matrix addition. |
| Identity | AI = IA = A | The identity matrix leaves a compatible matrix unchanged. |
| Non-commutativity | AB ≠ BA in general | Changing the order of multiplication usually changes the result. |
| Scalar multiplication | k(AB) = (kA)B = A(kB) | A scalar can be applied to either compatible factor. |
These rules apply when all matrix dimensions involved make the expressions valid.
Frequently Asked Questions
How do you multiply two matrices?
To multiply matrices A and B, the number of columns in A must equal the number of rows in B. Each entry in the product is calculated by multiplying corresponding entries from a row of A and a column of B, then adding those products.
Can you multiply matrices of different sizes?
Yes. Two matrices do not need to have the same dimensions. Matrix A can have dimensions m by n and matrix B can have dimensions n by p. Their product will have dimensions m by p.
Is matrix multiplication commutative?
No. In general, AB is not equal to BA. The products may even have different dimensions, or one product may be undefined while the other is defined.
What is the identity matrix?
An identity matrix is a square matrix with ones on its main diagonal and zeros elsewhere. Multiplying a compatible matrix by an identity matrix leaves that matrix unchanged.
What is a matrix power?
A matrix power such as A squared means multiplying a square matrix by itself. Matrix powers are defined for square matrices and are calculated using repeated matrix multiplication.
Can I multiply a matrix by a scalar?
Yes. Scalar multiplication means multiplying every entry of a matrix by the same number.
Explore More Matrix Tools
Continue exploring matrix operations, transformations, and linear algebra concepts.