Matrix multiplication composes two matrices together to create a third matrix. A matrix represents a function, so the size of the ouput of the first matrix must match the size of the input of the second matrix, meaning that the number of rows of the first matrix should match the number of columns of the second matrix. The result of passing a vector to the output matrix is the same as passsing a vector to the first matrix, producing output, and then passing that ouput into the second matrix.