markdown
SVD と擬似逆行列-基本演習md 69da710
exercise/math/linear-algebra/svd-and-pseudoinverses.exercise.n.md

SVD と擬似逆行列ぎじぎゃくぎょうれつpseudoinverse-基本演習きほんえんしゅう

date2026-07-14document_iddoc_95cbd6a79eba1d697066743883354eabdescription特異値分解と擬似逆行列を、潰れない方向、零特異値、最小二乗解、最小ノルム解から確認する演習である。prerequisites特異値分解の入口 / 擬似逆行列の基本 / 複素内積とユニタリ行列type問題演習content_typeexercisestatusactiverelateddata/lecture/math/linear-algebra/introduction-to-singular-value-decomposition.lecture.n.md / data/lecture/math/linear-algebra/pseudoinverse-basics.lecture.n.md / data/lecture/math/linear-algebra/complex-inner-products-and-unitary-matrices.lecture.n.md / data/exercise/math/linear-algebra/eigenvalues-diagonalization-and-extensions.exercise.n.md / data/exercise/math/linear-algebra/quadratic-forms-minimal-polynomials-and-jordan-form.exercise.n.md
mathlinear-algebraexercisesvdpseudoinverse
data/lecture/math/linear-algebra/introduction-to-singular-value-decomposition.lecture.n.md data/lecture/math/linear-algebra/pseudoinverse-basics.lecture.n.md data/lecture/math/linear-algebra/complex-inner-products-and-unitary-matrices.lecture.n.md

SVD and pseudoinverse擬似逆行列ぎじぎゃくぎょうれつ - Basic Exercises

data/lecture/math/linear-algebra/introduction-to-singular-value-decomposition.lecture.n.md data/lecture/math/linear-algebra/pseudoinverse-basics.lecture.n.md data/lecture/math/linear-algebra/complex-inner-products-and-unitary-matrices.lecture.n.md

1演習えんしゅう方針ほうしん

特異値分解とくいちぶんかいsingular value decompositionは、行列ぎょうれつmatrixを入力側にゅうりょくがわの直交方向ちょっこうほうこう、非負ひふの伸縮率しんしゅくりつ、出力側しゅつりょくがわの直交方向ちょっこうほうこうに分解ぶんかいする。擬似逆行列ぎじぎゃくぎょうれつpseudoinverseは、0 でない特異値とくいちsingular valueだけを逆数ぎゃくすうにし、0 の特異値とくいちsingular valueは逆ぎゃくにしない。


1Exercise plan

Singular value decomposition特異値分解とくいちぶんかい decomposes a matrix行列ぎょうれつ into orthogonal input directions, nonnegative stretch factors, and orthogonal output directions. The pseudoinverse擬似逆行列ぎじぎゃくぎょうれつ inverts only the nonzero singular values特異値とくいち and leaves zero singular values at 0.


2問題もんだい 1

つぎの空欄くうらんを埋うめよ。

「特異値分解とくいちぶんかいsingular value decompositionは、長方行列ちょうほうぎょうれつを、入力側にゅうりょくがわの直交基底ちょっこうきてい、非負ひふの伸縮率しんしゅくりつ、出力側しゅつりょくがわの直交基底ちょっこうきていに分解ぶんかいする。擬似逆行列ぎじぎゃくぎょうれつpseudoinverseは、0 でない特異値とくいちsingular valueを ____ し、0 の特異値とくいちsingular valueは ____ ことで、最小二乗解さいしょうにじょうかいleast-squares solutionや最小さいしょうノルム解かいminimum-norm solutionを記述きじゅつする。」

2.1解答例かいとうれい

「逆数ぎゃくすうに」し、「そのまま 0 として扱あつかう」。

2.2解説かいせつ

0 の特異値とくいちsingular valueを逆数ぎゃくすうにしようとすると 0 による除算じょざんdivisionになる。擬似逆行列ぎじぎゃくぎょうれつpseudoinverseでは、潰つぶれた方向ほうこうを無理むりに復元ふくげんしない。


2Problem 1

Fill in the blanks.

