Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

練習問題メモ 24(対称行列の対角化)

問1

次の対称行列 AA を直交行列によって対角化せよ。

  1. A=(3226)A=\left(\begin{array}{ll}3 & 2 \\ 2 & 6\end{array}\right)

  2. A=(123246369)A=\left(\begin{array}{lll}1 & 2 & 3 \\ 2 & 4 & 6 \\ 3 & 6 & 9\end{array}\right) ただし、 AA の固有値 λ\lambdaλ=0\lambda=0 (重解) 14 で、それぞれの

固有値に対する固有空間が

W(0)={c1(210)+c2(301)c1,c2R}W(14)={c(123)cR}\begin{aligned} W(0) & =\left\{\left.c_1\left(\begin{array}{c} -2 \\ 1 \\ 0 \end{array}\right)+c_2\left(\begin{array}{c} -3 \\ 0 \\ 1 \end{array}\right) \right\rvert\, c_1, c_2 \in \mathbb{R}\right\} \\ W(14) & =\left\{\left.c\left(\begin{array}{l} 1 \\ 2 \\ 3 \end{array}\right) \right\rvert\, c \in \mathbb{R}\right\} \end{aligned}

であることを用いてよい。

  1. A=(3226)A=\left(\begin{array}{ll}3 & 2 \\ 2 & 6\end{array}\right)

まず固有値を求める

AλE=(3λ)(6λ)22=189λ+λ24=149λ+λ2=(λ2)(λ7)\begin{aligned} |A- \lambda E| &= (3-\lambda)(6-\lambda) - 2\cdot 2\\ &= 18 - 9\lambda + \lambda^2 - 4\\ &= 14 - 9\lambda + \lambda^2\\ &= (\lambda - 2)(\lambda - 7) \end{aligned}

よってλ=2,7\lambda = 2, 7

続いて、固有ベクトルを求める。

λ=2\lambda=2の場合、

