[Math] Orthogonal Projection (정사영)

2022. 5. 19. 19:10·.../Math
728x90
728x90

Projection $\textbf{x}_1$  onto $\textbf{w}$ (vector $\bf{x}$를 vector $\bf{w}$에 투영) 를 수식으로 표현하면 다음과 같음.

 

$$\begin{aligned}\text{proj}_\textbf{w}\textbf{x}&=\dfrac{\bf{x}\cdot\bf{w}}{\bf{w}\cdot\bf{w}}\bf{w}=\dfrac{\bf{x}\cdot\bf{w}}{\bf{w}^\top\bf{w}}\bf{w}=\dfrac{\bf{x}\cdot\bf{w}}{\|\bf{w}\|^2}\bf{w}\\&=\dfrac{\bf{x}\cdot\bf{w}}{\|\bf{w}\|} \frac{\bf{w}}{\|\bf{w}\|} \\&=\mathbf{w}\dfrac{\mathbf{x}^\top \mathbf{w}}{\|\mathbf{w}\|^2}=\mathbf{w}\dfrac{\mathbf{w}^\top \mathbf{x}}{\|\mathbf{w}\|^2}=\dfrac{\mathbf{w}\mathbf{w}^\top }{\|\mathbf{w}\|^2}\mathbf{x} = P_\mathbf{w} \mathbf{x}\end{aligned}$$

where,

  • $P_\mathbf{w}$ : Projection Matrix로 이 Matrix에 임의의 벡터 $\mathbf{x}$를 곱하면, 벡터 $\mathbf{w}$에 투영이 이루어짐.

 

유도과정 은 다음과 같음.

 

위의 그림에서 벡터 $\bf{x}$가 벡터 $\bf{w}$에 내린 orthogonal projection(정사영)인 벡터 $\bf{h}$는

  • 벡터 $\bf{w}$에 평행하므로
  • $\textbf{h} = t\textbf{w}$ ($t$는 실수, scalar)

 

또, $\bf{x}$는 다음과 같이 표현됨.

  • $\textbf{x} = \textbf{y} + \textbf{h}$

 

여기에 이전 식을 대입하면 다음과 같음.

  • $\textbf{x} = \textbf{y} + t\textbf{w}$

 

$\bf{y}$는 $\bf{w}$와 수직이므로 $\textbf{y}\cdot\textbf{w} = 0$ 이 성립.

$$\begin{aligned}\textbf{x}\cdot\textbf{w}=\textbf{w}\cdot\textbf{x}&=(\textbf{y}+t\textbf{w})\cdot\textbf{w}\\&=\textbf{y}\cdot\textbf{w}+t(\textbf{w}\cdot\textbf{w})\\&=0+t||\textbf{w}||^2\\&=t||\textbf{w}||^2\end{aligned}$$

 

$t$는 다음과 같음.

$$t=\dfrac{\textbf{w}\cdot\textbf{x}}{||\textbf{w}||^2}$$

 

고로, $\bf{h}$는 다음과 같음.

$$\textbf{h}=t\textbf{w}=\dfrac{\textbf{x}\cdot\textbf{w}}{\|\textbf{w}\|^2}\textbf{w}=\dfrac{\textbf{x}\cdot\textbf{w}}{\textbf{w}\cdot\textbf{w}}\textbf{w}=\dfrac{\textbf{x}\cdot\textbf{w}}{\textbf{w}^\top\textbf{w}}\textbf{w}$$

 

덧붙여서 $\textbf{y}$ 를 다음과 같이 나타낼 수 있음.

$$\bf{y}=\bf{x}-\bf{h}$$

 

참고로, 이를 Projection Matrix의 개념으로 살펴보면,

$$\begin{aligned}\mathbf{y} &= I \mathbf{x} - P_\mathbf{w} \mathbf{x} \\ P_\mathbf{\perp w}\mathbf{x} &= (I-P_\mathbf{w}) \mathbf{x}\end{aligned}$$

즉, $\mathbf{y}$를 구하기 위한 Projection Matrix $P_\mathbf{\perp w}$를 $I-P_\mathbf{w}$로 구할 수 있음.


inner product 등의 vector에 대해 익숙치 않으면 다음을 참고.

2022.03.28 - [.../Math] - [Math] Vector (1)

 

[Math] Vector (1)

