Matrix multiplication composes two matrices together to create a third matrix. A matrix represents a function, so the size of the output 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 passing a vector to the first matrix, producing output, and then passing that output into the second matrix.