学習環境
- Surface 3 (4G LTE)、Surface 3 タイプ カバー、Surface ペン(端末)
- Windows 10 Pro (OS)
- Nebo(Windows アプリ)
- iPad Pro + Apple Pencil
- MyScript Nebo(iPad アプリ)
- 参考書籍
線型代数入門(松坂 和夫(著)、岩波書店)の第5章(行列式)、6(行列式の計算)、問題6.を取り組んでみる。
-
det(31143-1541)=det(00174-1231)=21-8=13x=113det(-511-23-1641)=113det(001-74-11131)=113(-21-44)=-6513=-5y=113det(3-514-2-1561)=113det(0017-7-12111)=113(77+14)=9113=7z=113det(31-543-2546)=113det(010-5313-7426)=113(130-91)=10-7=3- det(12-1-11-1111-1-101001)=det(22-100-1101-1-100001)=(2+2)-(-2+1)=5x=15det(32-1-13-1114-1-104001)=15det(61003-1114-1-104001)=15det(6100-1-1104-1-104001)=15((6+4)-(-6+1))=3y=15det(13-1-1131114-101401)=15det(27-100-11014-101401)=15((2+7)-(8+1))=0z=15det(123-11-1311-1401041)=15det(22700-1-101-1401041)=15((-8-2)-(2-7))=-1w=15det(12-131-1131-1-141004)=15det(121-11-10-11-1-201000)=-15((1-2)-4)=1
コード(Emacs)
Python 3
#!/usr/bin/env python3 from sympy import pprint, symbols, Matrix, solve x, y, z, w = symbols('x, y, z, w') exprs = [ ( 3 * x + y + z + 5, 4 * x + 3 * y - z + 2, 5 * x + 4 * y + z - 6 ), ( x + 2 * y - z - w - 3, x - y + z + w - 3, x - y - z - 4, x + w - 4 ) ] for i, expr in enumerate(exprs): print(f'({chr(ord("a") + i)})') for t in [expr, solve(expr)]: pprint(t) print() print()
入出力結果(Terminal, Jupyter(IPython))
$ ./sample6.py (a) (3⋅x + y + z + 5, 4⋅x + 3⋅y - z + 2, 5⋅x + 4⋅y + z - 6) {x: -5, y: 7, z: 3} (b) (-w + x + 2⋅y - z - 3, w + x - y + z - 3, x - y - z - 4, w + x - 4) {w: 1, x: 3, y: 0, z: -1} $
0 コメント:
コメントを投稿