added scalar multiplication to matrix