Matrices & Vectors · How-to

Matrix Multiplication Walkthrough

The row-by-column method explained from scratch, a full 2×2 example, the dimension rule, and proof that order matters.

fx-991ES Web TeamUpdated 23 June 20266 min read

Matrix multiplication isn't entry-by-entry like addition — it's a row-by-column operation. Once you see the pattern it's mechanical, and a matrix multiplication calculator confirms every answer. Let's build it up.

On this page

  1. The dimension rule
  2. One entry = one dot product
  3. Full worked example
  4. Order matters
  5. Check on the calculator
  6. FAQ

The dimension rule

You can multiply an m×n matrix by an n×p matrix — the inner numbers must match — and the result is m×p:

(m × n) · (n × p)  →  (m × p)
        ↑↑↑↑↑ must be equal

So a 2×3 times a 3×2 works and gives a 2×2; a 2×3 times a 2×2 does not work at all.

One entry = one dot product

Entry (i, j) of the product is the dot product of row i of the first matrix with column j of the second: multiply matching elements and add.

Full worked example

Multiply A × B where

A = 1 2     B = 5 6
    3 4         7 8

Compute each of the four entries:

A × B = [[19, 22], [43, 50]].

Order matters

Reverse the order and you get a different matrix:

B × A = [[23, 34], [31, 46]] — for example (1,1) = 5·1 + 6·3 = 23. Clearly A × B ≠ B × A.

Don't assume commutativity

Unlike numbers, matrices rarely commute. Always multiply in the order the problem specifies.

Check on the calculator

In MATRIX mode, enter A in the first box and B in the second:

Matrix A      Matrix B
1 2           5 6
3 4           7 8

The calculator returns A × B = [[19, 22], [43, 50]] (plus A + B). Swap the inputs to see B × A change. For determinants, inverses and transposes of the same matrices, see the matrix calculator pillar guide, and to apply products to systems read simultaneous equations with matrices.

Frequently asked questions

When can two matrices be multiplied?

When the columns of the first equal the rows of the second: (m×n)·(n×p) → (m×p).

Is matrix multiplication commutative?

No — A×B generally differs from B×A, and the two may not even be the same size.

How is each entry computed?

Entry (i, j) is the dot product of row i of the first matrix with column j of the second.

Multiply matrices instantly

Enter A and B in MATRIX mode and read A × B without the arithmetic.

Open the matrix multiplication calculator →