Advanced step-by-step tool — enter any two compatible matrices (up to 10×10) and get a full dot-product walkthrough with LaTeX formulas and written explanations.
If A is an m × n matrix and B is an n × p matrix, their product C = A × B is an m × p matrix. Each entry is the dot product of a row of A with a column of B:
$$ C_{ij} \;=\; \sum_{k=1}^{n} a_{ik} \cdot b_{kj} \;=\; a_{i1}b_{1j} + a_{i2}b_{2j} + \cdots + a_{in}b_{nj} $$
Multiplication is only defined when the number of columns of A equals the number of rows of B.
To multiply A (m×n) by B (n×p), each entry of the product is c(i,j) = Σ a(i,k)·b(k,j): the dot product of row i of A with column j of B. The result C is m×p. The product exists only when the number of columns of A equals the number of rows of B, and in general AB ≠ BA, so the order matters. Multiplication is associative and distributes over addition.
If A is m×n and B is n×p, then AB is m×p.
No. AB and BA can differ, and one of them may not even exist.
More tools: all free maths calculators · previous year papers · practice quizzes