(AλE)x=0    (3λ226λ)(x1x2)=(00)    {x1+2x2=02x1+4x2=0(A-\lambda E)x = 0\\ \iff \begin{pmatrix} 3 - \lambda & 2\\ 2 & 6 - \lambda \end{pmatrix} \begin{pmatrix} x_1 \\ x_2 \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \end{pmatrix} \\ \iff \begin{cases} x_1 + 2x_2 = 0\\ 2x_1 + 4x_2 = 0 \end{cases}

よってx1=2x2x_1 = -2x_2より、cRc\in \mathbb{R}を用いて

(x1x2)=c(21)\begin{pmatrix} x_1 \\ x_2 \end{pmatrix} = c \begin{pmatrix} -2\\ 1 \end{pmatrix}

と表すことができる。固有空間は

V(2)={c(21)cR}V(2) =\left\{\left.c\left(\begin{array}{c} -2 \\ 1 \end{array}\right) \right\rvert\, c \in \mathbb{R}\right\}

となる。

λ=7\lambda=7の場合、

(3λ226λ)(x1x2)=(00)    {4x1+2x2=02x1x2=0\begin{pmatrix} 3 - \lambda & 2\\ 2 & 6 - \lambda \end{pmatrix} \begin{pmatrix} x_1 \\ x_2 \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \end{pmatrix} \\ \iff \begin{cases} -4 x_1 + 2x_2 = 0\\ 2x_1 - x_2 = 0 \end{cases}

よって2x1=x22 x_1 = x_2より、cRc\in \mathbb{R}を用いて

(x1x2)=c(12)\begin{pmatrix} x_1 \\ x_2 \end{pmatrix} = c \begin{pmatrix} 1\\ 2 \end{pmatrix}

と表すことができる。固有空間は

V(7)={c(12)cR}V(7) =\left\{\left.c\left(\begin{array}{l} 1 \\ 2 \end{array}\right) \right\rvert\, c \in \mathbb{R}\right\}

となる。

固有値λ=2,7\lambda = 2, 7それぞれに属する固有ベクトルx1,x2\boldsymbol{x}_1, \boldsymbol{x}_2

x1=(21),x2=(12)\boldsymbol{x}_1 = \begin{pmatrix} -2\\ 1\end{pmatrix}, \quad \boldsymbol{x}_2 = \begin{pmatrix} 1\\ 2\end{pmatrix}

とおく。x1,x2\boldsymbol{x}_1, \boldsymbol{x}_2にシュミットの直交化を行いp1,p2\boldsymbol{p}_1,\boldsymbol{p}_2とすると、

p1=x1x1=15(21)=(2515)\begin{aligned} \boldsymbol{p}_1 &= \frac{\boldsymbol{x}_1}{\|\boldsymbol{x}_1\|} = \frac{1}{\sqrt{5}} \begin{pmatrix} -2\\ 1\end{pmatrix} = \begin{pmatrix} \frac{-2}{\sqrt{5}}\\ \frac{1}{\sqrt{5}}\end{pmatrix} \end{aligned}

であり

c=x2,p1=125+215=0c = \langle \boldsymbol{x}_2, \boldsymbol{p}_1 \rangle = 1 \cdot \frac{-2}{\sqrt{5}} + 2 \cdot \frac{1}{\sqrt{5}} = 0

より

p2=x2cp1x2cp1=x2x2=15(12)=(1525)\boldsymbol{p}_2 = \frac{\boldsymbol{x}_2 - c \boldsymbol{p}_1 } {\| \boldsymbol{x}_2 - c \boldsymbol{p}_1 \| } = \frac{\boldsymbol{x}_2 } {\| \boldsymbol{x}_2 \| } = \frac{1}{\sqrt{5}} \begin{pmatrix} 1\\ 2\end{pmatrix} = \begin{pmatrix} \frac{1}{\sqrt{5}}\\ \frac{2}{\sqrt{5}}\end{pmatrix}

P=(p1,p2)P=(\boldsymbol{p}_1, \boldsymbol{p}_2)とおいた行列

P=(25151525)P= \begin{pmatrix} \frac{-2}{\sqrt{5}} & \frac{1}{\sqrt{5}}\\ \frac{1}{\sqrt{5}} & \frac{2}{\sqrt{5}} \end{pmatrix}

によりAAは対角化できる

P1AP=(25151525)(3226)(25151525)=(452575145)(25151525)=(1054+4514+145355)=(2007)\begin{aligned} P^{-1} A P &= \begin{pmatrix} \frac{-2}{\sqrt{5}} & \frac{1}{\sqrt{5}}\\ \frac{1}{\sqrt{5}} & \frac{2}{\sqrt{5}} \end{pmatrix} \begin{pmatrix} 3 & 2\\ 2 & 6 \end{pmatrix} \begin{pmatrix} \frac{-2}{\sqrt{5}} & \frac{1}{\sqrt{5}}\\ \frac{1}{\sqrt{5}} & \frac{2}{\sqrt{5}} \end{pmatrix} \\ &= \begin{pmatrix} \frac{-4}{\sqrt{5}} & \frac{2}{\sqrt{5}}\\ \frac{7}{\sqrt{5}} & \frac{14}{\sqrt{5}} \end{pmatrix} \begin{pmatrix} \frac{-2}{\sqrt{5}} & \frac{1}{\sqrt{5}}\\ \frac{1}{\sqrt{5}} & \frac{2}{\sqrt{5}} \end{pmatrix} \\ &= \begin{pmatrix} \frac{10}{5} & \frac{-4+4}{5}\\ \frac{-14+14}{5} & \frac{35}{5} \end{pmatrix}\\ &= \begin{pmatrix} 2 & 0\\ 0 & 7 \end{pmatrix} \end{aligned}
個別に直交化する例

(これがいいのかはわからんが、対角化はできる)

x1,x2\boldsymbol{x}_1, \boldsymbol{x}_2は1次独立なので個別にシュミットの直交化をしてp1,p2\boldsymbol{p}_1, \boldsymbol{p}_2とおくと

p1=x1x1=15(21)=(2515)p2=x2x2=15(12)=(1525)\begin{aligned} \boldsymbol{p}_1 &= \frac{\boldsymbol{x}_1}{\|\boldsymbol{x}_1\|} = \frac{1}{\sqrt{5}} \begin{pmatrix} -2\\ 1\end{pmatrix} = \begin{pmatrix} \frac{-2}{\sqrt{5}}\\ \frac{1}{\sqrt{5}}\end{pmatrix} \\ \boldsymbol{p}_2 &= \frac{\boldsymbol{x}_2}{\|\boldsymbol{x}_2\|} = \frac{1}{\sqrt{5}} \begin{pmatrix} 1\\ 2\end{pmatrix} = \begin{pmatrix} \frac{1}{\sqrt{5}}\\ \frac{2}{\sqrt{5}}\end{pmatrix} \end{aligned}

P=(p1,p2)P=(\boldsymbol{p}_1, \boldsymbol{p}_2)とおいた行列

P=(25151525)P= \begin{pmatrix} \frac{-2}{\sqrt{5}} & \frac{1}{\sqrt{5}}\\ \frac{1}{\sqrt{5}} & \frac{2}{\sqrt{5}} \end{pmatrix}

によりAAは対角化できる

P1AP=(2007)P^{-1} A P = \begin{pmatrix} 2 & 0 \\ 0 & 7 \end{pmatrix}
import sympy as sp

x1 = sp.Matrix([-2,1])
x2 = sp.Matrix([1,2])
A = sp.Matrix([
    [3, 2],
    [2, 6],
])

p1 = x1 / x1.norm()
c = x2.T @ p1
v2 = (x2 - c[0]*p1)
p2 = v2 / v2.norm()
P = sp.Matrix([p1, p2]).reshape(2, 2).T
P
Loading...
P.inv() @ A @ P
Loading...
P = sp.Matrix(sp.GramSchmidt([x1, x2])).reshape(2,2).T
P
Loading...
P.inv() @ A @ P
Loading...
  1. A=(123246369)A=\left(\begin{array}{lll}1 & 2 & 3 \\ 2 & 4 & 6 \\ 3 & 6 & 9\end{array}\right) ただし、 AA の固有値 λ\lambdaλ=0\lambda=0 (重解) 14 で、それぞれの

固有値に対する固有空間が

W(0)={c1(210)+c2(301)c1,c2R}W(14)={c(123)cR}\begin{aligned} W(0) & =\left\{\left.c_1\left(\begin{array}{c} -2 \\ 1 \\ 0 \end{array}\right)+c_2\left(\begin{array}{c} -3 \\ 0 \\ 1 \end{array}\right) \right\rvert\, c_1, c_2 \in \mathbb{R}\right\} \\ W(14) & =\left\{\left.c\left(\begin{array}{l} 1 \\ 2 \\ 3 \end{array}\right) \right\rvert\, c \in \mathbb{R}\right\} \end{aligned}

であることを用いてよい。

固有ベクトルとして

x1=(210),x2=(301),x3=(123)x_1 = \begin{pmatrix} -2 \\ 1 \\ 0 \end{pmatrix}, \quad x_2 = \begin{pmatrix} -3 \\ 0 \\ 1 \end{pmatrix}, \quad x_3 = \begin{pmatrix} 1 \\ 2 \\ 3 \end{pmatrix}

を用いる。

これらを直交化したベクトルをp1,p2,p3p_1, p_2, p_3とする。シュミットの直交化で求めていく。

(1) p1p_1を求める

x1=22+12=5\|x_1\| = \sqrt{|2|^2+|1|^2} = \sqrt{5}なので、

p1=x1x1=15(210)=(25150)p_1 = \frac{x_1}{\|x_1\|} = \frac{1}{\sqrt{5}} \begin{pmatrix} -2 \\ 1 \\ 0 \end{pmatrix} = \begin{pmatrix} \frac{-2}{\sqrt{5}} \\ \frac{1}{\sqrt{5}} \\ 0 \end{pmatrix}
import sympy as sp

x1 = sp.Matrix([-2,1,0])
x2 = sp.Matrix([-3,0,1])
x3 = sp.Matrix([1,2,3])

p1 = x1 / x1.norm()
p1
Loading...

(2) p2p_2を求める

c=x2,p1=325=65c = \langle \boldsymbol{x}_2, \boldsymbol{p}_1 \rangle = -3 \cdot \frac{-2}{\sqrt{5}} = \frac{6}{\sqrt{5}}
x2cp1=(301)65(25150)=(301)(125650)=(155125651)=(35651)\boldsymbol{x}_2 - c \boldsymbol{p}_1 = \begin{pmatrix} -3 \\ 0 \\ 1 \end{pmatrix} - \frac{6}{\sqrt{5}} \begin{pmatrix} \frac{-2}{\sqrt{5}} \\ \frac{1}{\sqrt{5}} \\ 0 \end{pmatrix} = \begin{pmatrix} -3 \\ 0 \\ 1 \end{pmatrix} - \begin{pmatrix} \frac{-12}{5} \\ \frac{6}{5} \\ 0 \end{pmatrix} = \begin{pmatrix} \frac{-15}{5} - \frac{-12}{5} \\ -\frac{6}{5} \\ 1 \end{pmatrix} = \begin{pmatrix} -\frac{3}{5}\\ -\frac{6}{5} \\ 1 \end{pmatrix}
x2cp1=352+652+12=925+3625+2525=7025=705\| \boldsymbol{x}_2 - c \boldsymbol{p}_1 \| = \sqrt{ \left|-\frac{3}{5}\right|^2 + \left|-\frac{6}{5}\right|^2 + 1^2 } = \sqrt{ \frac{9}{25} + \frac{36}{25} + \frac{25}{25} } = \sqrt{ \frac{70}{25} } = \frac{\sqrt{70}}{5}
p2=x2cp1x2cp1=570(35651)=(370670570)\boldsymbol{p}_2 = \frac{\boldsymbol{x}_2 - c \boldsymbol{p}_1 } {\| \boldsymbol{x}_2 - c \boldsymbol{p}_1 \| } = \frac{5}{\sqrt{70}} \begin{pmatrix} -\frac{3}{5}\\ -\frac{6}{5} \\ 1 \end{pmatrix} = \begin{pmatrix} -\frac{3}{\sqrt{70}}\\ -\frac{6}{\sqrt{70}} \\ \frac{5}{\sqrt{70}} \end{pmatrix}
c = (x2.T @ p1)[0]
p2 = (x2 - c * p1) / (x2 - c * p1).norm()
p2
Loading...

(3) p3p_3を求める

c1=x3,p1=125+215+30=0c2=x3,p2=1370+2670+3570=312+1570=0x3=12+22+32=14\begin{aligned} c_1 &= \langle x_3, p_1 \rangle = 1 \cdot \frac{-2}{\sqrt{5}} + 2 \cdot \frac{1}{\sqrt{5}} + 3 \cdot 0 = 0 \\ c_2 &= \langle x_3, p_2 \rangle =1 \cdot \frac{-3}{\sqrt{70}} + 2 \cdot \frac{-6}{\sqrt{70}} + 3 \cdot \frac{5}{\sqrt{70}} = \frac{-3 - 12 + 15}{\sqrt{70}} = 0 \\ \|x_3\| &= \sqrt{|1|^2+|2|^2+|3|^2} = \sqrt{14} \end{aligned}

なので

p3=x3(c1p1+c2p2)x3(c1p1+c2p2)=x3x3=114(123)\boldsymbol{p}_3 = \frac{ \boldsymbol{x}_3 - (c_1 \boldsymbol{p}_1 + c_2 \boldsymbol{p}_2) } {\| \boldsymbol{x}_3 - (c_1 \boldsymbol{p}_1 + c_2 \boldsymbol{p}_2)\| } = \frac{ \boldsymbol{x}_3 }{\| \boldsymbol{x}_3 \| } = \frac{1}{\sqrt{14}} \begin{pmatrix} 1 \\ 2 \\ 3 \end{pmatrix}

P=(p1,p2,p3)P=(p_1,p_2,p_3)とすると、このPP

P=(25370114156702140570314)P= \begin{pmatrix} -\frac{2}{\sqrt{5}} & -\frac{3}{\sqrt{70}} & \frac{1}{\sqrt{14}}\\ \frac{1}{\sqrt{5}} & -\frac{6}{\sqrt{70}} & \frac{2}{\sqrt{14}}\\ 0 & \frac{5}{\sqrt{70}} & \frac{3}{\sqrt{14}} \end{pmatrix}

によりAAは対角化できる

P1AP=[0000000014]P^{-1} A P = \left[\begin{array}{ccc} 0 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 14 \end{array}\right]
p3 = x3 / x3.norm()
p3
Loading...
P = sp.Matrix([p1, p2, p3]).reshape(3, 3).T
P
Loading...
P.inv()
Loading...
A = sp.Matrix([
    [1,2,3],
    [2,4,6],
    [3,6,9]
])

P.inv() @ A @ P
Loading...
P = sp.Matrix(sp.GramSchmidt([x1,x2,x3], orthonormal=True)).reshape(3,3).T
P
Loading...
簡易版

相異なる固有値に属する固有ベクトルたちは1次独立であり、別々に直交化できるため、ノルム

x1=22+12=5x2=32+12=10x3=12+22+32=14\begin{aligned} \|x_1\| &= \sqrt{|2|^2+|1|^2} = \sqrt{5}\\ \|x_2\| &= \sqrt{|3|^2+|1|^2} = \sqrt{10}\\ \|x_3\| &= \sqrt{|1|^2+|2|^2+|3|^2} = \sqrt{14}\\ \end{aligned}

を用いて

p1=x1x1=15(210)=(25150)p2=x2x2=110(301)p3=x3x3=114(123)\begin{aligned} p_1 &= \frac{x_1}{\|x_1\|} = \frac{1}{\sqrt{5}} \begin{pmatrix} -2 \\ 1 \\ 0 \end{pmatrix} = \begin{pmatrix} \frac{-2}{\sqrt{5}} \\ \frac{1}{\sqrt{5}} \\ 0 \end{pmatrix}\\ p_2 &= \frac{x_2}{\|x_2\|} = \frac{1}{\sqrt{10}} \begin{pmatrix} -3 \\ 0 \\ 1 \end{pmatrix}\\ p_3 &= \frac{x_3}{\|x_3\|} = \frac{1}{\sqrt{14}} \begin{pmatrix} 1 \\ 2 \\ 3 \end{pmatrix} \end{aligned}

とおく。これらを列ベクトルにもつ行列をP=(p1,p2,p3)P=(p_1,p_2,p_3)とおく。

P=(253141141502140110314)P= \begin{pmatrix} -\frac{2}{\sqrt{5}} & -\frac{3}{14} & \frac{1}{\sqrt{14}}\\ \frac{1}{\sqrt{5}} & 0 & \frac{2}{\sqrt{14}}\\ 0 & \frac{1}{\sqrt{10}} & \frac{3}{\sqrt{14}} \end{pmatrix}

AAPPで対角化可能である。

import sympy as sp

a1 = sp.Matrix([-2,1,0])
a2 = sp.Matrix([-3,0,1])
a3 = sp.Matrix([1,2,3])

p1 = a1 / a1.norm()
p2 = a2 / a2.norm()
p3 = a3 / a3.norm()
P = sp.Matrix([p1, p2, p3]).reshape(3, 3).T
P
Loading...
P.inv()
Loading...
A = sp.Matrix([
    [1,2,3],
    [2,4,6],
    [3,6,9]
])

P.inv() @ A @ P
Loading...
import sympy as sp

a1 = sp.Matrix([-2,1,0])
a2 = sp.Matrix([-3,0,1])
a3 = sp.Matrix([1,2,3])

P = sp.Matrix(sp.GramSchmidt([a1,a2,a3])).reshape(3,3).T
P
Loading...
P.inv() @ A @ P
Loading...

問2

直交行列の固有値は絶対値 1 の複素数であることを示せ。

AAnn次の直交行列、xxをゼロでないnn次のベクトルとする。

Ax=λxA x = \lambda x

のノルムを取ると

Ax=λxAx=λx(ノルムの定数倍についての定理cx=cxより)x=λx(直交変換は長さを保つ、すなわちAx=xのため)\begin{aligned} \| A x \| &= \| \lambda x \|\\ \| A x \| &= |\lambda| \| x \| \quad (ノルムの定数倍についての定理 \|c x\| = |c| \|x\| より)\\ \|x\| &= |\lambda| \| x \| \quad (直交変換は長さを保つ、すなわち \|A x\| = \|x\| のため)\\ \end{aligned}

よってλ=1|\lambda| = 1となる。

固有値は一般には複素数となるため、直交行列の固有値は絶対値1の複素数である