QR Decomposition

QR ๋ถ„ํ•ด์˜ ๊ทผ๋ณธ์ ์ธ ์ด์œ ๋Š” ๋ฌด์—‡์ผ๊นŒ? ๊ธฐ์กด์˜ ์„ ํ˜•๋Œ€์ˆ˜์— ๋Œ€ํ•œ ๊ธ€์—์„œ, ํ–‰๋ ฌ์€ ํ•˜๋‚˜์˜ ๊ณต๊ฐ„์„ ๋งคํ•‘ํ•œ๋‹ค๊ณ  ํ–ˆ๋‹ค.

๊ทธ๋ฆฌ๊ณ  ํ–‰๋ ฌ size๊ฐ€ ์ •์‚ฌ๊ฐํ–‰๋ ฌ์ด๊ณ , full rank์ผ ๋•Œ n์ฐจ์› ๊ณต๊ฐ„์„ ๋งคํ•‘ํ•œ๋‹ค.

๊ทธ๋Ÿฐ๋ฐ ๊ณต๊ฐ„์„ ๋งคํ•‘ํ•˜๋Š”๋ฐ ์žˆ์–ด, ๊ตณ์ด orthogonal ํ•  ํ•„์š”๋Š” ์—†๋‹ค.

์ฆ‰, ์ง๊ตํ•˜๋Š” ์ถ•์œผ๋กœ ๊ณต๊ฐ„์ด ๋งคํ•‘๋  ํ•„์š”๋Š” ์—†๋‹ค.

ํ•˜์ง€๋งŒ, ์šฐ๋ฆฌ๋Š” ์ง๊ต์ถ•์— ์ต์ˆ™ํ•˜๋‹ค! ๋˜ํ•œ ๋‹ค๋ฃจ๊ธฐ๋„ ๋งค์šฐ ์‰ฝ๋‹ค!

๋”ฐ๋ผ์„œ ์šฐ๋ฆฌ๋Š” ํŠน์ • ํ–‰๋ ฌ์ด Orthogonal ํ•œ ํ–‰๋ ฌ๋กœ ๋‚˜ํƒ€๋‚ด์–ด ์ง„๋‹ค๋ฉด ๋‹ค๋ฃจ๊ธฐ ๊ต‰์žฅํžˆ ์ˆ˜์›”ํ•  ๊ฒƒ์ด๋‹ค! ํ•„์š”์„ฑ์ด ์ƒ๊ฒผ์œผ๋‹ˆ ๋งŒ๋“ค์–ด๋ณด์ž.

Assumption

A ํ–‰๋ ฌ์˜ ๋ชจ๋“  ๋ฒกํ„ฐ๋Š” ์„ ํ˜• ๋…๋ฆฝ ์ด๋‹ค.

Idea

2 ์ฐจ์› ๊ณต๊ฐ„์—์„œ ๋จผ์ € ์ƒ๊ฐํ•ด๋ณด์ž.

์šฐ๋ฆฌ๊ฐ€ ํ•˜๊ณ  ์‹ถ์€ ๊ฒƒ์€, A ๋ฒกํ„ฐ๋ฅผ Orthogonal ํ•œ ๋ฒกํ„ฐ๋กœ ๋ณ€ํ™˜์‹œํ‚ค๋Š” ๊ฒƒ์ด๋‹ค. ๊ทธ์ „์—, ์–ด๋–ค ์ง๊ตํ–‰๋ ฌ๋กœ ๋งŒ๋“ค์ง€์— ๋Œ€ํ•œ ๊ณ ๋ฏผ์ด ํ•„์š”ํ•œ๋ฐ,

๊ทธ๋Ÿฌ๊ธฐ ์œ„ํ•ด์„œ๋Š” ๊ธฐ์ค€์ด ํ•„์š”ํ•˜๋‹ค. ๊ทธ๋ž˜์„œ ์šฐ๋ฆฌ๋Š” ์ง๊ตํ–‰๋ ฌ๋กœ ๋งŒ๋“ค ์ฒซ๋ฒˆ์งธ ์ถ•(b1)์„ a1 ๋ฒกํ„ฐ๋กœ ์„ ํƒํ•  ๊ฒƒ์ด๋‹ค.

๊ทธ๋ ‡๋‹ค๋ฉด, ์šฐ๋ฆฌ๋Š” b1์— ์ง๊ตํ•˜๋Š” ์ถ•, b2๋ฅผ ๋งŒ๋“ค์–ด์•ผ ํ•˜๋Š”๋ฐ, ์ด๋…€์„์€ ์–ด๋–ป๊ฒŒ ์ •์˜ํ•  ์ˆ˜ ์žˆ์„๊นŒ?

a2 ๋ฒกํ„ฐ์˜ ๋ฐฉํ–ฅ์œผ๋กœ ๋ถ€ํ„ฐ, a1 ๋ฒกํ„ฐ์˜ ์„ฑ๋ถ„์„ ์ œ๊ฑฐ ํ•ด์ค€๋‹ค๋ฉด ๊ทธ ๋‚จ์€ ๋ฒกํ„ฐ๊ฐ€ b2 ๋ฒกํ„ฐ๋ผ ํ•  ์ˆ˜ ์žˆ์„ ๊ฒƒ์ด๋‹ค.