"Singular value decomposition特異値分解とくいちぶんかい decomposes a rectangular matrix into an orthogonal basis on the input side, nonnegative stretch factors, and an orthogonal basis on the output side. The pseudoinverse擬似逆行列ぎじぎゃくぎょうれつ ____ the nonzero singular values特異値とくいち and ____ the zero singular values, thereby describing least-squares solutions最小二乗解さいしょうにじょうかい and minimum-norm solutions最小ノルム解."

2.1Answer example

"takes reciprocals of" and "keeps them as 0."

2.2Explanation

Taking the reciprocal of a zero singular value特異値とくいち would require division by 0. The pseudoinverse擬似逆行列ぎじぎゃくぎょうれつ does not force recovery of directions that have been collapsed.


3問題もんだい 2

A=(300004)

のコンパクトSVDcompact SVDを 1 つ求もとめよ。

3.1解答例かいとうれい

ATA=(90016)

なので、特異値とくいちsingular valueは 4,3 である。右みぎ特異とくいベクトルsingular vectorを

v1=(01),v2=(10)

と選えらぶと、

u1=Av14=(001),u2=Av23=(100)

である。したがって A=UrΣrVrT、ただし

Ur=(010010),Σr=(4003),Vr=(0110)

である。

3.2解説かいせつ

コンパクトSVDcompact SVDでは、0 でない特異値とくいちsingular valueに対応たいおうする方向ほうこうだけを残のこす。階数かいすうrankや列空間れつくうかんcolumn spaceを読よむには、この形かたちが扱あつかいやすい。


3Problem 2

Find one compact SVD[コンパクトSVD] of

A=(300004).

3.1Answer example

ATA=(90016),

so the singular values特異値とくいち are 4,3. Choose right singular vectors特異とくいベクトル

v1=(01),v2=(10).

Then

u1=Av14=(001),u2=Av23=(100).

Thus A=UrΣrVrT, where

Ur=(010010),Σr=(4003),Vr=(0110).

3.2Explanation

A compact SVD[コンパクトSVD] keeps only the directions corresponding to nonzero singular values. This form is convenient for reading the rank階数かいすう and the column space列空間れつくうかん.


4問題もんだい 3

A=(300010000)

について、特異値とくいちsingular value、核かくkernel、像ぞうimageを求もとめ、最大さいだいの特異値とくいちsingular valueだけを残のこす階数かいすうrank 1 近似きんじが何なにを保存ほぞんし何なにを捨すてるかを説明せつめいせよ。

4.1解答例かいとうれい

ATA は

(900010000)

なので、特異値とくいちsingular valueは 3,1,0 である。また、

kerA=span(e3),ImA=span(e1,e2)

である。最大さいだいの特異値とくいちsingular valueだけを残のこす階数かいすうrank 1 近似きんじは

A1=(300000000)

である。

4.2解説かいせつ

A1 は最もっとも強つよく残のこる e1 方向ほうこうを保存ほぞんし、e2 方向ほうこうの弱よわい成分せいぶんcomponentと e3 方向ほうこうの核かくkernelを捨すてる。SVD による近似きんじは、方向ほうこうごとの重要度じゅうようどを特異値とくいちsingular valueで測はかる。


4Problem 3

For

A=(300010000),

find the singular values特異値とくいち, the kernel核かく, and the image像ぞう. Explain what is preserved and what is discarded by the rank階数かいすう 1 approximation that keeps only the largest singular value.

4.1Answer example

Since ATA is

(900010000),

the singular values are 3,1,0. Also,

kerA=span(e3),ImA=span(e1,e2).

The rank 1 approximation keeping only the largest singular value is

A1=(300000000).

4.2Explanation

A1 preserves the strongest surviving direction, the e1 direction, and discards the weaker e2 component together with the kernel核かく direction e3. SVD-based approximation measures importance by singular values.


5問題もんだい 4

B=(112200)

について、非零ひれい特異値とくいちsingular valueを使つかって B+ を求もとめ、BB+ と B+B が何なにへの射影しゃえいprojectionかを説明せつめいせよ。

