The product AB of two matrices A and B is possible if
A and B have same number of rows.
A and B have same number of columns.
The number of columns of A is equal to the number of rows of B.
The number of rows of A is equal to the number of columns of B.