学習環境
- Surface 3 (4G LTE)、Surface 3 タイプ カバー、Surface ペン(端末)
- Windows 10 Pro (OS)
- 数式入力ソフト(TeX, MathML): MathType
- MathML対応ブラウザ: Firefox、Safari
- MathML非対応ブラウザ(Internet Explorer, Microsoft Edge, Google Chrome...)用JavaScript Library: MathJax
- 参考書籍
ラング線形代数学(上)(S.ラング (著)、芹沢 正三 (翻訳)、ちくま学芸文庫)の6章(行列式)、3(行列式の存在)、練習問題5.を取り組んでみる。
コード(Emacs)
Python 3
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from sympy import pprint, symbols, Matrix
print('5.')
x1, x2, x3 = symbols('x1 x2 x3')
M = Matrix([[x ** i for i in range(3)]
for x in [x1, x2, x3]])
pprint(M)
d = M.det()
pprint(d)
pprint(d.expand())
pprint(d.factor())
入出力結果(Terminal, IPython)
$ ./sample5.py
5.
⎡ 2⎤
⎢1 x₁ x₁ ⎥
⎢ ⎥
⎢ 2⎥
⎢1 x₂ x₂ ⎥
⎢ ⎥
⎢ 2⎥
⎣1 x₃ x₃ ⎦
2 2 2 2 2 2
- x₁ ⋅x₂ + x₁ ⋅x₃ + x₁⋅x₂ - x₁⋅x₃ - x₂ ⋅x₃ + x₂⋅x₃
2 2 2 2 2 2
- x₁ ⋅x₂ + x₁ ⋅x₃ + x₁⋅x₂ - x₁⋅x₃ - x₂ ⋅x₃ + x₂⋅x₃
-(x₁ - x₂)⋅(x₁ - x₃)⋅(x₂ - x₃)
$
0 コメント:
コメントを投稿