Problem Statement: $\mathbf{A}\mathbf{x} = \mathbf{b}$ 에 해가 없을 때, $\mathbf{b}$ 의 어느 성분이 $\mathbf{A}$ 의 출력으로 만들어질 수 없는지는 column space 만으로 드러나지 않는다.
Goal: 독자가 left null space 를 구하고, $\mathbf{b}$ 를 column space 성분과 left null space 성분으로 나누어 해가 있는지와 최소제곱 잔차를 가려낼 수 있게 한다.
Non-Goal: 최소제곱 해를 구하는 algorithm 과 복소 행렬은 다루지 않는다.
2. Summary
Left null space 는 $m \times n$ 행렬 $\mathbf{A}$ 의 전치 $\mathbf{A}^\top$ 의 null space 이고, $\mathbf{y}^\top\mathbf{A} = \mathbf{0}^\top$ 인 $\mathbf{y}$ 의 집합이며 출력 공간 $\mathbb{R}^m$ 의 부분공간이다.
Left null space 는 column space 와 직교하고, 두 공간의 직합이 $\mathbb{R}^m$ 전체이다.
$\mathbf{A}\mathbf{x} = \mathbf{b}$ 의 해가 없으면 $\mathbf{b}$ 의 left null space 성분이 0 이 아니고, 그 성분이 최소제곱 잔차이다.
3. Notation
이 문서의 vector 는 모두 열 vector 이다. 이 문서가 쓰는 기호는 아래 Table 1 이다.
Table 1. Symbols
Symbol
Meaning
Shape
Assumption
$\mathbb{R}$
실수 전체의 집합. $\mathbb{R}^m$ 은 원소가 실수 $m$ 개인 열 vector 전체이다
집합
실수
$\mathbf{A}$
선형 변환을 나타내는 행렬
$m \times n$
실수 원소
$m$, $n$
$\mathbf{A}$ 의 행의 수와 열의 수
scalar
양의 정수
$\mathbf{x}$
입력 vector
$n \times 1$
실수 원소
$\mathbf{y}$
출력 공간의 vector, $\mathbf{A}^\top$ 에 곱하는 vector
$m \times 1$
실수 원소
$\mathbf{b}$
선형방정식 $\mathbf{A}\mathbf{x} = \mathbf{b}$ 의 우변
$m \times 1$
실수 원소
$\mathbf{0}$
zero vector
$m \times 1$ 또는 $n \times 1$
모든 원소가 0
$\mathrm{Col}(\mathbf{A})$
$\mathbf{A}$ 의 column space
$\mathbb{R}^m$ 의 부분공간
$\mathbf{A}\mathbf{x}$ 전체
$\mathrm{Row}(\mathbf{A})$
$\mathbf{A}$ 의 row space
$\mathbb{R}^n$ 의 부분공간
$\mathbf{A}^\top\mathbf{y}$ 전체
$\mathrm{Null}(\mathbf{A})$
$\mathbf{A}$ 의 null space
$\mathbb{R}^n$ 의 부분공간
$\mathbf{A}\mathbf{x} = \mathbf{0}$ 인 $\mathbf{x}$ 전체
$\mathrm{Null}(\mathbf{A}^\top)$
$\mathbf{A}$ 의 left null space
$\mathbb{R}^m$ 의 부분공간
$\mathbf{A}^\top\mathbf{y} = \mathbf{0}$ 인 $\mathbf{y}$ 전체
왜 "좌영공간 (Left Null Space)" 이라 부를까? ($\mathbf{y}^\top\mathbf{A} = \mathbf{0}^\top$ 의 의미)
일반적인 영공간 ($\mathbf{A}\mathbf{x} = \mathbf{0}$) 은 vector $\mathbf{x}$ 가 행렬 $\mathbf{A}$ 의 오른쪽에 곱해진다 (right-multiplication).
좌영공간 ($\mathbf{y}^\top\mathbf{A} = \mathbf{0}^\top$) 은 vector $\mathbf{y}^\top$ 이 행렬 $\mathbf{A}$ 의 왼쪽에 곱해진다 (left-multiplication).
$\mathbf{A}^\top\mathbf{y} = \mathbf{0}$ 의 양변을 전치하면 $\mathbf{y}^\top\mathbf{A} = \mathbf{0}^\top$ 이다. $\mathbf{y}^\top$ 이 $\mathbf{A}$ 의 왼쪽에 곱해져 zero vector 를 만들기 때문에 left null space 라 부른다. $\mathbf{A}^\top$ 는 열이 $m$ 개이므로 $\mathbf{y}$ 는 $\mathbb{R}^m$ 의 vector 이고, left null space 는 출력 공간 $\mathbb{R}^m$ 의 부분공간이다. Null space $\mathrm{Null}(\mathbf{A})$ 가 입력 공간 $\mathbb{R}^n$ 의 부분공간인 것과 대비된다.
4.2 Orthogonality to the Column Space
Left null space 의 모든 vector 는 column space 의 모든 vector 와 직교한다. $\mathbf{y}^\top\mathbf{A} = \mathbf{0}^\top$ 은 $\mathbf{y}$ 와 $\mathbf{A}$ 의 각 열의 내적이 0 이라는 뜻이고, column space 의 vector 는 열들의 일차결합이기 때문이다. 이를 $\mathrm{Null}(\mathbf{A}^\top) \perp \mathrm{Col}(\mathbf{A})$ 로 적으며, 유도는 Appendix B 에 있다.
4.3 Orthogonal Decomposition of the Output Space
출력 공간 $\mathbb{R}^m$ 은 column space 와 left null space 의 직합이다. 모든 $\mathbf{b}$ 는 두 성분의 합으로 하나씩만 나뉜다.
Column space 의 차원은 rank $r$ 이다. Left null space 는 열이 $m$ 개이고 rank 가 $r$ 인 $\mathbf{A}^\top$ 의 null space 이므로, rank-nullity 정리에 따라 차원이 $m - r$ 이다. 두 차원을 더하면 $m$ 이다. $\mathbf{A}\mathbf{x}$ 는 언제나 column space 에 있으므로, column space 성분은 $\mathbf{A}\mathbf{x}$ 로 만들 수 있는 성분이고, column space 와 직교하는 left null space 성분은 어떤 $\mathbf{x}$ 로도 만들 수 없는 성분이다.
4.4 Four Fundamental Subspaces
행렬 $\mathbf{A}$ 의 네 부분공간은 아래 Table 2 이다.
Table 2. Four fundamental subspaces of A
Subspace
Symbol
Ambient space
Dimension
Orthogonal to
Column space
$\mathrm{Col}(\mathbf{A})$
$\mathbb{R}^m$
$r$
$\mathrm{Null}(\mathbf{A}^\top)$
Left null space
$\mathrm{Null}(\mathbf{A}^\top)$
$\mathbb{R}^m$
$m - r$
$\mathrm{Col}(\mathbf{A})$
Row space
$\mathrm{Row}(\mathbf{A})$
$\mathbb{R}^n$
$r$
$\mathrm{Null}(\mathbf{A})$
Null space
$\mathrm{Null}(\mathbf{A})$
$\mathbb{R}^n$
$n - r$
$\mathrm{Row}(\mathbf{A})$
출력 공간 $\mathbb{R}^m$ 은 column space 와 left null space 로, 입력 공간 $\mathbb{R}^n$ 은 row space 와 null space 로 나뉜다. Null space 는 row space 와 직교하고 $\mathbf{A}$ 가 zero vector 로 보내는 입력 vector 의 집합이다. Left null space 는 column space 와 직교하고 $\mathbf{A}$ 의 출력으로 만들 수 없는 방향의 집합이다. Row space 와 null space 는 Row Space Primer 와 Null Space Primer 에 있다.
$\mathbf{A}$ 의 두 열은 일차독립이어서 rank 는 2 이고, column space 는 $\mathbb{R}^3$ 안의 평면이다. Left null space 는 $m - r = 1$ 차원이며 $\mathbf{n}$ 의 상수배 전체인 직선이다. $\mathbf{n}$ 은 두 열 $[1, 0, 1]^\top$, $[0, 1, 1]^\top$ 과 모두 내적이 0 이다.
$\mathbf{A}\mathbf{x}$ 는 column space 성분만 가질 수 있는데 $\mathbf{b}$ 의 left null space 성분이 zero vector 가 아니므로, $\mathbf{A}\mathbf{x} = \mathbf{b}$ 의 해는 없다. Column space 성분 $[2/3, -1/3, 1/3]^\top$ 은 첫째 열의 $2/3$ 배와 둘째 열의 $-1/3$ 배를 더한 값이므로, $\hat{\mathbf{x}} = [2/3, -1/3]^\top$ 으로 $\mathbf{A}\hat{\mathbf{x}} = [2/3, -1/3, 1/3]^\top$ 이 되어 column space 에 속한다.
6. Application
Left null space 는 해가 없는 선형방정식의 잔차와 해의 존재 조건을 정한다.
6.1 Least Squares Residual
$\lVert \mathbf{A}\mathbf{x} - \mathbf{b} \rVert$ 를 가장 작게 하는 최소제곱 해 $\hat{\mathbf{x}}$ 에 $\mathbf{A}$ 를 곱하면 $\mathbf{b}$ 의 column space 성분이 되고, 잔차 $\mathbf{b} - \mathbf{A}\hat{\mathbf{x}}$ 는 $\mathbf{b}$ 의 left null space 성분이다. 정규방정식 $\mathbf{A}^\top(\mathbf{b} - \mathbf{A}\hat{\mathbf{x}}) = \mathbf{0}$ 은 잔차가 left null space 에 속한다는 식이다. 식 (3) 의 $\mathbf{A}$ 와 $\mathbf{b} = [1, 0, 0]^\top$ 에서 잔차는 $[1/3, 1/3, -1/3]^\top$ 으로 식 (4) 의 left null space 성분과 같고, $\mathbf{A}^\top$ 을 곱하면 $[0, 0]^\top$ 이다. 같은 $\mathbf{A}$ 와 $\mathbf{b}$ 의 최소제곱 해를 pseudo-inverse 로 구하는 계산은 Pseudo-Inverse Primer 에 있다.
6.2 Solvability of Ax = b
$\mathbf{A}\mathbf{x} = \mathbf{b}$ 는 $\mathbf{b}$ 가 left null space 의 모든 vector 와 직교할 때만 해가 있다. 4.3 의 분해에서 $\mathbf{b}$ 가 left null space 의 모든 vector 와 직교하면 left null space 성분이 zero vector 이고, 그때만 $\mathbf{b}$ 가 $\mathbf{A}\mathbf{x}$ 로 만들 수 있는 column space 에 놓인다. Left null space 의 기저 vector 와 $\mathbf{b}$ 의 내적이 모두 0 인지로 확인한다. 식 (3) 에서 $\mathbf{n}^\top[1, 0, 0]^\top = -1$ 이어서 해가 없고, $\mathbf{n}^\top[2, 3, 5]^\top = -2 - 3 + 5 = 0$ 이어서 $\mathbf{b} = [2, 3, 5]^\top$ 은 해 $[2, 3]^\top$ 을 가진다.
6.3 Breaking Conditions
부동소수점 계산에서는 $\mathbf{n}^\top\mathbf{b}$ 가 정확히 0 이 되지 않으므로, 해가 있는지를 문턱값으로 판정한다. Left null space 는 특이값 분해에서 특이값 0 에 대응하는 좌특이벡터들이 생성하므로, 문턱값보다 작은 특이값을 0 으로 볼지에 따라 차원이 달라진다. $m \le n$ 이고 rank 가 $m$ 이면 left null space 에는 zero vector 만 있어 모든 $\mathbf{b}$ 에 해가 있다.
Appendix A. Terminology
column space: $\mathbf{x} \in \mathbb{R}^n$ 인 모든 $\mathbf{x}$ 에 대한 $\mathbf{A}\mathbf{x}$ 의 집합. $\mathbf{A}$ 의 열들의 일차결합 전체이다.
left null space: $\mathbf{A}^\top\mathbf{y} = \mathbf{0}$ 인 $\mathbf{y}$ 의 집합. $\mathbf{A}^\top$ 의 null space 이다.
null space: $\mathbf{A}\mathbf{x} = \mathbf{0}$ 인 $\mathbf{x}$ 의 집합.
pseudo-inverse: 정사각이 아니거나 역행렬이 없는 행렬에도 정의되는 역행렬의 일반화. Moore–Penrose pseudo-inverse 라고도 한다.
row space: $\mathbf{y} \in \mathbb{R}^m$ 인 모든 $\mathbf{y}$ 에 대한 $\mathbf{A}^\top\mathbf{y}$ 의 집합. $\mathbf{A}$ 의 행들의 일차결합 전체이다.
부분공간 (subspace): Vector space 의 부분집합이면서 그 자체로 vector space 인 집합.
일차결합 (linear combination): vector 여러 개에 각각 상수를 곱해 모두 더한 vector.
정규방정식 (normal equation): 최소제곱 해 $\hat{\mathbf{x}}$ 를 구하는 식 $\mathbf{A}^\top\mathbf{A}\hat{\mathbf{x}} = \mathbf{A}^\top\mathbf{b}$.
좌특이벡터 (left singular vector): 특이값 분해 $\mathbf{A} = \mathbf{U}\boldsymbol{\Sigma}\mathbf{V}^\top$ 에서 $\mathbf{U}$ 의 열. 출력 공간 $\mathbb{R}^m$ 의 단위 vector 이다.
직교 (orthogonal): 두 vector 의 내적이 0 인 것.
최소제곱 해 (least squares solution): $\lVert \mathbf{A}\mathbf{x} - \mathbf{b} \rVert$ 를 가장 작게 하는 $\mathbf{x}$.
Appendix B. Derivation
$\mathrm{Null}(\mathbf{A}^\top) \perp \mathrm{Col}(\mathbf{A})$ 는 column space 의 vector $\mathbf{A}\mathbf{x}$ 와 left null space 의 vector $\mathbf{y}$ 의 내적이 0 임을 보이면 된다.
Certainly, as teams invest more effort into left null space primer, which skill gap becomes most noticeable once projects move past pilot testing? PUTI
Certainly, as teams invest more effort into left null space primer, which skill gap becomes most noticeable once projects move past pilot testing? PUTI