27.32 영 공간(Null Space)의 정의와 해 공간의 구조

1. 영 공간의 정의

행렬 \mathbf{A} \in \mathbb{R}^{m \times n}의 영 공간(null space) 또는 핵(kernel)은 동차 방정식 \mathbf{A}\mathbf{x} = \mathbf{0}의 해 집합이다.

\text{Null}(\mathbf{A}) = \ker(\mathbf{A}) = \{\mathbf{x} \in \mathbb{R}^n \mid \mathbf{A}\mathbf{x} = \mathbf{0}\}

영 공간은 \mathbb{R}^n의 부분 공간이다. 이를 증명하기 위해 세 가지 조건을 확인하자.

  1. \mathbf{A}\mathbf{0} = \mathbf{0}이므로 \mathbf{0} \in \text{Null}(\mathbf{A})이다.
  2. \mathbf{x}, \mathbf{y} \in \text{Null}(\mathbf{A})이면, \mathbf{A}(\mathbf{x} + \mathbf{y}) = \mathbf{A}\mathbf{x} + \mathbf{A}\mathbf{y} = \mathbf{0} + \mathbf{0} = \mathbf{0}이므로 \mathbf{x} + \mathbf{y} \in \text{Null}(\mathbf{A})이다.
  3. \mathbf{x} \in \text{Null}(\mathbf{A})이고 c \in \mathbb{R}이면, \mathbf{A}(c\mathbf{x}) = c\mathbf{A}\mathbf{x} = c\mathbf{0} = \mathbf{0}이므로 c\mathbf{x} \in \text{Null}(\mathbf{A})이다.

영 공간의 차원을 무효(nullity)라 하고 \text{nullity}(\mathbf{A}) = \dim(\text{Null}(\mathbf{A}))로 표기한다. 계수-무효 정리에 의하여 \text{rank}(\mathbf{A}) + \text{nullity}(\mathbf{A}) = n이다.

2. 영 공간의 기하학적 의미

선형 변환 T(\mathbf{x}) = \mathbf{A}\mathbf{x}의 관점에서, 영 공간은 변환에 의해 영벡터로 보내지는 모든 벡터의 집합이다. 기하학적으로 이는 변환에 의해 “소멸되는” 방향들의 공간이다.

\text{Null}(\mathbf{A}) = \{\mathbf{0}\}이면 변환은 단사(injective)이다. 서로 다른 입력이 서로 다른 출력에 대응하므로 정보 손실이 없다. 이 경우 \text{nullity}(\mathbf{A}) = 0이고 \text{rank}(\mathbf{A}) = n이다.

\text{Null}(\mathbf{A}) \neq \{\mathbf{0}\}이면 변환에 의해 구별 불가능한 입력 쌍이 존재한다. \mathbf{x}_1 - \mathbf{x}_2 \in \text{Null}(\mathbf{A})이면 \mathbf{A}\mathbf{x}_1 = \mathbf{A}\mathbf{x}_2이므로, 영 공간의 차원만큼 정보가 손실된다.

영 공간과 행 공간은 직교 보공간 관계에 있다.

\text{Null}(\mathbf{A}) = \text{Row}(\mathbf{A})^\perp

이를 증명하면, \mathbf{x} \in \text{Null}(\mathbf{A})이면 \mathbf{A}\mathbf{x} = \mathbf{0}이고, 이는 \mathbf{A}의 각 행벡터 \mathbf{r}_i에 대하여 \mathbf{r}_i^\top\mathbf{x} = 0을 의미한다. 따라서 \mathbf{x}는 모든 행벡터에 직교하며, 행 공간의 모든 벡터에 직교한다.

3. 영 공간의 계산

영 공간의 기저를 구하려면 \mathbf{A}\mathbf{x} = \mathbf{0}을 행 사다리꼴 형식(reduced row echelon form, RREF)으로 변환하여 풀면 된다.

예를 들어, 다음 행렬의 영 공간을 구하자.

\mathbf{A} = \begin{pmatrix} 1 & 2 & 1 & 3 \\ 2 & 4 & 3 & 8 \\ 3 & 6 & 4 & 11 \end{pmatrix}

행 사다리꼴 형식으로 변환하면,

\text{RREF}(\mathbf{A}) = \begin{pmatrix} 1 & 2 & 0 & -2 \\ 0 & 0 & 1 & 2 \\ 0 & 0 & 0 & 0 \end{pmatrix}

피벗 변수는 x_1, x_3이고, 자유 변수는 x_2 = s, x_4 = t이다. 연립방정식을 풀면,

x_1 = -2s + 2t, \quad x_3 = -2t

따라서 일반해는 다음과 같다.

\mathbf{x} = s\begin{pmatrix} -2 \\ 1 \\ 0 \\ 0 \end{pmatrix} + t\begin{pmatrix} 2 \\ 0 \\ -2 \\ 1 \end{pmatrix}, \quad s, t \in \mathbb{R}

영 공간의 기저는 \left\{\begin{pmatrix} -2 \\ 1 \\ 0 \\ 0 \end{pmatrix}, \begin{pmatrix} 2 \\ 0 \\ -2 \\ 1 \end{pmatrix}\right\}이고, \text{nullity}(\mathbf{A}) = 2이다. \text{rank}(\mathbf{A}) = 2이므로 \text{rank} + \text{nullity} = 2 + 2 = 4 = n이 확인된다.

