Matrix Multiplication Calculator

Published on: September 21 2025

This Matrix Multiplication Calculator helps you multiply two matrices and shows each step clearly. It works by taking the row of the first matrix and the column of the second matrix, multiplying corresponding entries, and then adding the results to form each entry of the product matrix. This makes it useful for checking answers, understanding how matrix multiplication works, and practising linear algebra step by step.

Step-by-step method

  1. Check that the number of columns in Matrix A equals the number of rows in Matrix B.
  2. Multiply each row of Matrix A by each column of Matrix B.
  3. Add the products and place each result in the matching position of the product matrix.

Formula:

(AB)ij = ai1b1j + ai2b2j + ... + ainbnj

Example 1: Take the matrices below.

1
2
3
4
×
5
6
7
8

Step 1 - Check that the number of columns in Matrix A equals the number of rows in Matrix B.

In this problem: Matrix A is 2×2 and Matrix B is 2×2. Since 2 = 2, multiplication is possible. The product matrix will be 2×2.

1
2
3
4
×
5
6
7
8

Step 2 - Multiply each row of Matrix A by each column of Matrix B.

In this problem: Each entry is made by multiplying one row of Matrix A with one column of Matrix B.

1×5 + 2×7
1×6 + 2×8
3×5 + 4×7
3×6 + 4×8

Step 3 - Add the products and place each result in the matching position of the product matrix.

In this problem: After multiplying, add the products and place each result in the product matrix.

1×5 + 2×7 = 5 + 14 = 19
1×6 + 2×8 = 6 + 16 = 22
3×5 + 4×7 = 15 + 28 = 43
3×6 + 4×8 = 18 + 32 = 50
=
19
22
43
50

Final answer:

19
22
43
50

Example 2: Take the matrices below.

2
0
-1
3
1
4
×
1
2
0
5
-2
3

Step 1 - Check that the number of columns in Matrix A equals the number of rows in Matrix B.

In this problem: Matrix A is 2×3 and Matrix B is 3×2. Since 3 = 3, multiplication is possible. The product matrix will be 2×2.

2
0
-1
3
1
4
×
1
2
0
5
-2
3

Step 2 - Multiply each row of Matrix A by each column of Matrix B.

In this problem: Each entry is made by multiplying one row of Matrix A with one column of Matrix B.

2×1 + 0×0 + (-1)×(-2)
2×2 + 0×5 + (-1)×3
3×1 + 1×0 + 4×(-2)
3×2 + 1×5 + 4×3

Step 3 - Add the products and place each result in the matching position of the product matrix.

In this problem: After multiplying, add the products and place each result in the product matrix.

2×1 + 0×0 + (-1)×(-2) = 2 + 0 + 2 = 4
2×2 + 0×5 + (-1)×3 = 4 + 0 + -3 = 1
3×1 + 1×0 + 4×(-2) = 3 + 0 + -8 = -5
3×2 + 1×5 + 4×3 = 6 + 5 + 12 = 23
=
4
1
-5
23

Final answer:

4
1
-5
23
Matrix A Setup
Matrix B Setup
Matrix A
×
Matrix B