For matrix multiplication to be valid, the number of columns in the first matrix must be equal to the number of rows in the second matrix. The resulting matrix will have the number of rows from the first matrix and the number of columns from the second matrix.