Let $A$ and $B$ be two matrices with the following shapes:

We define their product as a matrix

where

So the product of matrices is not defined for every pair of matrices - only when the shapes match as follows