Scalar multiplication of a matrix