대학원 준비

Vectors/벡터

steezer 2025. 9. 15. 16:17

Vectors and Scalars
• An “ordinary number” is called a scalar.
a, b, x, y, z, θ, α, ω, γ.
• Algebraic definition of a vector: a list of scalars in square brackets. Eg. [1, 2, 3 ].
a, b, u, v, q, r
Row vector: [1, 2, 3]
Column vector:
v= [6, 19, 42],
v1 = 6, v2 = 19, v3 = 42.
2D vectors: [ vx, vy].
3D vectors: [ vx, vy, vz].
4D vectors: [vx, vy, vz, vw].

• Matrix variables will be represented using uppercase letters in boldface: A, B, M, R.
• Displacement is a vector ( eg. 10 miles West)
• Distance is a scalar ( eg. 10 miles away)
• Velocity( 속도)is a vector ( eg. 55mph North)
• Speed( 속력)is a scalar ( eg. 55mph )
• Vectors are used to express relative things.
• Scalars are used to express absolute things.

Geometric Definition of Vector
• A vector consists of a magnitude and a direction.
• Magnitude = size.
• Direction = orientation.
• Draw it as an arrow.

Specifying vectors in Cartesian coordinates

Vectors vs. Points
• Points are measured relative to the origin.
• Vectors are intrinsically relative to everything.
⇒ So a vector can be used to represent a point
⇒ The point (x,y) is the point at the head of the vector [x,y] when its tail is placed at the origin.
⇒ But, vectors do not have a location

Vector Negation :Algebra
• Negation is the additive inverse:
v + -v = -v + v = 0
• To negate a vector, negate all of its components.

Vector Negation :Geometry
• To negate a vector, make it point in the opposite direction.
• Swap the head with the tail, that is.
• A vector and its negative are parallel and have the same magnitude, but point in opposite directions.

Vector Mult. by a Scalar :Algebra
• Can multiply a vector by a scalar.
• Result is a vector of the same dimension.
• To multiply a vector by a scalar, multiply each component by the scalar.
• For example, if ka = b, then b1=ka1, etc.
• So vector negation is the same as multiplying by the scalar –1.
• Division by a scalar same as multiplication by the scalar multiplicative inverse.

Vector Mult. by a Scalar :Geometry
• Multiplication of a vector v by a scalar k stretches v by a factor of k
• In the same direction if k is positive.
• In the opposite direction if k is negative.

Vector Addition :Algebra
• Can add two vectors of the same dimension.
• Result is a vector of the same dimension.
• To add two vectors, add their components.
• For example, if a + b = c, then c1 = a1 + b1, etc.
• Subtract vectors by adding the negative of the second vector, so a – b = a + (– b)

a + (b + c) = (a + b) + c
a + b = b + a
a – b = –(b – a)

Vector Addition :Geometry
• To add vectors a and b: use the triangle rule.
• Place the tail of a on the head of b.
• a + b is the vector from the tail of b to the head of a.

Algebra: [4, 1] + [–2, 3] = [2, 4]

Geometry:
• Place c and d tail to tail.
• c – d is the vector from the head of d to the head of c (head-positive, tail-negative).

Vector displacement :Algebra
• Here’s how to get the vector displacement from point a to point b.
• Let a and b be the vectors from the origin to the respective points.
• The vector from a to b is b – a (the destination is positive)

Vector Magnitude
• The magnitude of a vector is a scalar.
• Also called the “norm”.
• It is always positive

Vector magnitude :Geometry
• Magnitude of a vector is its length.
• Use the Pythagorean theorem.
• In the next slide, two vertical lines ||v|| means “magnitude of a vector v”, one vertical line |vx| means “absolute value of a scalar vx”

Observations
The zero vector has zero magnitude.
There are an infinite number of vectors of each magnitude (except zero).

Unit Vectors
• A normalized vector always has unit length.
• To normalize a nonzero vector, divide by its magnitude

Normalize [12, –5]:

The Distance Formula
Computing Distance
• To find the geometric distance between two points a and b.
• Compute the vector d from a to b.
• Compute the magnitude of d.
• We know how to do both of those things.

Vector Dot Product
Can take the dot product of two vectors of the same dimension. The result is a scalar.

Dot Product: Geometry
Dot product is the magnitude of the projection of one vector onto another.
Sign of dot product

