Matrix Multiplication Calculator — Step-by-Step

The Matrix Multiplication Calculator multiplies any two matrices up to 4x4 with full step-by-step working. Enter your matrices, click Multiply, and see the complete dot product calculation for every cell in the result. Click any step to highlight which row and column produced that result. Supports 2...

MATRIX A SIZE

×

RESULT SIZE

2×2

A(2×2) × B(2×2)

MATRIX B SIZE

×

Matrix A (2×2)

×

Matrix B (2×2)

QUICK EXAMPLES

Created with❤️byeaglecalculator.com

HOW MATRIX MULTIPLICATION WORKS

Dimension rule

A (m×n) × B (n×p) = C (m×p). The number of columns in A must equal the number of rows in B. The result has the same number of rows as A and columns as B.

Dot product

Each cell C[i,j] is the dot product of row i of A and column j of B: multiply corresponding elements and sum them all.

Not commutative

A×B ≠ B×A in general. Order matters. Swapping the matrices usually gives a completely different result — or may not even be possible.

Time complexity

Standard multiplication of an m×n matrix by an n×p matrix takes O(m×n×p) operations. A 4×4 × 4×4 requires 4×4×4 = 64 multiplications and 48 additions.

HOW TO USE

  1. 1

    Set the size of Matrix A using the row and column buttons (1 to 4). The number of columns in A automatically sets the number of rows in B — this is the dimension rule for matrix multiplication.

  2. 2

    Set the number of columns in Matrix B. The result matrix C will have the same rows as A and same columns as B. The result size is shown between the two size selectors.

  3. 3

    Enter values in Matrix A and Matrix B. Use the quick example buttons to load common cases: 2x2, 2x3 x 3x2, identity matrix, or dot product (1x3 x 3x1).

  4. 4

    Click MULTIPLY A x B. The result matrix C appears on a black background. Each cell is calculated as the dot product of the corresponding row from A and column from B.

  5. 5

    Click any step in the step-by-step panel to highlight which row of A and column of B produced that result cell. The formula shows every multiplication and addition in full.

WORKED EXAMPLE

A = [[1,2],[3,4]], B = [[5,6],[7,8]]. C[1,1] = 1*5 + 2*7 = 5+14 = 19. C[1,2] = 1*6 + 2*8 = 6+16 = 22. C[2,1] = 3*5 + 4*7 = 15+28 = 43. C[2,2] = 3*6 + 4*8 = 18+32 = 50. Result C = [[19,22],[43,50]]. Dimensions: A(2x2) x B(2x2) = C(2x2).

FREQUENTLY ASKED QUESTIONS

RELATED CALCULATORS

MORE MATRICES CALCULATORS

Was this calculator helpful?

Last updated: April 29, 2026 · Formula verified by EagleCalculator team · Eagle-eyed accuracy for every calculation.