線性代數(shù)
方程組的幾何解釋
線性組合
把向量相加得到 v+w, 隨后乘以各自的常量c和d,得到cv和dw,將他們相加得到線性組合 cv+df
形如:
點乘
向量的長度
內(nèi)積
方程
矩陣模式
寫成矩陣模式就是:
逆矩陣
逆矩陣的特性
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