1. Write dimensions before multiplying
If A is m by n and B is n by p, then AB is m by p; inner dimensions must agree.
Before performing matrix multiplication, write the dimensions of each matrix. The product exists only when the inner dimensions agree, and the result takes the outer dimensions.
