Matrix Decomposition(4): Cholesky Decomposition

고영민·2022년 1월 17일
0
post-thumbnail

1. 양의 정부호 행렬

양의 정부호(positive definite) 행렬이란 0이 아닌 어떤 벡터 x\mathbf{x}가 주어졌을 때, 다음을 만족하는 대칭행렬 A\mathbf{A}이다.

xTAx>0\mathbf{x}^T\mathbf{A}\mathbf{x} \gt 0

만약 다음을 만족한다면 양의 준정부호(positive semidefinite) 행렬이라고 한다.

xTAx0\mathbf{x}^T\mathbf{A}\mathbf{x} \ge 0

x\mathbf{x}에 양의 정수 2를 곱하였을 때 xT2x\mathbf{x}^T \cdot 2\mathbf{x}은 두 개의 같은 방향 벡터 곱이기 때문에 양수가 되지만, 음의 정수 -2를 곱하면 xT2x=2x\mathbf{x}^T \cdot -2\mathbf{x}=-2|\mathbf{x}|가 되어 음수가 된다. 이때, 양의 정부호 행렬은 마치 양의 정수처럼 어떤 벡터에 곱하여도 그 방향에 따른 부호가 유지됨을 의미한다.

양의 정부호 행렬은 여러가지 성질을 갖는다. 우선 위의 식에 나온 xTAx\mathbf{x}^T\mathbf{A}\mathbf{x}은 다음과 같은 2차식을 의미한다.

xTAx=ijAijxixj=iAiixi2+2i>jjAijxixj\mathbf{x}^T\mathbf{A}\mathbf{x}=\sum_{i}{\sum_{j}{A_{ij} x_i x_j}} = \sum_{i}{A_{ii}x_i^2}+2\sum_{i>j}{\sum_{j}{A_{ij} x_i x_j}}

또한 양의 정부호 행렬은 non-singular하여 역행렬을 갖는다. 아래의 마지막 단계에서 양의 정부호 행렬 정의가 사용되었다.

Ax=0xTAx=0x=0\mathbf{A}\mathbf{x}=\mathbf{0} \rightarrow \mathbf{x}^T\mathbf{A}\mathbf{x}=\mathbf{0} \rightarrow \mathbf{x}=\mathbf{0}

또한 ei=(0,0,,0,1ith  element,0,0,,0)\mathbf{e_i}=(0,0,\cdots,0,1_{ith\;element},0,0,\cdots,0)라고 하면 eiTAei=Aii>0\mathbf{e_i}^T\mathbf{A}\mathbf{e_i}=A_{ii}>0이므로 양의 정부호 행렬의 대각 성분은 모두 양수이다.

만약 행렬 A\mathbf{A}의 고유값 λ=0\lambda=0이라면 그에 해당하는 고유벡터 x\mathbf{x}에 대해서 xTAx=xTλx=λx2\mathbf{x}^T\mathbf{A}\mathbf{x}=\mathbf{x}^T\lambda\mathbf{x}=\lambda|\mathbf{x}|^2가 0이 되어버린다. 마찬가지로 λ<0\lambda<0이라면 위의 값이 음수가 되어버린다. 따라서 양의 정부호행렬의 고유값은 모두 양수이다.

그리고, ATA\mathbf{A}^T\mathbf{A}가 주어지면 이는 positive semidefinite 행렬이며, 이는 Ax=y\mathbf{A}\mathbf{x}=\mathbf{y}라 할 때, xTATAx=yTy0\mathbf{x}^T\mathbf{A}^T\mathbf{A}\mathbf{x}=\mathbf{y}^T\mathbf{y} \ge0으로 보일 수 있다.

또한 A\mathbf{A}의 column vector들이 일차독립임과 ATA\mathbf{A}^T\mathbf{A}는 positive definite라는 것은 동치이며, 이때 ATA\mathbf{A}^T\mathbf{A}는해당 가역행렬이다.

먼저 positive definite가 아니라고 가정할 때 0\mathbf{0}이 아닌 벡터 c\mathbf{c}에 대해서 cTATAc=yTy=y0\mathbf{c}^T\mathbf{A}^T\mathbf{A}\mathbf{c}=\mathbf{y}^T\mathbf{y}=|\mathbf{y}|\le0c\mathbf{c}가 존재해야하는데, y<0|\mathbf{y}|<0라면 y\mathbf{y}가 실수가 아니게 되며, y=Ac=0\mathbf{y}=\mathbf{A}\mathbf{c}=0이라면, A\mathbf{A}의 column vector들이 일차독립이라는 가정에 모순이다. 따라서 A\mathbf{A}의 column vector들이 일차독립이면, ATA\mathbf{A}^T\mathbf{A}는 positive definite이다.

반대로 ATA\mathbf{A}^T\mathbf{A}가 positive definite라면, 임의의 0\mathbf{0}이 아닌 벡터 c\mathbf{c}에 대해서 cTATAc=Ac>0\mathbf{c}^T\mathbf{A}^T\mathbf{A}\mathbf{c}=|\mathbf{A}\mathbf{c}|>0이며, Ac\mathbf{A}\mathbf{c}가 0이 아니므로 A\mathbf{A}의 column vector들이 일차독립이다.

A\mathbf{A}의 column vector들이 일차독립이라면, QR decomposition이 가능하여 ATA=(QR)TQR=RTQTQR=RTR\mathbf{A}^T\mathbf{A}=(\mathbf{Q}\mathbf{R})^T\mathbf{Q}\mathbf{R}=\mathbf{R}^T\mathbf{Q}^T\mathbf{Q}\mathbf{R}=\mathbf{R}^T\mathbf{R}인데, R\mathbf{R}은 삼각행렬로 가역행렬이므로 RTR=ATA\mathbf{R}^T\mathbf{R}=\mathbf{A}^T\mathbf{A}또한 가역행렬이다.