5.1解答例かいとうれい

B=uvT と書かける。ただし

u=(120),v=(11)

である。∥u∥=5、∥v∥=2 なので、非零ひれい特異値とくいちsingular valueは 10 である。したがって

B+=110vuT=110(120120)

である。BB+ は span(u) への直交射影ちょっこうしゃえいorthogonal projectionであり、B+B は span(v) への直交射影ちょっこうしゃえいorthogonal projectionである。

5.2解説かいせつ

擬似逆行列ぎじぎゃくぎょうれつpseudoinverseは、潰つぶれていない方向ほうこうだけを逆向ぎゃくむきに戻もどす。BB+ と B+B は恒等変換こうとうへんかんidentity transformationではなく、残のこっている情報じょうほうの空間くうかんへの射影しゃえいprojectionである。


5Problem 4

For

B=(112200),

use the nonzero singular value特異値とくいち to find B+, and explain what BB+ and B+B project onto.

5.1Answer example

Write B=uvT, where

u=(120),v=(11).

Since ∥u∥=5 and ∥v∥=2, the nonzero singular value is 10. Therefore

B+=110vuT=110(120120).

BB+ is the orthogonal projection直交射影ちょっこうしゃえい onto span(u), and B+B is the orthogonal projection onto span(v).

5.2Explanation

The pseudoinverse擬似逆行列ぎじぎゃくぎょうれつ reverses only directions that were not collapsed. BB+ and B+B are not identity transformations; they are projections射影しゃえい onto the spaces where information remains.


6問題もんだい 5

A=(11),b=(20)

について、A+ を使つかって最小二乗解さいしょうにじょうかいleast-squares solutionを求もとめよ。

6.1解答例かいとうれい

A+=12(11)

なので、

x=A+b=1

である。近似きんじベクトルは Ax=(1,1)T、残差ざんさresidualは

r=(1-1)

である。ATr=0 なので、残差ざんさresidualは列空間れつくうかんcolumn spaceに直交ちょっこうorthogonalする。

6.2解説かいせつ

過剰決定系かじょうけっていけいoverdetermined systemでは、Ax=b が厳密げんみつには解とけない場合ばあいがある。擬似逆行列ぎじぎゃくぎょうれつpseudoinverseは、列空間れつくうかんcolumn spaceへの射影しゃえいprojectionに対応たいおうする最小二乗解さいしょうにじょうかいleast-squares solutionを返かえす。


6Problem 5

For

A=(11),b=(20),

use A+ to find the least-squares solution最小二乗解さいしょうにじょうかい.

6.1Answer example

A+=12(11),

so x=A+b=1. The approximating vector is Ax=(1,1)T, and the residual残差ざんさ is

r=(1-1).

Since ATr=0, the residual is orthogonal直交ちょっこう to the column space列空間れつくうかん.

6.2Explanation

In an overdetermined system過剰決定系かじょうけっていけい, Ax=b may have no exact solution. The pseudoinverse returns the least-squares solution corresponding to projection onto the column space.


7問題もんだい 6

A=(11),b=2

について、Ax=b の解かいsolutionが無限むげんにあることを確認かくにんし、A+b が最小さいしょうノルム解かいminimum-norm solutionになることを説明せつめいせよ。

7.1解答例かいとうれい

A+=12(11)

なので、

A+b=(11)

である。Ax=b は x1+x2=2 なので、一般解いっぱんかいは

x=(2-tt)(t∈R)

である。この解かいの長ながさの二乗にじょうは

∥x∥2=(2-t)2+t2=2(t-1)2+2

なので、t=1 のとき最小さいしょうになる。

7.2解説かいせつ

劣決定系れつけっていけいunderdetermined systemでは、解かいが無限むげんに存在そんざいする場合ばあいがある。擬似逆行列ぎじぎゃくぎょうれつpseudoinverseは、その中なかから長ながさが最小さいしょうの解かいを選えらぶ。


7Problem 6

For

A=(11),b=2,

confirm that Ax=b has infinitely many solutions解かい, and explain why A+b is the minimum-norm solution最小ノルム解.

