Math

Matrix Multiplication Calculator

Multiply a 2×2 matrix by another 2×2 matrix or a 2×1 vector, and see the resulting product.

Second matrix shape
Matrix A (2×2)
Matrix B (2×2)
Product A × B (2×2)
19
22
43
50

How it works

Matrix multiplication combines rows of the first matrix with columns of the second. Each entry of the product is a dot product: you multiply matching elements down a row and up a column, then add them together.

For the top-left entry of A × B, you take A's first row and B's first column: (a₁₁·b₁₁ + a₁₂·b₂₁). Repeat for every row-column pairing to fill in the product. A 2×2 times a 2×2 gives a 2×2; a 2×2 times a 2×1 gives a 2×1.

The key rule is that the inner dimensions must match — the number of columns in A must equal the number of rows in B. Here A always has 2 columns and B always has 2 rows, so both supported shapes line up correctly.

Frequently asked questions

Why must the dimensions match?

Each product entry is a dot product between a row of A and a column of B, so those must be the same length. That's why A's column count has to equal B's row count. Otherwise there's nothing to pair up and the product isn't defined.

Is matrix multiplication commutative?

No. In general A × B is not the same as B × A — the order matters, and sometimes only one order is even defined. Always multiply in the order the problem gives you.

Can I multiply a matrix by a vector here?

Yes. Switch the second matrix to the 2×1 shape and you can multiply a 2×2 matrix by a column vector. The result is a 2×1 vector, which is exactly how linear transformations act on points.