- There are two ways to multiply matrices; either by a number, or by another matrix.
- Scalar Multiplication is the the first of these, multiplying a matrix by a number.
- To multiply a matrix by a number, you multiply each element by that number.
import numpy as np a = [[3, 6, 2], [5, 1, 10]] b = np.multiply(a, 4) print(b) # prints: [[12 24 8] [20 4 40]]
- The resulting matrix of the multiplication is called a 'Scalar Multiple'.