문제 풀이
(1) = (3·(-7)) + ((-6)·9)
= ((-21) + (-54)) = -75
In [38]:
import numpy as np u = np.array([3, -6]) v = np.array([-7, 9]) uv = np.dot(u, v) print(uv)
-75
(2) = ((-3)·(-4)) + (4·(-9)) + (7·5)
= (12 + (-36) + 35) = 11
In [39]:
import numpy as np u = np.array([-3, 4, 7]) v = np.array([-4, -9, 5]) uv = np.dot(u, v) print(uv)
11
(3) = (3·(-4)) + ((-11)·(-13)) + (7·9)
= ((-12) + 143 + 63) = 194
In [40]:
import numpy as np u = np.array([3, -11, 7]) v = np.array([-4, -13, 9]) uv = np.dot(u, v) print(uv)
194