[선형대수] Lecture 14: Orthogonal vectors and subspaces

이재호·2025년 3월 8일

선형대수

목록 보기
13/31

https://ocw.mit.edu/courses/18-06-linear-algebra-spring-2010/video_galleries/video-lectures/

먼저 다음과 같이 정리를 하고, 이후 증명을 한다.

dim(row space):rdim(row \ space) : r
dim(N(A)):nrdim(N(A)) : n-r
1. row space and N(A) are orthogonal.\text{1. row space and $N(A)$ are orthogonal.}
dim(column space):rdim(column \ space) : r
dim(N(AT)):mrdim(N(A^T)) : m-r
2. column space and N(AT) are orthogonal.\text{2. column space and $N(A^T)$ are orthogonal.}

이를 위해 먼저 orthogonal vector에 대해서 알아보자.

위와 같이 벡터 x, y 그리고 x+y가 있다고 해보자. 그림과 같이 벡터 x와 벡터 y는 직교(orthgonal)한다.

  • 이를 피타고라스법으로 증명해보자.
    • x2+y2=x+y2||x||^2+||y||^2=||x+y||^2 식이 나올 것이다.
    • 그리고 x||x||는 벡터식으로 표현하면 다음과 같다. x2=xTx||x||^2=x^Tx
    • 따라서 위 식을 벡터로 표현하면, 아래와 같다.
      xTx+yTy=(x+y)T(x+y)=xTx+xTy+yTx+yTyx^Tx+y^Ty=(x+y)^T(x+y)=x^Tx+x^Ty+y^Tx+y^Ty
    • 위 벡터식을 정리하면, xTy+yTx=2xTy=0x^Ty+y^Tx=2x^Ty=0이 되어,
      xTy=0x^Ty=0이라는 결과를 얻을 수 있다.

따라서 두 벡터 x,yx,y에 대해서, xTy=0x^Ty=0이라면 두 벡터는 직교한다고 볼 수 있다.
예시를 들어서 해보자.

x=[123],y=[210],x+y=[313]x= \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix}, y= \begin{bmatrix} 2 \\ -1 \\ 0 \end{bmatrix}, x+y= \begin{bmatrix} 3 \\ 1 \\ 3 \end{bmatrix}
x2=1+4+9=14||x||^2=1+4+9=14
y2=4+1+0=5||y||^2=4+1+0=5
x+y2=9+1+9=19=x2+y2||x+y||^2=9+1+9=19 = ||x||^2+||y||^2

그렇다면 "orthogonal subspaces"는 무엇일까? 다음과 같이 정의를 내린다.

Subspace S is orthogonal to subspace T.\text{Subspace $S$ is orthogonal to subspace $T$.}
Every vecotr in S is orthogonal to every vector in T.\rightarrow \text{Every vecotr in $S$ is orthogonal to every vector in $T$.}

그리고 직교하는 두 subspace SS, TT는 유일하게 00에서만 만난다.


다음으로 "row space is orthogonal to null space"에서 대해서 증명해보자.

Ax=0Ax=0
[row1 of Arow2 of A..rowm of A][x1..xk]=[00..0]\begin{bmatrix} row_1 \ of \ A \\ row_2 \ of \ A \\ . \\ . \\ row_m \ of \ A \\ \end{bmatrix} \begin{bmatrix} x_1 \\ . \\ . \\ x_k \\ \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \\ . \\ . \\ 0 \\ \end{bmatrix}
  • 위에서 null space N(A)N(A)는 벡터 xx들의 모든 조합을 의미한다. 그리고 벡터 xxAA의 row와 dot product를 하면 결과가 0이 나오게 된다. ( [row1 of A][x1..xk]=0\begin{bmatrix} row_1 \ of \ A\end{bmatrix}\begin{bmatrix} x_1 \\ . \\ . \\ x_k \\ \end{bmatrix}=0 )

따라서 row와 x가 서로 직교함을 알 수가 있고, 이에 따라 row space와 null space는 서로 직교한다고 볼 수 있다.


orthgonal 내용이 끝나고 강의에서 다음과 같은 질문을 던진다.

solve Ax=b when there is no solution.\text{solve $Ax=b$ when there is no solution.}

즉, Ax=bAx=b의 솔루션이 없을 때 최적의 솔루션을 구하라는 의미이다. 어떻게 구할 수 있을까?

먼저, ATAA^TA에 대해서 생각해보자 (A:m×nA:m \times n). 이를 통해 추론이 가능한 점은 다음과 같다.

  • ATAA^TA는 square matrix다. An×mTAm×n?n×nA^T_{n \times m}A_{m \times n}\rightarrow?_{n \times n}
  • ATAA^TA는 symmetric matrix다. (ATA)T=ATATT=ATA(A^TA)^T=A^TA^{TT}=A^TA

그래서 위 조건을 이용해서, 강의에서는 최적의 솔루션은 다음과 같다고 한다.

ATAx^=ATbA^TA\hat{x}=A^Tb
x^ is best solution.\text{$\hat{x}$ is best solution.}

그리고 다음과 같은 정리도 가능하다.

N(ATA)=N(A)N(A^TA)=N(A)
rank(ATA)=rank(A)rank(A^TA)=rank(A)
ATA is invertible exactly if A has independent columns.\text{$A^TA$ is invertible exactly if $A$ has independent columns.}

예시와 함께 보자.

A1=[111215],A2=[131313]A_1= \begin{bmatrix} 1 & 1 \\ 1 & 2 \\ 1 & 5 \\ \end{bmatrix}, A_2= \begin{bmatrix} 1 & 3 \\ 1 & 3 \\ 1 & 3 \\ \end{bmatrix}
A1TA1=[111125][111215]=[38830]A_1^TA_1= \begin{bmatrix} 1 & 1 & 1\\ 1 & 2 & 5\\ \end{bmatrix} \begin{bmatrix} 1 & 1 \\ 1 & 2 \\ 1 & 5 \\ \end{bmatrix} = \begin{bmatrix} 3 & 8 \\ 8 & 30 \\ \end{bmatrix}
A2TA2=[111333][131313]=[39927]A_2^TA_2= \begin{bmatrix} 1 & 1 & 1\\ 3 & 3 & 3\\ \end{bmatrix} \begin{bmatrix} 1 & 3 \\ 1 & 3 \\ 1 & 3 \\ \end{bmatrix} = \begin{bmatrix} 3 & 9 \\ 9 & 27 \\ \end{bmatrix}
  • 위 정리와 같이 A1A_1A2A_2은 각각 A1TA1A_1^TA_1A2TA2A_2^TA_2와 같은 null space와 같은 rank를 가지는 것을 확인할 수 있다.
  • independent columns만 있는 A1A_1에 대해서 A1TA1A_1^TA_1도 independent columns만 있다.
    따라서 invertible이다.
  • 반면에 dependent column이 있는 A2A_2에 대해서 A2TA2A_2^TA_2도 dependent column만 있다.
    따라서 not invertible이다.
profile
천천히, 그리고 꾸준히.

0개의 댓글