[Linear Algebra] Lecture 15

Author

SEOYEON CHOI

Published

April 6, 2024

학습 목표

목표: solution이 없을때 solution을 구하는 법 -> \(Ax = b\)에서 \(b\)가 column space에 없다면???

Projection 투영

벡터 a에 벡터b에서 (수직방향으로 선틀 그렸을때 만나는)projection하면 나오는 \(p=xa = Pb\)가 됌. 여기서 error 값 \(e = b-p\)가 생김.

벡터 a와 수직인 e를 수식으로 나타낸다면? \(a^T (b - xa) = 0\) \(\to\) orthogonal하니까,

\(xa^T a = a^T b\)

\(x = \frac{a^T b }{a^T a}\)

\(p = ax\)

\(p = a \frac{a^T b }{a^T a}\)

투영 벡터를 식으로 표현했을때 선형 대수적으로 표현한 것과 삼각법(cos)으로 표현한 것 일치

\(p = Pb\)

\(P = \frac{a a^T}{a^T a}\)

- 지난 강의에서 배운 바, 어떤 두 벡터를 column vector \(\times\) row vector 순으로 곱하면 rank 1 인 행렬이 만들어진다는 것을 앎

\(C(P)\) = line through \(a\) column space of P는 a를 지나가는 선

rank(\(p\)) = 1

\(\star\)

Project 투영의 개념을 배우는 이유는 뭘까?

Why project?

- When the dimension is 3

3차원 공간에서 \(a_1\) 벡터는 \(x,y\) 축 사이로 뻗어 있고, \(a_2\)\(y,z\) 축 사이로 뻗어 있고, \(b\)\(y\)축 위로 뻗어 있다면, \(b\)는 column space 평면 위에 존재하지 않기 때문에 만족하는 해 \(x\)는 존재하지 않는다 그래서 근접한 해를 찾자는게 관건이다.

plane of \(a_1, a_2\) \(\to\) \(a_1,a_2\)가 basis임. 여기에 \(b\)가 가장 가까운 project는 수직으로 내리는 것이라는 것을 우리는 앎. 그게 projection \(P\)

colspace of overdetermined matrix \(A = \begin{bmatrix} \vdots & \vdots \\ a_1 & a_2 \\ \vdots & \vdots \end{bmatrix}\)

\(e = b - p\) is group to plane

\(p = x_1 a_1 + x_2 a_2 = A {\hat x}\)

\(p = A{\hat x}\) find \({\hat x}\)

key: \(b - p = b - A {\hat x}\) is \(\perp\) plane

\(a_1^T (b - A {\hat x}) = 0\)

\(a_2^T (b - A {\hat x}) = 0\)

\(\begin{bmatrix} a_1^T \\ a_2^T\end{bmatrix} \begin{bmatrix} b - A {\hat x} \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \end{bmatrix}\)

\(A^T(b - A {\hat x}) = 0\) \(\to\) left null space의 형태랑 비슷

\(e\) in \(N(A^T)\)

\(e \perp C(A)\)? \(\to\) Yes

\(A^T A {\hat x} = A^T b\)

\({\hat x} = (A^T A)^{-1} A^T b\) \(\to\) 이것은 최적해 best solution

\(pp = A {\hat x} = A(A^TA)^{-1} A^T b\)

matrix \(P = A(A^TA)^{-1} A^T\)

\(A A^{-1}(A^T)^T A^T = I\)

\(P^T = P\)

\(P^2 = P\)


- least squares

Fitting by a line