The process behind multiplying two matrices: dimensions required, how to multiply, and the generalization