||
对于计算矩阵乘法:
除了一般的计算公式外,更推荐利用线性组合的思想计算,熟练后可方便思考:
例如:C=AB
$C=\begin{bmatrix} 1 & 2\\ 3 & 4 \end{bmatrix}$ $\begin{bmatrix} 3 & 1\\ 4 & 2 \end{bmatrix}$
1、行的线性组合
$\sum$ (A中每一行的每个元素 * B中对应行) = C中对应行
C的第一行 1*[3 1] + 2*[4 2] = [11 5}
C的第二行 3*[3 1] + 4*[4 2] = [25 11]
2、列的线性组合
$\sum$ (B中每一列的每个元素 * A中对应列) = C中对应列
即:
C的第一列:
$3*\begin{bmatrix} 1\\ 3 \end{bmatrix} +4*\begin{bmatrix} 2\\ 4 \end{bmatrix} =\begin{bmatrix} 11\\ 25 \end{bmatrix}$
C的第二列:
$1*\begin{bmatrix} 1\\ 3 \end{bmatrix} + 2* \begin{bmatrix} 2\\ 4 \end{bmatrix} = \begin{bmatrix} 5\\ 11 \end{bmatrix}$
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-4-23 15:27
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社