Home

Matrix Multiplication

Matrix multiplication calculator. Enter A and B to compute AB row-by-column with dimension checks and intermediate products.

展开更多 ▾
(AB)ᵢⱼ = Σ aᵢₖ bₖⱼ
space-separated entries, semicolon-separated rows, e.g. 1 2;3 4
space-separated entries, semicolon-separated rows, e.g. 1 2;3 4

📖 Tutorial|Matrix Multiplication

1. Definition
If A is m×k and B is k×n, then C=AB is m×n with cᵢⱼ = Σ aᵢₖ bₖⱼ (dot product of row i of A and column j of B).
2. Symbols
SymbolMeaning
m×ksize of A
k×nsize of B
cᵢⱼdot product at (i,j)
3. How this tool works
  • Columns of A must equal rows of B;
  • C has rows of A and columns of B;
  • Usually AB ≠ BA; multiplication is not commutative.
4. Steps
  1. Enter A and B;
  2. Click Calculate to check dimensions and the product;
  3. Mismatched inner dimensions raise an error.
5. Example
Example: A=1 2;3 4, B=2 0;1 2. (AB)₁₁=1·2+2·1=4, (AB)₁₂=1·0+2·2=4; AB=4 4;10 8.
6. Pitfalls
Inner dimensions must match;
AB≠BA; order matters;
Align rows with columns, not rows with rows.

❓ FAQ|Matrix Multiplication

What is the dimension rule?
A(m×k)·B(k×n)=C(m×n); the inner k must match.
Are AB and BA the same?
Usually not; they may even be undefined. Multiplication is not commutative.
How is a dot product computed?
Multiply corresponding entries and sum: aᵢ₁b₁ⱼ + aᵢ₂b₂ⱼ + … .
What does the identity do in multiplication?
AI=IA=A, acting like the number 1.
What is the result size?
Rows from A, columns from B.