์Šคํฌ๋ฆฐ์ƒท 2019-05-04 ์˜คํ›„ 5 08 15

๊ทธ ๋‹ค์Œ 3์ฐจ์› ๋ฒกํ„ฐ๋Š”,

a3 ๋ฒกํ„ฐ์—์„œ, b1๋ฒกํ„ฐ์˜ ์„ฑ๋ถ„์„ ๋นผ๊ณ , b2๋ฒกํ„ฐ์˜ ์„ฑ๋ถ„์„ ๋นผ๋ฉด ๋œ๋‹ค!

Process

์ด ๊ณผ์ •์„ ์ˆ˜์‹ํ™”ํ•ด๋ณด๋ฉด, ์ฒซ๋ฒˆ์งธ ์š”์†Œ๋Š”,

๋‘๋ฒˆ์งธ ์š”์†Œ๋Š”,

์„ธ๋ฒˆ์งธ ์š”์†Œ๋Š”,

i ๋ฒˆ์งธ ์š”์†Œ๋Š”,

Transform to Matrix form

ํ–‰๋ ฌ A์— ๋Œ€ํ•ด ์ •๋ฆฌํ•˜๊ธฐ ์œ„ํ•ด, a๋ฒกํ„ฐ์— ๋Œ€ํ•ด ์ •๋ฆฌํ•ด๋ณด์ž.

์—ฌ๊ธฐ์„œ,

์ด๋ฏ€๋กœ,

์ด ์‹์„ A ์‹์ด๋ผ ํ•˜์ž.

์—ฌ๊ธฐ์„œ ์–‘์ชฝ์— b์˜ ๋‹จ์œ„ ๋ฒกํ„ฐ๋ฅผ ๊ณฑํ•˜์ž.

์ด ๋•Œ, Orthogonal vector์˜ ํŠน์ง•์œผ๋กœ ๋ถ€ํ„ฐ,

์‹œ๊ทธ๋งˆ๋กœ ํ‘œ์‹œ๋œ ์šฐ์ธกํ•ญ์€ 0 ์ด๋‹ค.

๋˜ํ•œ, ๊ทธ ์™ผ์ชฝํ•ญ๋„ 1์ด ๋˜์–ด b๋ฒกํ„ฐ์˜ ํฌ๊ธฐ๋งŒ ๋‚จ๋Š”๋‹ค.

์—ฌ๊ธฐ์„œ ์™ผ์ชฝํ•ญ์„ ์ „์น˜ํ–‰๋ ฌ์˜ ํŠน์ง•์„ ์‚ฌ์šฉํ•ด์„œ ๋’ค๋ฐ”๊พธ๋ฉด,

์ด ๊ฒฐ๊ณผ๋ฅผ A ์‹์— ๋Œ€์ž…ํ•˜๋ฉด,

์—ฌ๊ธฐ์„œ ๊ด„ํ˜ธ์•ˆ์„ ์ „์น˜ํ–‰๋ ฌ์˜ ํŠน์ง•์„ ์‚ฌ์šฉํ•ด์„œ ๋’ค๋ฐ”๊พธ๋ฉด,

์ด์ œ ํ–‰๋ ฌ๋ชจ์–‘์œผ๋กœ ๋ฐ”๊ฟ”๋ณด์ž.

A;=;\begin{bmatrix} \overset{\rightarrow}{a_1} & \overset{\rightarrow}{a_2} & \cdots & \overset{\rightarrow}{a_m}\\ \end{bmatrix}\\ ;\\ =\begin{bmatrix} \hat{\overset{\rightarrow}{b_1}} & \hat{\overset{\rightarrow}{b_2}} & \cdots & \hat{\overset{\rightarrow}{b_m}}\\ \end{bmatrix} \begin{bmatrix} {\hat{\overset{\rightarrow}{b_1}^T}\overset{\rightarrow}{a_1}} & {\hat{\overset{\rightarrow}{b_1}^T}\overset{\rightarrow}{a_2}} & \dots & \hat{\overset{\rightarrow}{b_1}^T}\overset{\rightarrow}{a_m}\\ 0 & {\hat{\overset{\rightarrow}{b_2}^T}\overset{\rightarrow}{a_2}} & \dots & \hat{\overset{\rightarrow}{b_1}^T}\overset{\rightarrow}{a_m} \\ \vdots & & \ddots & \vdots\\ 0 & 0 & \dots & \hat{\overset{\rightarrow}{b_m}^T}\overset{\rightarrow}{a_m}\\ \end{bmatrix}\\ ;\\ ;\\;\\ A;=QR;\\ ;\\ \[n\times m\];=;\[n\times m \];\times;\[m\times m\]

A๊ฐ€ ์ •์‚ฌ๊ฐํ–‰๋ ฌ์ผ ๋•Œ,

orthogonal matrix์˜ ํŠน์„ฑ์— ๋”ฐ๋ผ ์ „์น˜ํ–‰๋ ฌ์„ ๊ณฑํ•˜๋ฉด identity matrix๊ฐ€ ๋‚˜์˜จ๋‹ค.

๊ทธ๋ฆฌ๊ณ  R ํ–‰๋ ฌ์€ upper triangle matrix ์ด๋‹ค.