2. Cholesky Decomposition

Cholesky decomposition은 임의의 양의 정부호 행렬이 다음과 같이 상삼각행렬 R\mathbf{R}로 분해될 수 있다는 것이다.

A=RTR\mathbf{A}=\mathbf{R}^T\mathbf{R}

RTR\mathbf{R}^T\mathbf{R}은 다음과 같이 블록행렬로 쓸 수 있다..

RTR=(R1,1sR1,2:nTR2:n,2:nT)(R1,1R1,2:n0R2:n,2:n)=(R1,12R1,1R1,2:nR1,1R1,2:nTR1,2:nTR1,2:n+R2:n,2:nTR2:n,2:n)\mathbf{R}^T\mathbf{R} = \begin{pmatrix} R_{1,1} & s \\ R_{1,2:n}^T & R_{2:n,2:n}^T \end{pmatrix}\begin{pmatrix} R_{1,1} & R_{1,2:n} \\ 0 & R_{2:n,2:n} \end{pmatrix}=\begin{pmatrix} R_{1,1}^2 & R_{1,1}R_{1,2:n} \\ R_{1,1}R_{1,2:n}^T & R_{1,2:n}^TR_{1,2:n}+R_{2:n,2:n}^TR_{2:n,2:n} \end{pmatrix}

이때, RTR=A\mathbf{R}^T\mathbf{R} = \mathbf{A}를 만족하기 위하여 다음과 같이 R\mathbf{R}의 원소를 선택할 수 있다.

R1,1=A1,1,                R1,2:n=1R1,1A1,2:nR_{1,1} = \sqrt{A_{1,1}}, \;\;\;\;\;\;\;\; R_{1,2:n}=\frac{1}{R_{1,1}}A_{1,2:n}

이것으로 첫번째 row/column이 결정되고, A\mathbf{A}가 양의 정부호 행렬이기 때문에 제곱근 및 나누기를 사용할 수 있다. 이제 다음 step을 위한 R2:n,2:nTR2:n,2:nR_{2:n,2:n}^TR_{2:n,2:n}를 구하면 다음과 같다.

R1,2:nTR1,2:n+R2:n,2:nTR2:n,2:n=A2:n,2:n            R2:n,2:nTR2:n,2:n=A2:n,2:nR1,2:nTR1,2:n            R2:n,2:nTR2:n,2:n=A2:n,2:n1A1,1A1,2:nTA1,2:n=A2:n,2:n1A1,1A2:n,1A2:n,1TR_{1,2:n}^TR_{1,2:n}+R_{2:n,2:n}^TR_{2:n,2:n} = A_{2:n,2:n} \;\;\; \rightarrow \;\;\; R_{2:n,2:n}^TR_{2:n,2:n} = A_{2:n,2:n}-R_{1,2:n}^TR_{1,2:n}\\ \;\;\; \rightarrow \;\;\; R_{2:n,2:n}^TR_{2:n,2:n} = A_{2:n,2:n}-\frac{1}{A_{1,1}}A_{1,2:n}^TA_{1,2:n} = A_{2:n,2:n}-\frac{1}{A_{1,1}}A_{2:n, 1}A_{2:n, 1}^T

이때, Schur complement로 인해 A2:n,2:n1A1,1A2:n,1A2:n,1TA_{2:n,2:n}-\frac{1}{A_{1,1}}A_{2:n, 1}A_{2:n, 1}^T 또한 양의 정부호 행렬이며, 따라서 R2:n,2:nTR2:n,2:nR_{2:n,2:n}^TR_{2:n,2:n}에 대해 위와 같은 방법을 적용하여 두번째, 세번째, ...의 row/column을 구할 수 있다.

Schur complement은 양의 정부호 행렬 A\mathbf{A}가 주어졌을 때, S=A2:n,2:n1A1,1A2:n,1A2:n,1T\mathbf{S}=A_{2:n,2:n}-\frac{1}{A_{1,1}}A_{2:n, 1}A_{2:n, 1}^T 또한 양의 정부호 행렬이라는 것으로, 다음과 같이 보일 수 있다 (임의의 벡터 x\mathbf{x}에 대해 y=(A2:n,1Tx)/A1,1)\mathbf{y} = -(A_{2:n, 1}^T\mathbf{x})/A_{1,1})).

xTSx=(yx)(A1,1A2:n,1TA2:n,1A2:n,2:n)(yx)>0\mathbf{x}^T\mathbf{S}\mathbf{x} = \begin{pmatrix} \mathbf{y} & \mathbf{x}\\ \end{pmatrix} \begin{pmatrix} A_{1,1} & A_{2:n, 1}^T\\ A_{2:n, 1} & A_{2:n, 2:n} \end{pmatrix} \begin{pmatrix} \mathbf{y}\\ \mathbf{x} \end{pmatrix}>0

결국 xTSx\mathbf{x}^T\mathbf{S}\mathbf{x}(y,x)A(y,x)T(\mathbf{y}, \mathbf{x})\mathbf{A}(\mathbf{y}, \mathbf{x})^T와 같은 형태로 나타나며, A\mathbf{A}는 양의 정부호 행렬이기 때문에 마지막 부등호가 성립하고, 따라서 S\mathbf{S} 또한 양의 정부호 행렬이다.

0개의 댓글

관련 채용 정보