import numpy as np
import matplotlib.pyplot as plt
$\left[ \begin{matrix} 1 \\ 0 \\ 2 \\ 5 \\ 6 \end{matrix} \right] [a \: b \: c \: d]=\left[ \begin{matrix} 1a \: 1b \: 1c \: 1d \\ 0a \: 0b \: 0c \: 0d \\ 2a \: 2b \: 2c \: 2d \\ 5a \: 5b \: 5c \: 5d \\ 6a \: 6b \: 6c \: 6d \end{matrix} \right]$
v1 = np.random.randn(50)
v2 = np.random.randn(80)
# np.dot(v1,v2) # invalid
op = np.outer(v1,v2) # valid
print(op)
plt.imshow(op)
plt.show()
v = np.arange(1,11)
w = np.arange(1,6)
print(np.outer(v,w))
print('')
print(np.outer(w,v))
s = 4
res1 = s*np.outer(v,w)
res2 = np.outer(s*v,w)
res3 = np.outer(v,s*w)
res4 = np.outer(v,w)*s
print(res1-res2)
print(res1-res3)
print(res1-res4)