线性代数
方程组的几何解释
线性组合
把向量相加得到 v+w, 随后乘以各自的常量c和d,得到cv和dw,将他们相加得到线性组合 cv+df
形如:
点乘
向量的长度
内积
方程
矩阵模式
写成矩阵模式就是:
逆矩阵
逆矩阵的特性
Row picture 行图像
把属于方程的图像画出来,交点就是解
import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(-5, 5, 50)
y = 3-2*x
y2 = (x+1)/2
plt.figure(num=3, figsize=(8, 5),)
plt.xlim((-5, 5))
plt.ylim((-5, 5))
ax = plt.gca()
ax.spines['bottom'].set_position(('data', 0))
ax.spines['left'].set_position(('data',0))
plt.plot(x, y)
plt.plot(x, y2)
plt.show()
1573030360210.png
Column Picture 列图像
import numpy as np
import matplotlib.pyplot as plt
soa = np.array([[0, 0, 2, 1], [0, 0, 1, -2], [2, 1, 1, -2]])
X, Y, U, V = zip(*soa)
plt.figure(num=3, figsize=(8, 5),)
plt.xlim((-5, 5))
plt.ylim((-5, 5))
ax = plt.gca()
ax.spines['bottom'].set_position(('data', 0))
ax.spines['left'].set_position(('data',0))
ax.quiver(X, Y, U, V, angles='xy', scale_units='xy', scale=1)
plt.annotate(r'3, -1', xy=(3, -1), xycoords='data', xytext=(+30, -30),
textcoords='offset points', fontsize=16,
arrowprops=dict(arrowstyle='->', connectionstyle="arc3,rad=.2"))
plt.show()
1573031004392.png