学習環境
- 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
- 参考書籍
線型代数入門(松坂 和夫(著)、岩波書店)の第1章(2次元と3次元の簡単な幾何学)、10(空間における直線・平面の方程式)、問1、2、3、4.を取り組んでみる。
xy平面との交点
(x,y,z)=(1,2,3)+t(2,−1,−8)(x,y,z)=(1+2t,2−t,3−8t)3−8t=0t=38(1+34,2−38,0)=(74,138,0)zx平面との交点
2−t=0t=2(5,0,−13)
(x,y,z)=(−1,2,3)+t(4,0,7)(x,y,z)=(−1+4t,2,3+7t)(−1+4t)−4·2+4(3+7t)=532t=2t=116(x,y,z)=(−1+14,2,3+716)=(−34,2,5516)-
(x+3,y−1,z−2)·(2,4,−5)=02x+4y−5z+6−4+10=02x+4y−5z=−12
(x−5,y−3,z+2)·(2,−3,1)=02x−3y+z−10+9+2=02x−3y+z=−1
x=(3,4,−1)+s(−2,0,6)+t(0,−4,6)=(3−2s,4−4t,−1+6s+6t)x=3−2sy=4−4tz=−1+6s+6ts=x−3−2t=y−4−4z=−1−3x+9−32y+63x+32y+z=146x+3y+2z=28
x=(a,0,0)+s(−a,b,0)+t(−a,0,c)x=a−sa−tay=sbz=tcs=ybt=zcx=a−yba−azcxa+yb+zc=1
コード(Emacs)
Python 3
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from sympy import pprint, symbols, solve, Matrix print('1.') t = symbols('t') m = Matrix([1 + 2 * t, 2 - t, 3 - 8 * t]) for i in [2, 1]: ts = solve(m[i]) pprint(ts) pprint(m.subs({t: ts[0]}))
入出力結果(Terminal, IPython)
$ ./sample1.py 1. [3/8] ⎡7/4 ⎤ ⎢ ⎥ ⎢13/8⎥ ⎢ ⎥ ⎣ 0 ⎦ [2] ⎡ 5 ⎤ ⎢ ⎥ ⎢ 0 ⎥ ⎢ ⎥ ⎣-13⎦ $
0 コメント:
コメントを投稿