Calculates the multiplication of two matrices.