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 value4,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 value3,1,0 である。また、

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

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

A1=(300000000)

である。

4.2解説かいせつ

A1もっとつよのこe1 方向ほうこう保存ほぞんし、e2 方向ほうこうよわ成分せいぶんcomponente3 方向ほうこうかく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=5v=2 なので、非零ひれい特異値とくいちsingular value10 である。したがって

B+=110vuT=110(120120)

である。BB+span(u) への直交射影ちょっこうしゃえいorthogonal projectionであり、B+Bspan(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=bx1+x2=2 なので、一般解いっぱんかい

x=(2-tt)(tR)

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

x2=(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)(tR).

The squared norm is

x2=(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固有値こゆうちeigenvalue2,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=IVrTVr=I使つかうと、

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

である。UrれつImA正規直交基底せいきちょっこうきていなので、UrUrTImA への直交射影ちょっこうしゃえい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)Tb=(4,3)Tもっとちかくなるには 2x1=4、すなわち x1=2 であればよい。x2Ax影響えいきょうしないので、最小二乗解さいしょうにじょうかいleast-squares solution

x=(2t)(tR)

である。このながさの二乗にじょうx2=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)(tR).

The norm x2=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
タブを全て閉じる