学習環境
- Surface 3 (4G LTE)、Surface 3 タイプ カバー、Surface ペン(端末)
- Windows 10 Pro (OS)
- Nebo(Windows アプリ)
- iPad Pro + Apple Pencil
- MyScript Nebo(iPad アプリ)
- 参考書籍
ラング線形代数学(上)(S.ラング (著)、芹沢 正三 (翻訳)、ちくま学芸文庫)の7章(スカラー積と直交性)、5(行列の階数と一次方程式)、練習問題1-(a)、(b)、(c)、(d).を取り組んでみる。
2
2
2
1
コード(Emacs)
Python 3
#!/usr/bin/env python3
from sympy import pprint, symbols, Matrix
print('1.')
ts = [[[2, 1, 3],
[7, 2, 0]],
[[-1, 2, -2],
[3, 4, -5]],
[[1, 2, 7],
[2, 4, -1]],
[[1, 2, -3],
[-1, -2, 3],
[4, 8, -12],
[0, 0, 0]]]
for i, t in enumerate(ts):
print(f'({chr(ord("a") + i)})')
A = Matrix(t)
for s in [A, A.rank()]:
pprint(s)
print()
print()
入出力結果(Terminal, Jupyter(IPython))
$ ./sample1.py 1. (a) ⎡2 1 3⎤ ⎢ ⎥ ⎣7 2 0⎦ 2 (b) ⎡-1 2 -2⎤ ⎢ ⎥ ⎣3 4 -5⎦ 2 (c) ⎡1 2 7 ⎤ ⎢ ⎥ ⎣2 4 -1⎦ 2 (d) ⎡1 2 -3 ⎤ ⎢ ⎥ ⎢-1 -2 3 ⎥ ⎢ ⎥ ⎢4 8 -12⎥ ⎢ ⎥ ⎣0 0 0 ⎦ 1 $
0 コメント:
コメントを投稿