multiplying matrices of different sizes