学習環境
- Surface 3 (4G LTE)、Surface 3 タイプ カバー、Surface ペン(端末)
- Windows 10 Pro (OS)
- Nebo(Windows アプリ)
- iPad Pro + Apple Pencil
- MyScript Nebo(iPad アプリ)
- 参考書籍
ラング線形代数学(下)(S.ラング (著)、芹沢 正三 (翻訳)、ちくま学芸文庫)の9章(多項式と行列)、4(特性多項式)、練習問題12-(a)、(b)、(c).を取り組んでみる。
固有値 1。
固有ベクトル。
固有値1。
固有ベクトル。
固有値は1。
固有ベクトル。
コード(Emacs)
Python 3
#!/usr/bin/env python3
from sympy import pprint, symbols, Matrix, I, solve, sqrt
print('13.')
t, x, y, z = symbols('t, x, y, z')
As = [Matrix([[1, 1],
[0, 1]]),
Matrix([[1, 1, 1],
[0, 1, 1],
[0, 0, 1]]),
Matrix([[1, 1, 0],
[0, 1, 1],
[0, 0, 1]])]
Bs = [Matrix([[t, 0],
[0, t]]),
Matrix([[t, 0, 0],
[0, t, 0],
[0, 0, t]]),
Matrix([[t, 0, 0],
[0, t, 0],
[0, 0, t]])]
Xs = [Matrix([[x],
[y]]),
Matrix([[x],
[y],
[z]]),
Matrix([[x],
[y],
[z]])]
for i, (A, B, X) in enumerate(zip(As, Bs, Xs)):
print(f'({chr(ord("a") + i)})')
C = B - A
D = C.det().factor()
ts = solve(D, t)
for s in [A, B, C, D, ts]:
pprint(s)
print()
for t0 in ts:
E = C.subs({t: t0}) * X
pprint(solve(E, dict=True))
print()
入出力結果(Terminal, Jupyter(IPython))
$ ./sample13.py
13.
(a)
⎡1 1⎤
⎢ ⎥
⎣0 1⎦
⎡t 0⎤
⎢ ⎥
⎣0 t⎦
⎡t - 1 -1 ⎤
⎢ ⎥
⎣ 0 t - 1⎦
2
(t - 1)
[1]
[{y: 0}]
(b)
⎡1 1 1⎤
⎢ ⎥
⎢0 1 1⎥
⎢ ⎥
⎣0 0 1⎦
⎡t 0 0⎤
⎢ ⎥
⎢0 t 0⎥
⎢ ⎥
⎣0 0 t⎦
⎡t - 1 -1 -1 ⎤
⎢ ⎥
⎢ 0 t - 1 -1 ⎥
⎢ ⎥
⎣ 0 0 t - 1⎦
3
(t - 1)
[1]
[{y: 0, z: 0}]
(c)
⎡1 1 0⎤
⎢ ⎥
⎢0 1 1⎥
⎢ ⎥
⎣0 0 1⎦
⎡t 0 0⎤
⎢ ⎥
⎢0 t 0⎥
⎢ ⎥
⎣0 0 t⎦
⎡t - 1 -1 0 ⎤
⎢ ⎥
⎢ 0 t - 1 -1 ⎥
⎢ ⎥
⎣ 0 0 t - 1⎦
3
(t - 1)
[1]
[{y: 0, z: 0}]
$
0 コメント:
コメントを投稿