Multiplying matrices by scalars