Scalar 오직 magnitude(크기)만을 가지는 물리량. 숫자 하나. ndim=0, rank=0 Vector magnitude와 direction을 가지는 물리량. ordered list of numbers. ndim=1, rank=1로 vector가 표현됨. : vector는 다차원 vector space의 특정 poin

dsaint31.tistory.com

 

Orhtogonal projection을 이용한 foot of perpendicular의 Python 구현물은 다음을 참고.

https://ds31x.tistory.com/29

 

[Python] 특정 점에서 직선에 수선의 발 구하기.

특정 pnt에서 두 점 segment_s(s), segment_e(e)로 정의된 line segment를 포함하는 line으로 수선의 발(foot of perpendicular line)를 내리는 경우는 다음과 같음. 위 그림에서 x가 바로 foot of perpendicular line임. 다음

ds31x.tistory.com

 

Orthogonal projection을 이용한 점과 직선 (또는 평면)의 거리를 구하는 것은 다음을 참고

2022.05.19 - [.../Math] - [Math] Distance between Point and Plane : 점과 직선의 거리

 

[Math] Distance between Point and Plane : 점과 직선의 거리

position vector $\textbf{x}$ (point $Q$)와 $\textbf{n}\cdot \textbf{p}+b=0$을 만족하는 position vector $\textbf{p}$들로 구성되는 평면(plane $P$)과의 거리는 다음과 같음. $$d=\dfrac{|\textbf{n}\cdot\textbf{x}+b|}{\|\textbf{n}\|}$$ whe

dsaint31.tistory.com


2025.01.21 - [.../Linear Algebra] - [Summary] Linear Algebra (작성중)

 

[Summary] Linear Algebra (작성중)

ML 을 위해 Linear Algebra 공부시 참고할만한 책더보기전체적으로 공부를 한다면 다음을 권함.Linear Algebra and Its Application, 5th ed 이상, David C. Lay5th ed. 는 웹에서 쉽게 pdf도 구할 수 있음. 다음은 1~2개

dsaint31.tistory.com


 

728x90

'... > Math' 카테고리의 다른 글

[Math] 필요조건, 충분조건, 필요충분조건  (0) 2022.05.19
[Math] Plane Equation : 평면의 방정식  (0) 2022.05.19
[Math] Distance between Point and Plane : 점과 직선의 거리  (1) 2022.05.19
[ML] Softmax function  (0) 2022.05.12
[Math] Entropy 란 (평균정보량, 정보량의 기댓값)  (0) 2022.05.12
'.../Math' 카테고리의 다른 글
  • [Math] 필요조건, 충분조건, 필요충분조건
  • [Math] Plane Equation : 평면의 방정식
  • [Math] Distance between Point and Plane : 점과 직선의 거리
  • [ML] Softmax function
dsaint31x
dsaint31x
    반응형
    250x250
  • dsaint31x
    Dsaint31's blog
    dsaint31x
  • 전체
    오늘
    어제
    • 분류 전체보기 (785)
      • Private Life (15)
      • Programming (55)
        • DIP (116)
        • ML (34)
      • Computer (119)
        • CE (53)
        • ETC (33)
        • CUDA (3)
        • Blog, Markdown, Latex (4)
        • Linux (9)
      • ... (368)
        • Signals and Systems (115)
        • Math (176)
        • Linear Algebra (33)
        • Physics (43)
        • 인성세미나 (1)
      • 정리필요. (61)
        • 의료기기의 이해 (6)
        • PET, MRI and so on. (7)
        • PET Study 2009 (1)
        • 방사선 장해방호 (5)
        • 방사선 생물학 (3)
        • 방사선 계측 (9)
        • 기타 방사능관련 (3)
        • 고시 (9)
        • 정리 (18)
      • RI (0)
      • 원자력,방사능 관련법 (2)
  • 블로그 메뉴

    • Math
    • Programming
    • SS
    • DIP
  • 링크

    • Convex Optimization For All
  • 공지사항

    • Test
    • PET Study 2009
    • 기타 방사능관련.
  • 인기 글

  • 태그

    linear algebra
    signal_and_system
    cv2
    ML
    opencv
    SS
    Probability
    Vector
    Optimization
    SIGNAL
    Programming
    인허가제도
    math
    random
    Python
    function
    Term
    numpy
    fourier transform
    signals_and_systems
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
dsaint31x
[Math] Orthogonal Projection (정사영)
상단으로

티스토리툴바