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