7.1Answer example

A+=12(11),

so

A+b=(11).

The equation Ax=b is x1+x2=2, so

x=(2-tt)(t∈R).

The squared norm is

∥x∥2=(2-t)2+t2=2(t-1)2+2,

which is minimized at t=1.

7.2Explanation

In an underdetermined system劣決定系れつけっていけい, there may be infinitely many solutions. The pseudoinverse chooses the one of minimum length.


8問題もんだい 7

C=(1i00)

について、C*C を計算けいさんし、特異値とくいちsingular valueを求もとめよ。

8.1解答例かいとうれい

C*=(10-i0)

なので

C*C=(1i-i1)

である。この行列ぎょうれつmatrixの固有値こゆうちeigenvalueは 2,0 である。したがって C の特異値とくいちsingular valueは

2,0

である。

8.2解説かいせつ

複素行列ふくそぎょうれつcomplex matrixでは ATA ではなく A*A を使つかう。共役転置きょうやくてんちconjugate transposeを使つかうことで、A*A はエルミート行列ぎょうれつHermitian matrixかつ非負定値ひふていちpositive semidefiniteになる。


8Problem 7

For

C=(1i00),

compute C*C and find the singular values特異値とくいち.

8.1Answer example

C*=(10-i0),

so

C*C=(1i-i1).

The eigenvalues固有値こゆうち of this matrix are 2,0. Therefore the singular values of C are

2,0.

8.2Explanation

For a complex matrix複素行列ふくそぎょうれつ, use A*A rather than ATA. The conjugate transpose共役転置きょうやくてんち makes A*A Hermitianエルミート行列ぎょうれつ and positive semidefinite非負定値ひふていち.


11補強問題ほきょうもんだい:擬似逆行列ぎじぎゃくぎょうれつpseudoinverseの射影性しゃえいせいと最小性さいしょうせい

11.1問題もんだい 8

A=UrΣrVrT を、正せいの対角成分たいかくせいぶん σ1,…,σr をもつコンパクトSVDcompact SVDとする。

A+=VrΣr-1UrT

と定義ていぎするとき、AA+ が ImA への直交射影ちょっこうしゃえいorthogonal projectionであり、A+A が (kerA)⊥ への直交射影ちょっこうしゃえいorthogonal projectionであることを示しめせ。

11.2解答例かいとうれい

UrTUr=I、VrTVr=I を使つかうと、

AA+=UrΣrVrTVrΣr-1UrT=UrUrT

である。Ur の列れつは ImA の正規直交基底せいきちょっこうきていなので、UrUrT は ImA への直交射影ちょっこうしゃえいorthogonal projectionである。同様どうように、

A+A=VrΣr-1UrTUrΣrVrT=VrVrT

である。Vr の列れつは 0 でない特異値とくいちsingular valueをもつ入力方向にゅうりょくほうこう、すなわち (kerA)⊥ を張はる。したがって A+A は (kerA)⊥ への直交射影ちょっこうしゃえいorthogonal projectionである。

11.3解説かいせつ

この定理ていりは、擬似逆行列ぎじぎゃくぎょうれつpseudoinverseが一般いっぱんには両側逆りょうがわぎゃくではない理由りゆうを説明せつめいする。潰つぶれていない方向ほうこうでは逆ぎゃくとして働はたらき、全体ぜんたいでは射影しゃえいprojectionになる。

11.4問題もんだい 9

A=(2000),b=(43)

について、A+b を求もとめ、最小二乗解さいしょうにじょうかいleast-squares solutionをすべて記述きじゅつし、その中なかの最小さいしょうノルム解かいminimum-norm solutionを特定とくていせよ。

11.5解答例かいとうれい

ここでは

A+=(12000)

なので、

A+b=(20)

である。Ax=(2x1,0)T が b=(4,3)T に最もっとも近ちかくなるには 2x1=4、すなわち x1=2 であればよい。x2 は Ax に影響えいきょうしないので、最小二乗解さいしょうにじょうかいleast-squares solutionは

