Matrix Multiplication Calculator with Steps

Compute matrix products with clear, step-by-step guidance for you. Adjust sizes, inputs, and precision for accurate outcomes everywhere. See each cell’s dot product breakdown in detail. Validate dimensions automatically and catch incompatible shapes before processing. Export results to CSV and PDF with one click.

Enter Matrices

Supports decimals and simple fractions like 3/4

Matrix A
Matrix B

Results

Run a calculation to see the result and detailed steps.

Export & Utilities

Example data table

Matrix A (2×3)
201
-134
Matrix B (3×2)
15
2-1
03

Preset: Identity × Matrix (3×3)

Quick sanity check: I3 · M = M

Matrix A (I3)
100
010
001
Matrix B (3×3)
2-14
0.530
72-3

Preset: 2D Rotation 45° × Points (2×2 · 2×3)

Rotate 3 points by 45° using a standard rotation matrix.

Matrix A (Rotation 45°)
0.70710678-0.70710678
0.707106780.70710678
Matrix B (Points as columns)
10-1
012

Formula used

If A is m×n and B is n×p, the product C = AB is m×p with entries:

cij = Σnk=1 aik · bkj

Each result cell is a dot product between a row of A and a column of B.

How to use

  1. Choose dimensions so columns of A equal rows of B.
  2. Click “Build inputs” to refresh the entry grids.
  3. Enter numbers; decimals and simple fractions like 5/8 work.
  4. Set precision for rounding the displayed outputs.
  5. Press “Calculate” to see results and per-cell steps.
  6. Export the result table as CSV or PDF if needed.

How to calculate FLOPs for matrix multiplication

For A of size m×n and B of size n×p:

  • Multiplications = m × n × p
  • Additions = m × p × (n − 1)
  • Exact FLOPs = mnp + mp(n − 1) = 2mnp − mp
  • Approximate FLOPs (HPC convention) = 2mnp
Multiplications:
Additions:
Exact FLOPs:
Approx. FLOPs (2mnp):

Note: Some references count a fused multiply–add (FMA) as 2 FLOPs. The exact count above uses n−1 additions per dot product.

FAQs

You can choose from 1 to 8 for rows and columns. Ensure columns of A equal rows of B for the multiplication to be valid.

Both decimals and simple fractions like 3/4 are accepted. Scientific notation such as 1.2e3 also works.

Choose the “Precision” value to round displayed results. Internally, calculations use standard floating‑point arithmetic.

Yes. Buttons beside Matrix A and Matrix B export the current input grids as CSV files.

The page uses browser rendering to capture the results area and generate a PDF file for download.

Matrix multiplication requires that A’s columns equal B’s rows. Adjust sizes so they match this rule.

Yes. Use a square identity matrix (ones on the diagonal, zeros elsewhere) of compatible size to leave the other matrix unchanged.

Related Calculators

Row Reduction RREF CalculatorDiagonalization Checker CalculatorLU Decomposition Steps CalculatorQR Decomposition Steps Calculatormatrix calculator with variablesGauss-Jordan inverse calculatorPolynomial linear independence calculatorLinear independence of matrix calculatorComplex matrix inverse calculatorQR decomposition least squares

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.