4. 비동차 연립방정식의 해 공간 구조

비동차 방정식 \mathbf{A}\mathbf{x} = \mathbf{b} (\mathbf{b} \neq \mathbf{0})의 해 집합은 부분 공간이 아니라 아핀 부분 공간(affine subspace)이다. 해가 존재하면, 해 집합의 구조는 다음과 같다.

\{\mathbf{x} \in \mathbb{R}^n \mid \mathbf{A}\mathbf{x} = \mathbf{b}\} = \mathbf{x}_p + \text{Null}(\mathbf{A})

여기서 \mathbf{x}_p\mathbf{A}\mathbf{x}_p = \mathbf{b}를 만족하는 임의의 특수해(particular solution)이다. 일반해는 특수해와 동차 방정식의 일반해의 합으로 표현된다.

\mathbf{x} = \mathbf{x}_p + \mathbf{x}_h, \quad \mathbf{x}_h \in \text{Null}(\mathbf{A})

이를 확인하면, \mathbf{A}\mathbf{x} = \mathbf{A}(\mathbf{x}_p + \mathbf{x}_h) = \mathbf{A}\mathbf{x}_p + \mathbf{A}\mathbf{x}_h = \mathbf{b} + \mathbf{0} = \mathbf{b}이다. 역으로, \mathbf{A}\mathbf{x} = \mathbf{b}의 두 해 \mathbf{x}_1, \mathbf{x}_2에 대하여 \mathbf{A}(\mathbf{x}_1 - \mathbf{x}_2) = \mathbf{0}이므로 \mathbf{x}_1 - \mathbf{x}_2 \in \text{Null}(\mathbf{A})이다.

해의 존재 조건과 유일성은 다음과 같이 정리된다.

조건해의 상태
\text{rank}(\mathbf{A}) = \text{rank}([\mathbf{A} \vert \mathbf{b}]), \text{nullity} = 0유일한 해
\text{rank}(\mathbf{A}) = \text{rank}([\mathbf{A} \vert \mathbf{b}]), \text{nullity} > 0무한히 많은 해
\text{rank}(\mathbf{A}) < \text{rank}([\mathbf{A} \vert \mathbf{b}])해 없음

5. 왼쪽 영 공간

\mathbf{A}^\top의 영 공간을 \mathbf{A}의 왼쪽 영 공간(left null space)이라 한다.

\text{Null}(\mathbf{A}^\top) = \{\mathbf{y} \in \mathbb{R}^m \mid \mathbf{A}^\top\mathbf{y} = \mathbf{0}\} = \{\mathbf{y} \in \mathbb{R}^m \mid \mathbf{y}^\top\mathbf{A} = \mathbf{0}^\top\}

왼쪽 영 공간은 열 공간의 직교 보공간이다. \text{Null}(\mathbf{A}^\top) = \text{Col}(\mathbf{A})^\perp. 차원은 \dim(\text{Null}(\mathbf{A}^\top)) = m - \text{rank}(\mathbf{A})이다.

네 가지 기본 부분 공간의 직교 관계를 요약하면, \mathbb{R}^n = \text{Row}(\mathbf{A}) \oplus \text{Null}(\mathbf{A})이고 \mathbb{R}^m = \text{Col}(\mathbf{A}) \oplus \text{Null}(\mathbf{A}^\top)이다.

6. 딥러닝에서의 영 공간

딥러닝에서 영 공간은 모델의 구조적 성질과 학습 동역학을 이해하는 데 중요하다.

과매개변수화(Overparameterization): 현대 딥러닝 모델은 학습 데이터 수보다 매개변수 수가 훨씬 많은 과매개변수화 상태이다. 이는 손실 함수의 기울기가 0인 점들의 집합이 고차원 매니폴드를 형성함을 의미하며, 기울기 기반 최적화는 이 매니폴드 위의 특정 점으로 수렴한다. 기울기 행렬의 영 공간이 큰 차원을 가지므로, 해는 유일하지 않고 초기화와 최적화 경로에 의존한다.

배치 정규화와 영 공간: 배치 정규화 계층에서 평균을 뺄 때, 전체 평균에 해당하는 벡터 \mathbf{1} = (1, \ldots, 1)^\top 방향의 성분이 제거된다. 이는 중심화 행렬 \mathbf{C} = \mathbf{I} - \frac{1}{n}\mathbf{1}\mathbf{1}^\top에 의한 사영으로, \text{Null}(\mathbf{C}) = \text{span}(\mathbf{1})이다.

순환 일관성(Cycle Consistency): 오토인코더에서 인코더 f: \mathbb{R}^D \to \mathbb{R}^d (d < D)의 영 공간은 복원 불가능한 정보의 방향을 나타낸다. 완벽한 재구성이 불가능한 이유는 인코더 행렬(선형의 경우)의 영 공간이 비자명(nontrivial)하기 때문이며, 영 공간에 속하는 변동은 잠재 표현에서 구별할 수 없다.