线性代数--矩阵乘法
线性代数
打算发一个线性代数的系列文章,一共10篇左右。
矩阵乘法
Suppose:
\[dim(A) = m \times n, dim(B) = n \times p
\]
C是矩阵相乘的结果:
\[C= A\times B
\]
角度一:定义的角度
\[C_{i,j} = \sum_{k=1}^{n} A_{i,k} \cdot B_{k,j}
\]
角度二,列的线性组合
C矩阵的每一列都是A中各列的线性组合,其中线性组合的乘数由B对应列决定;
\[C_{:,j} = \sum_{k=1}^{n} A_{:k} \cdot B_{k,j}
\]
角度三,行的线性组合
C矩阵的每一行都是B中各行的线性组合,其中线性组合的乘数由A对应行决定;
\[C_{i,:} = \sum_{k=1}^{n} A_{i,k} \cdot B_{k,:}
\]
角度四,矩阵乘以向量的形式
C的每一列可以看做A乘以B的某一列得到
\[C_{:,j} = A \times \cdot B_{:,j}
\]
Example:
\[ \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} \times
\begin{bmatrix} 2 & 3 \\ 1 & 4 \end{bmatrix}
=\begin{bmatrix} 4 & 11 \\ 10 & 25 \end{bmatrix}
\]
角度二:
\[\begin{bmatrix} 4 \\ 10 \end{bmatrix}
= 2 \cdot \begin{bmatrix} 1 \\ 3 \end{bmatrix}
+ 1 \cdot \begin{bmatrix} 2 \\ 4 \end{bmatrix}
\]
角度三:
\[\begin{bmatrix} 4 & 11 \end{bmatrix}
= 1 \cdot \begin{bmatrix} 2 & 3 \end{bmatrix}
+ 2 \cdot \begin{bmatrix} 1 & 4 \end{bmatrix}
\]
角度四:
\[\begin{bmatrix} 4 \\ 10 \end{bmatrix}
= \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}
\times \begin{bmatrix} 2 \\ 1 \end{bmatrix}
\]

浙公网安备 33010602011771号