2020年4月24日金曜日

学習環境

ラング線形代数学(上) (ちくま学現文庫)(S.ラング (著)、芹沢 正三 (翻訳)、筑摩書房)の4章(線形写像)、4(核と像の次元)、練習問題7、8、9の解答を求めてみる。


  1. fは単射かつ全射、すなわち全単射である。


  2. fは全単射


  3. fは全単射

コード

#!/usr/bin/env python3
from sympy import symbols, solve, plot

print('7.')

x = symbols('x', real=True)
f = x ** 2
g = x ** 3

p = plot((x ** 2, (x, 0, 2)),
         (x ** 3, (x, -2, 2)),
         ylim=(-2, 2),
         legend=True,
         show=False)

colors = ['red', 'green', 'blue', 'brown', 'orange',
          'purple', 'pink', 'gray', 'skyblue', 'yellow']

for o, color in zip(p, colors):
    o.line_color = color

p.show()
p.save('sample7.png')

入出力結果(Zsh、PowerShell、Terminal、Jupyter(IPython))

% ./sample7.py
7.
%

0 コメント:

コメントを投稿