<jupyter_start><jupyter_text>第三十一讲 线性变换及对应矩阵线性变换满足两个性质：* $T(v + w) = T(v) + T(w)$* $T(cv) = cT(v)$这两个性质可以写成一条公式 $T(cv + dw) = cT(v) + dT(w)$。 * 例一，投影，将一个向量投影到一个空间上。* 例二，平移，这个操作并不是一个线性变换。<jupyter_code>%matplotlib inline
from functools import partial
import matplotlib.pyplot as plt
import numpy as np


fig1 = plt.subplot(223)
fig1.arrow(0, 0, 4, 4, head_width=0.5, head_length=0.5, color='red', length_includes_head=True)
fig1.arrow(0, 0, 2, 4, head_width=0.5, head_length=0.5, color='black', length_includes_head=True)
fig1.arrow(2, 4, 2, 0, head_width=0.5, head_length=0.5, color='blue', length_includes_head=True)
plt.title('Before')
fig1.set_xlim(0, 10)
fig1.set_ylim(0, 10)

fig2 = plt.subplot(224)
fig2.arrow(0, 0, 8, 8, head_width=0.5, head_length=0.5, color='red', length_includes_head=True)
fig2.arrow(0, 0, 4, 8, head_width=0.5, head_length=0.5, color='black', length_includes_head=True)
fig2.arrow(4, 8, 2, 0, head_width=0.5, head_length=0.5, color='blue', length_includes_head=True)
fig2.arrow(0, 0, 6, 8, head_width=0.5, head_length=0.5, color='green', length_includes_head=True)
plt.title('After')
fig2.set_xlim(0, 10)
fig2.set_ylim(0, 10)

plt.subplots_adjust(hspace=1)
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17959183673469387, 'fraction_numerical': 0.07183673469387755, 'mean_word_length': 7.455172413793103, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '523963', 'license': 'Apache-2.0', 'n_tokens_mistral': 633, 'n_tokens_neox': 619, 'n_words': 99, 'path': 'src/Linear Algebra/Lecture31.ipynb', 'repo_name': 'JeraKrs/linear-algebra-notes', 'size': '1225'}