Inner product (dot product)
• Defined to describe the angle between two vectors.
• If u, v are nonzero vectors in 2D or 3D real space, and θ is the angle between them:
u · v = |u||v| cos θ
• cos θ = (u·v)/(||u|| ||v||), 0 ≤ θ ≤ π
• Determines whether θ is acute, right, or obtuse.
– u·v > 0 → acute angle
– u·v < 0 → obtuse angle
– u·v = 0 → right angle

Properties:
a) u·v = v·u
b) u·(v+w) = u·v + u·w
c) k(u·v) = (ku)·v
d) 0·v = v·0 = 0

Dot Product : Geometry
• Dot product can be used to find the angle between two vectors a and b.
• First normalize a and b.
• The angle between them is acos(â·b̂).

Cross Product
• Input two vectors, output a vector perpendicular to their plane.
• Form: u × v = (u2v3 – u3v2, u3v1 – u1v3, u1v2 – u2v1)

Vector Cross Product
• Cross product of two vectors gives a vector of the same dimension.
• Properties:
(a) u×v = –(v×u)
(b) u×(v+w) = (u×v)+(u×w)
(c) (u+v)×w = (u×w)+(v×w)
(d) k(u×v) = (ku)×v = u×(kv)
(e) u×0 = 0×u = 0
(f) u×u = 0

Cross Product : Geometry
• Given two nonzero vectors a, b, they are coplanar.
• Their cross product is a vector perpendicular to their plane.
• Area of the parallelogram is ||a|| ||b|| sin θ.

Orientation of cross product
• In a left-handed coordinate system, use your left hand.
• Curl fingers in direction of vectors
• Thumb points in direction of a × b

Orientation of cross product
• In a right-handed coordinate system, use your right hand
• Curl fingers in direction of vectors
• Thumb points in direction of a × b

Surface normal
• In a left-handed coordinate system, list your triangles in clockwise order.
• Given a triangle with points a, b, c.
• Compute the vector displacement from a to b, and the vector from b to c.
• Take their cross product.
• Normalize the resulting surface normal.

 

Identity Comments

a + b = b + a Commutative property of vector addition
a – b = a + (–b) Definition of vector subtraction
(a + b) + c = a + (b + c) Associative property of vector addition
s(ta) = (st)a Associative property of scalar multiplication
k(a + b) = ka + kb Scalar multiplication distributes over vector addition
‖ka‖ = k
‖a‖ ≥ 0 The magnitude of a vector is nonnegative
‖a‖² + ‖b‖² = ‖a + b‖² The Pythagorean theorem applied to vector addition
‖a‖ + ‖b‖ ≥ ‖a + b‖ Triangle rule of vector addition (no side can be longer than the sum of the other two sides)
a · b = b · a Commutative property of dot product
‖a‖ = √(a · a) Vector magnitude defined using dot product
k(a · b) = (ka) · b = a · (kb) Associative property of scalar multiplication with dot product
a · (b + c) = a · b + a · c Dot product distributes over vector addition and subtraction
a × a = 0 The cross product of any vector with itself is the zero vector (because any vector is parallel with itself)
a × b = –(b × a) Cross product is anticommutative
a × b = (–a) × (–b) Negating both operands to the cross product results in the same vector
k(a × b) = (ka) × b = a × (kb) Associative property of scalar multiplication with cross product
a × (b + c) = a × b + a × c Cross product distributes over vector addition and subtraction

한국어

벡터와 스칼라

  • 일반적인 수는 스칼라(scalar)라고 합니다.
    예: a, b, x, y, z, θ, α, ω, γ
  • 벡터의 대수적 정의: 스칼라들을 대괄호 안에 나열한 것
    예: [1, 2, 3]
  • 행벡터: [1, 2, 3]
  • 열벡터:
    v = [6, 19, 42],
    v1 = 6, v2 = 19, v3 = 42
  • 2차원 벡터: [vx, vy]
  • 3차원 벡터: [vx, vy, vz]
  • 4차원 벡터: [vx, vy, vz, vw]
  • 행렬 변수는 대문자 볼드체 A, B, M, R로 표시합니다.
  • 변위(displacement)는 벡터 (예: 서쪽으로 10마일)
  • 거리(distance)는 스칼라 (예: 10마일 떨어짐)
  • 속도(velocity)는 벡터 (예: 시속 55마일 북쪽)
  • 속력(speed)은 스칼라 (예: 시속 55마일)
  • 벡터는 상대적인 개념을 표현합니다.
  • 스칼라는 절대적인 개념을 표현합니다.

