If you notice that for AB, it's 2x3 3x5 where the number of columns of A must match the number of rows of B. After multiplication, they cancel out and the product AB becomes a 2x5.
Same goes for GC.
determine the dimensions of each matrix product
A X B
2X3 3X5
G X C
4X7 7X1
1 answer