implement scalar * matrix