벡터의 기하학적 정의

  • 벡터는 크기(magnitude)와 방향(direction)으로 이루어집니다.
  • 크기 = 크기(길이)
  • 방향 = 향하는 방향
  • 화살표로 표현합니다.

데카르트 좌표계에서 벡터 표현


벡터 vs 점

  • 점(point)은 원점을 기준으로 측정됩니다.
  • 벡터는 본질적으로 모든 것에 대해 상대적입니다.

→ 따라서 벡터는 점을 표현할 수 있습니다.
→ (x,y)라는 점은 벡터 [x,y]의 머리 부분에 해당하며, 꼬리는 원점에 놓여 있습니다.
→ 그러나 벡터 자체에는 절대적인 위치가 없습니다.


벡터의 음수 (Negation)

대수적 관점

  • 벡터의 음수는 덧셈에 대한 역원입니다.
    v + (–v) = (–v) + v = 0
  • 즉, 벡터의 각 성분에 음수를 취하면 됩니다.

기하학적 관점

  • 벡터를 반대 방향으로 뒤집으면 됩니다.
  • 머리와 꼬리를 맞바꾸는 것과 같습니다.
  • 벡터와 그 음수는 평행하고 크기는 같지만 방향은 반대입니다.

스칼라 배 (Scalar Multiplication)

대수적 관점

  • 벡터에 스칼라를 곱할 수 있습니다.
  • 결과는 같은 차원의 벡터입니다.
  • 각 성분에 스칼라를 곱하면 됩니다.
  • 예: ka = b 라면 b1 = ka1
  • 따라서 벡터의 음수는 스칼라 –1을 곱하는 것과 같습니다.
  • 스칼라로 나누는 것은 역수를 곱하는 것과 같습니다.

기하학적 관점

  • 벡터 v에 스칼라 k를 곱하면 v가 k배로 늘어납니다.
  • k > 0이면 같은 방향,
  • k < 0이면 반대 방향입니다.

벡터 덧셈

대수적 관점

  • 같은 차원의 벡터끼리 성분별로 더할 수 있습니다.
  • 결과는 같은 차원의 벡터입니다.
  • 예: a + b = c 이면 c1 = a1 + b1
  • 벡터 뺄셈은 a – b = a + (–b)로 정의합니다.

법칙:

  • a + (b + c) = (a + b) + c (결합법칙)
  • a + b = b + a (교환법칙)
  • a – b = –(b – a)

기하학적 관점

  • 두 벡터 a, b를 더할 때: 삼각형 규칙 사용
  • b의 머리에 a의 꼬리를 붙입니다.
  • 결과 벡터는 b의 꼬리에서 a의 머리까지 이어진 벡터입니다.

예: [4,1] + [–2,3] = [2,4]

  • 뺄셈의 경우, 두 벡터의 꼬리를 같은 점에 두고, d의 머리에서 c의 머리를 연결하면 c – d가 됩니다.

벡터 변위 (Displacement)

  • 점 a에서 점 b까지의 벡터 변위는 b – a 입니다.
  • 목적지가 양수라는 점에 유의합니다.

벡터 크기 (Magnitude)

  • 벡터의 크기는 스칼라입니다.
  • “노름(norm)”이라고도 합니다.
  • 항상 양수입니다.

기하학적 관점

  • 크기는 벡터의 길이입니다.
  • 피타고라스 정리를 사용합니다.
  • ||v|| 표기는 벡터 v의 크기, |x| 표기는 스칼라의 절댓값입니다.

성질 (Observations)

  • 영벡터의 크기는 0입니다.
  • 각 크기에 대해 무한히 많은 벡터가 존재합니다 (0 제외).

단위 벡터 (Unit Vector)

  • 정규화된 벡터는 항상 크기가 1입니다.
  • 0이 아닌 벡터를 정규화하려면, 벡터를 그 크기로 나눕니다.

예: [12, –5]를 정규화


거리 공식 (Distance Formula)

  • 점 a와 b 사이의 거리를 구할 때,
  • 먼저 d = b – a 벡터를 구합니다.
  • ||d||를 계산하면 거리입니다.

벡터의 내적 (Dot Product)

  • 같은 차원의 두 벡터 내적 결과는 스칼라입니다.

