When multiplying matrices, we have the following rule:
If the first matrix dimensions are 'a' and 'b' (that is, it has 'a' rows and 'b' columns) and the second matrix dimensions are 'c' and 'd', the product is only possible if we have b = c. Also, the resulting matrix dimensions will be 'a' and 'd'.
Knowing that rule, we have that:
