math4610

Routine Name: matrixScalarMultiply

Author: David Merkley

Language: Python

Description/Purpose: Multiplies a matrix by a scalar

Input: 1 matrix and scalar

Output: the product

Implementation/Code:

def matrixScalarMultiply(A, a):
    return [vectorScalarMultiply(A[i], a) for i in range(len(A))]