기하학적 의미

  • 한 벡터를 다른 벡터에 정사영했을 때의 크기입니다.
  • 부호에 따라 양수, 0, 음수로 나뉩니다.

내적(inner product) 점곱(dot product)

  • 두 벡터 사이의 각(angle)을 정의하기 위해 사용됩니다.
  • 벡터 u, v가 2D 또는 3D 실수 공간의 0이 아닌 벡터이고, θ가 그 사이의 각이면:
    u·v = ||u|| ||v|| cos θ
  • 따라서 cos θ = (u·v)/(||u|| ||v||), 0 ≤ θ ≤ π
  • 이를 통해 두 벡터 사이 각도가 예각, 직각, 둔각인지 판별할 수 있습니다.
    • u·v > 0 → 예각
    • u·v < 0 → 둔각
    • u·v = 0 → 직각

성질:
(a) u·v = v·u
(b) u·(v+w) = u·v + u·w
(c) k(u·v) = (ku)·v
(d) 0·v = v·0 = 0

내적으로 각도 구하기

  • a, b를 정규화한 후,
  • 각도 θ = acos(â·b̂)

벡터의 외적 (Cross Product)

  • 두 벡터를 입력하면, 그 벡터들이 만드는 평면에 수직인 벡터가 나옵니다.
  • 정의: u × v = (u2v3 – u3v2, u3v1 – u1v3, u1v2 – u2v1)

성질
(a) u×v = –(v×u)
(b) u×(v+w) = (u×v) + (u×w)
(c) (u+v)×w = (u×w) + (v×w)
(d) k(u×v) = (ku)×v = u×(kv)
(e) u×0 = 0×u = 0
(f) u×u = 0

기하학적 의미

  • 두 벡터 a, b는 같은 평면 위에 존재합니다.
  • 외적은 이 평면에 수직인 벡터를 생성합니다.
  • 평행사변형의 넓이는 ||a×b|| = ||a|| ||b|| sin θ 입니다.

외적의 방향 (Orientation)

  • 왼손 좌표계: 왼손을 이용해 손가락을 벡터 방향으로 감으면 엄지가 a×b 방향을 가리킵니다.
  • 오른손 좌표계: 오른손을 사용해 같은 방식으로 엄지가 a×b 방향을 가리킵니다.

표면 법선 (Surface Normal)

  • 왼손 좌표계에서는 삼각형의 점들을 시계 방향으로 나열합니다.
  • 삼각형 a, b, c가 주어졌을 때:
    • a→b 벡터, b→c 벡터를 구합니다.
    • 두 벡터의 외적을 계산합니다.
    • 결과를 정규화하면 표면 법선 벡터가 됩니다.

항등식 (Identity) 설명 (Comments)

a + b = b + a 벡터 덧셈의 교환법칙
a – b = a + (–b) 벡터 뺄셈의 정의
(a + b) + c = a + (b + c) 벡터 덧셈의 결합법칙
s(ta) = (st)a 스칼라 곱셈의 결합법칙
k(a + b) = ka + kb 스칼라 곱이 벡터 덧셈에 분배됨
‖ka‖ = k
‖a‖ ≥ 0 벡터의 크기는 항상 0 이상 (음수가 아님)
‖a‖² + ‖b‖² = ‖a + b‖² 피타고라스 정리를 벡터에 적용한 식
‖a‖ + ‖b‖ ≥ ‖a + b‖ 삼각 부등식 (한 변의 길이는 나머지 두 변의 합보다 클 수 없음)
a · b = b · a 내적(dot product)의 교환법칙
‖a‖ = √(a · a) 벡터 크기를 내적으로 정의
k(a · b) = (ka) · b = a · (kb) 스칼라 곱과 내적의 결합법칙
a · (b + c) = a · b + a · c 내적이 벡터 덧셈/뺄셈에 분배됨
a × a = 0 어떤 벡터와 자기 자신과의 외적은 항상 0 (자기 자신과 평행하기 때문)
a × b = –(b × a) 외적의 반교환법칙 (anticommutative)
a × b = (–a) × (–b) 두 벡터 모두에 음수를 취해도 결과는 동일
k(a × b) = (ka) × b = a × (kb) 스칼라 곱과 외적의 결합법칙
a × (b + c) = a × b + a × c 외적이 벡터 덧셈/뺄셈에 분배됨