x=(2t)(t∈R)

である。この長ながさの二乗にじょうは ∥x∥2=4+t2 なので、t=0 で最小さいしょうになる。したがって A+b=(2,0)T が最小さいしょうノルム解かいminimum-norm solutionである。

11.6解説かいせつ

第だい 2 成分せいぶんの誤差ごさは列空間れつくうかんcolumn spaceでは消けせない。擬似逆行列ぎじぎゃくぎょうれつpseudoinverseは合あわせられる成分せいぶんを合あわせ、核かくkernelの成分せいぶんを 0 にしてノルムを最小さいしょうにする。

11.7問題もんだい 10

問題もんだい 9 の A について、つぎの Penrose 条件じょうけんを確認かくにんせよ。

AA+A=A,A+AA+=A+,(AA+)T=AA+,(A+A)T=A+A.

11.8解答例かいとうれい

AA+=A+A=(1000)

なので、

AA+A=(1000)(2000)=A

であり、

A+AA+=(1000)(12000)=A+

である。また (1000) は対称行列たいしょうぎょうれつsymmetric matrixなので、2 つの転置条件てんちじょうけんも成立せいりつする。

11.9解説かいせつ

Penrose 条件じょうけんは Moore-Penrose の擬似逆行列ぎじぎゃくぎょうれつpseudoinverseを特徴付とくちょうづける条件じょうけんである。この対角例たいかくれいでは、残のこる方向ほうこうだけを保たもち、潰つぶれた方向ほうこうは 0 のままにすることとして読よめる。

11Supplementary proof and application problems

11.1Problem 8

Let A=UrΣrVrT be a compact SVD with positive diagonal entries σ1,…,σr. Define

A+=VrΣr-1UrT.

Show that AA+ is the orthogonal projection直交射影ちょっこうしゃえい onto ImA and that A+A is the orthogonal projection onto (kerA)⊥.

11.2Answer example

Using UrTUr=I and VrTVr=I,

AA+=UrΣrVrTVrΣr-1UrT=UrUrT.

The columns of Ur form an orthonormal basis of ImA, so UrUrT is the orthogonal projection onto ImA. Similarly,

A+A=VrΣr-1UrTUrΣrVrT=VrVrT.

The columns of Vr span the input directions with nonzero singular values, namely (kerA)⊥. Hence A+A is the orthogonal projection onto (kerA)⊥.

11.3Explanation

This theorem explains why the pseudoinverse is not a two-sided inverse in general. It becomes an inverse only on directions that survive and becomes a projection on the whole space.

11.4Problem 9

For

A=(2000),b=(43),

find A+b, describe all least-squares solutions, and identify the minimum-norm one.

11.5Answer example

Here

A+=(12000),

so

A+b=(20).

The vector Ax=(2x1,0)T is closest to b=(4,3)T when 2x1=4, so x1=2. The second variable does not affect Ax, so all least-squares solutions are

x=(2t)(t∈R).

The norm ∥x∥2=4+t2 is minimized at t=0, so A+b=(2,0)T is the minimum-norm least-squares solution.

11.6Explanation

The column-space error in the second coordinate cannot be removed. The pseudoinverse fixes the part that can be fitted and sets the kernel component to 0 to minimize the norm.

11.7Problem 10

For the matrix in Problem 9, verify the four Penrose equations

AA+A=A,A+AA+=A+,(AA+)T=AA+,(A+A)T=A+A.

11.8Answer example

Since

AA+=A+A=(1000),

we have

AA+A=(1000)(2000)=A,

and

A+AA+=(1000)(12000)=A+.

The matrix (1000) is symmetric, so both transpose conditions also hold.

11.9Explanation

The Penrose equations are a compact way to characterize the Moore-Penrose pseudoinverse. In this diagonal example, they reduce to the statement that surviving directions are kept and collapsed directions remain zero.


raw .n.md をコピー
loc をコピー (filepath:line ~ line)
copy share link
copy encoded share link
path をコピー
copy share link
copy encoded share link
copy share link
copy encoded share link
タブを全て閉じる