벡터란?

숫자를 원소로 가지는 리스트 또는 배열

Untitled

Untitled

벡터에 있는 숫자들의 갯수를 벡터의 차원이라고 한다.


Untitled

Untitled

Untitled

Untitled

import numpy as np

x = np.array([1, 7, 2])
y = np.array([5, 2, 1])

x + y  #array([6, 9, 3])
x - y  #array([-4, 5, 1])
x * y  #array([5, 14, 2])

Untitled