[Linear Algebra] Lecture 17

Author

SEOYEON CHOI

Published

April 14, 2024

학습 목표

- orthonormal vectors 정규직교벡터 = 직교 벡터이면서 단위벡터인 벡터

ex) 두 벡터가 직교를 이루고 있고, 길이는 1일때,

\(q_i^T q_j = \begin{cases} 0 & \text{if } i \ne j \\ 1 & \text{if } i = j \end{cases}\)

\(Q = \begin{bmatrix} \vdots & & \vdots \\ q_1 & \cdots & q_n \\ \vdots & & \vdots \end{bmatrix}\)

\(Q^TQ = \begin{bmatrix} \cdots q_1^T \cdots \\ \cdots q_n^T \cdots\end{bmatrix} \begin{bmatrix} \vdots & & \vdots \\ q_1 & \cdots & q_n \\ \vdots & & \vdots \end{bmatrix} \begin{bmatrix}1 & 0 & \cdots& 0 \\ 0 & 1 & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & 1 \end{bmatrix} = I\)

If \(Q\) is square then \(Q^TQ = I\) tells us \(Q^T = Q^{-1}\)

Examples

perm \(Q = \begin{bmatrix} 0 & 0 & 1 \\ 1 & 0 & 0 \\ 0 & 1 & 0\end{bmatrix}\)

1

\(QQ^T = I\)

\(\begin{bmatrix} 0 & 0 & 1 \\ 1 & 0 & 0 \\ 0 & 1 & 0\end{bmatrix}\begin{bmatrix} 0 & 1 & 0 \\ 0 & 0 & 1 \\ 1 & 0 & 0 \end{bmatrix} = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}\)

\(\star\) \(Q^T = Q^{-1}\)

2

\(Q = \begin{bmatrix} \cos \theta & - \sin \theta \\ \sin \theta & \cos \theta \end{bmatrix}\)

\(q_1 = \begin{bmatrix} \cos \theta \\ \sin \theta \end{bmatrix}\), \(q_2 = \begin{bmatrix} -\sin \theta \\ \cos \theta \end{bmatrix}\)

\(q_1 \cdot q_2 = \begin{bmatrix}\cos \theta \\ \sin \end{bmatrix}^T \begin{bmatrix}-\sin \theta \\ \cos \theta \end{bmatrix} = -\cos \theta \sin \theta + \sin \theta \cos \theta = 0\)

\(||q_1|| = ||q_2|| = \sqrt{\cos^2 \theta + \sin^2 \theta} = \sqrt{1} = 1\)

3

\(Q = \begin{bmatrix} 1 & 1 \\ 1 & -1\end{bmatrix}\) \(\to\) \(Q^TQ = 0\)가 직교 벡터이지만, 벡터의 길이가 1이 아니라면?

\(Q = \frac{1}{\sqrt{2}} \begin{bmatrix} 1 & 1 \\ 1 & -1\end{bmatrix}\) \(\to\) scale 조정하면 된다.

\(||q_1|| = \sqrt{1^2+ 1^2 } = \sqrt{2}\)

\(||q_2|| = \sqrt{1^2+ (-1)^2 } = \sqrt{2}\)

4

\(Q = \begin{bmatrix} 1 & 1 & 1 & 1 \\ 1 & -1 & 1 & -1 \\ 1 & 1 & -1 & -1 \\ 1 & -1 & -1 & 1 \end{bmatrix}\), 마찬가지, 직교행렬이지만 길이는 1이 아닐때

\(Q = \frac{1}{2}\begin{bmatrix} 1 & 1 & 1 & 1 \\ 1 & -1 & 1 & -1 \\ 1 & 1 & -1 & -1 \\ 1 & -1 & -1 & 1 \end{bmatrix}\) 스케일 조정

5

\(Q = \frac{1}{3}\begin{bmatrix} 1 & -2 & 2 \\ 2 & -1 & -2 \\ 2 & 2 & 1 \end{bmatrix}\)

\(Q\) has orthogonal columns

project onto its column space

\(P = Q(Q^TQ)^{-1} Q^T Q Q^T = QQ^T =I\), if \(Q\) is square.

\((QQ^T)(QQ^T) = QQ^T\) \(\to\) Projection matrix 특징

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

Now \(A\) is \(Q\)

\(Q^TQ \hat{x} = Q^T b\)

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

\(\hat{x}_i = {\bf q}_i^T b\) \(\to\) component로 해석

Gram-schmidt

Independent vectors \(a,b\) 가 있을때, \(a\) 기준으로 보면 \(a\)에 수직내린 \(B\)를 따로 찾을거야

$A, B = $ orthogonal vectors

\(q_1 = \frac{A}{||A||}\), \(q_2 = \frac{B}{||B||}\)

\(e = b-p\)

\(B \approx error = b - \frac{A^Tb}{A^TA} A\)

\(A^TB = A^T (b - \frac{A^Tb}{A^TA} A)\)

\(A \bot B\)

- \(C\) 가 추가된다면

$A,B,C = $ Orthogonal vectors

\(q_1 = \frac{A}{||A||}\), \(q_2 = \frac{B}{||B||}\), \(q_3 = \frac{C}{||C||}\)

\(C = c - \frac{A^Tc}{A^TA}A - \frac{B^Tc}{B^TB}B\)

\(C \bot A\)

\(C \bot B\)

\(a = \begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix}\), \(b = \begin{bmatrix} 1 \\ 0 \\ 2\end{bmatrix}\), \(B = b - \frac{A^Tb}{A^TA}B = \begin{bmatrix} 1 \\ 0 \\ 2\end{bmatrix} - \frac{3}{3} \begin{bmatrix} 1 \\ 0 \\ 2\end{bmatrix} = \begin{bmatrix} 0 \\ -1 \\ 1\end{bmatrix}\)

\(\star\) \(A^Tb = \begin{bmatrix} 1 & 1 & 1 \end{bmatrix} \begin{bmatrix} 1 \\ 0 \\ 2\end{bmatrix} = 3\)

\(\star\) \(A^TA = \begin{bmatrix} 1 & 1 & 1 \end{bmatrix} \begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix} = 3\)

\(Q = \begin{bmatrix} \vdots & \vdots \\ a_1 & a_2 \\ \vdots & \vdots \end{bmatrix} = \begin{bmatrix} \frac{1}{\sqrt{3}} & 0 \\ \frac{1}{\sqrt{3}} & -\frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{3}} & \frac{1}{\sqrt{2}}\end{bmatrix}\)

\(A = \begin{bmatrix} 1 & 1 \\ 1 & 0 \\ 1 & 2\end{bmatrix}\)

\(A \bot B\)

\(A = LU\)

\(A = QR\)

\(A = \begin{bmatrix} a_1 & a_2\end{bmatrix} = \begin{bmatrix} q_1 & q_2\end{bmatrix}\begin{bmatrix} a_1^Tq_1 & q_2^Tq_1 \\ a_1^Tq_2 & a_2^Tq_2\end{bmatrix}\)


unit vector

단순히 말하면 크기를 변화해주는 벡터.

\(\hat{v} = \frac{v}{||v||}\)의 형태를 가지고 있다.

\(\to\) 기존의 벡터 \(v\) 를 벡터의 크기 \(||v||\) 로 나눠주면 된다.

ex)

\(v = \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix}\), \(||v|| = \sqrt{1 + 4 + 9} = \sqrt{14}\)

\(\hat{v} = \frac{v}{||v||} = \begin{bmatrix} \frac{1}{\sqrt{14}} & \frac{2}{\sqrt{14}} & \frac{3}{\sqrt{14}}\end{bmatrix}^T\)