矩阵乘法

矩阵乘法(行操作)


如果有:
E = [ 1 0 0 − 2 1 0 0 0 1 ]                       A = [ 2 4 − 2 4 9 − 3 − 2 − 3 7 ] E= \left[ \begin{matrix} 1 & 0 & 0 \\ -2 & 1 & 0 \\ 0 & 0 & 1 \end{matrix} \right] \space\space\space\space\space\space\space\space\space\space\space\space\space\space\space\space\space\space\space\space\space A= \left[ \begin{matrix} 2 & 4 & -2 \\ 4 & 9 & -3 \\ -2 & -3 & 7 \end{matrix} \right] E=120010001                     A=242493237

求EA=Y

  思维转变:EA看成E对A的行进行操作



  step1:
[ 1 0 0 0 0 1 ] [ 2 4 − 2 4 9 − 3 − 2 − 3 7 ] \left[ \begin{matrix} 1 & 0 & 0 \\ & & \\ 0 & 0 & 1 \end{matrix} \right] \left[ \begin{matrix} 2 & 4 & -2 \\ 4 & 9 & -3 \\ -2 & -3 & 7 \end{matrix} \right] 100001242493237
  等价于A的第一行和第三行不变
(1) [ 2 4 − 2 − 2 − 3 7 ] \left[ \begin{matrix} 2 & 4 & -2 \\ & & \\ -2 & -3 & 7 \end{matrix} \right]\tag{1} 224327(1)








  step2:

[ − 2 1 0 ] [ 2 4 − 2 4 9 − 3 − 2 − 3 7 ] \left[ \begin{matrix} & & \\ -2& 1 &0 \\ & & \end{matrix} \right] \left[ \begin{matrix} 2 & 4 & -2 \\ 4 & 9 & -3 \\ -2 & -3 & 7 \end{matrix} \right] 210242493237
  等价于A的  row1*(-2)+row2=new row2

(2) ( 2 , 4 , − 2 ) ∗ ( − 2 ) ( 2,4,-2)*(-2)\tag{2} (2,4,2)(2)(2)
(3) ( 4 , 9 , − 3 ) ∗ ( 1 ) ( 4,9,-3)*(1)\tag{3} (4,9,3)(1)(3)
(4) ( 2 ) + ( 3 ) = n e w   r o w 2    − >   [ 0 1 1 ] (2)+(3)=new\space row 2\space\space->\space\left[ \begin{matrix} & & \\ 0& 1 &1 \\ & & \end{matrix} \right]\tag{4} (2)+(3)=new row2  > 011(4)





  step3:
( 1 ) + ( 4 ) = [ 2 4 − 2 0 1 1 − 2 − 3 7 ] (1)+(4)=\left[ \begin{matrix} 2 & 4 &-2 \\ 0& 1 &1 \\ -2&-3 & 7 \end{matrix} \right] (1)+(4)=202413217




  • 例子:

如果有:
A = [ 1 2 3 4 5 6 7 8 9 ]                       X = [ 1 1 1 1 1 1 1 1 1 ] A= \left[ \begin{matrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7&8 &9 \end{matrix} \right] \space\space\space\space\space\space\space\space\space\space\space\space\space\space\space\space\space\space\space\space\space X= \left[ \begin{matrix} 1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 &1 \end{matrix} \right] A=147258369                     X=111111111

求AX=Y




step1:
[ 1 2 3 ] [ 1 1 1 1 1 1 1 1 1 ] \left[ \begin{matrix} 1 & 2 & 3 \\ & & \\ & & \end{matrix} \right] \left[ \begin{matrix} 1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 &1 \end{matrix} \right] 123111111111


  等价于A的  row1*1+row2*2+row3*3=new row1


(1) ( 1 , 1 , 1 ) ∗ ( 1 ) ( 1,1,1)*(1)\tag{1} (1,1,1)(1)(1)
(2) ( 1 , 1 , 1 ) ∗ ( 2 ) ( 1,1,1)*(2)\tag{2} (1,1,1)(2)(2)
(3) ( 1 , 1 , 1 ) ∗ ( 3 ) ( 1,1,1)*(3)\tag{3} (1,1,1)(3)(3)

   (4) ( 1 ) + ( 2 ) + ( 3 ) = [ 6 6 6 ] (1)+(2)+(3)= \left[ \begin{matrix} 6& 6& 6 \\ & & \\ & & \end{matrix} \right]\tag{4} (1)+(2)+(3)=666(4)


step2:

  同理
(5) [ 4 5 6 ] [ 1 1 1 1 1 1 1 1 1 ] = [ 15 15 15 ] \left[ \begin{matrix} & & \\ 4 & 5 & 6 \\ & & \end{matrix} \right] \left[ \begin{matrix} 1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 &1 \end{matrix} \right] =\left[ \begin{matrix} & & \\ 15 & 15 & 15 \\ & & \end{matrix} \right] \tag{5} 456111111111=151515(5)

(6) [ 7 8 9 ] [ 1 1 1 1 1 1 1 1 1 ] = [ 24 24 24 ] \left[ \begin{matrix} & & \\ & & \\ 7& 8&9 \end{matrix} \right] \left[ \begin{matrix} 1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 &1 \end{matrix} \right] =\left[ \begin{matrix} & & \\ & & \\ 24& 24&24 \end{matrix} \right] \tag{6} 789111111111=242424(6)

  
求 得 : Y = [ 6 6 6 15 15 15 24 24 24 ] 求得:Y=\left[ \begin{matrix} 6& 6& 6 \\ 15 & 15 &15 \\ 24& 24&24 \end{matrix} \right] :Y=615246152461524




矩阵乘法(列操作)

  • 两个矩阵AE相乘,看成E对A进行变换


    如果有:
    A = [ 2 4 − 2 4 9 − 3 − 2 − 3 7 ]                       E = [ 1 0 0 − 2 1 0 0 0 1 ] A= \left[ \begin{matrix} 2 & 4 & -2 \\ 4 & 9 & -3 \\ -2 & -3 & 7 \end{matrix} \right]\space\space\space\space\space\space\space\space\space\space\space\space\space\space\space\space\space\space\space\space\space E= \left[ \begin{matrix} 1 & 0 & 0 \\ -2 & 1 & 0 \\ 0 & 0 & 1 \end{matrix} \right] A=242493237                     E=120010001
    求AE=Y

  step1:
E = [ 1 0 0 − 2 1 0 0 0 1 ] = [ E 1 E 2 E 3 ] E=\left[ \begin{array}{c|c|c} 1 & 0 & 0 \\ -2 & 1 & 0 \\ 0 & 0 & 1 \end{array} \right] = \left[ \begin{matrix} & & \\ E1& E2& E3 \\ & & \end{matrix} \right] E=120010001=E1E2E3


A E = [ A E 1 A E 2 A E 3 ] AE=\left[ \begin{matrix} & & \\ AE1& AE2& AE3 \\ & & \end{matrix} \right] AE=AE1AE2AE3


  step2:

A E 1 = [ 2 4 − 2 4 9 − 3 − 2 − 3 7 ] [ 1 − 2 0 ] AE1= \left[ \begin{matrix} 2 & 4 & -2 \\ 4 & 9 & -3 \\ -2 & -3 & 7 \end{matrix} \right] \left[ \begin{matrix} 1 \\ -2 \\ 0 \end{matrix} \right] AE1=242493237120


  看成A的列向量的线性组合:


(1) [ 2 4 − 2 ] ∗ 1 + [ 4 9 − 3 ] ∗ ( − 2 ) + [ − 2 − 3 7 ] ∗ 0 = [ − 6 − 14 4 ] \left[ \begin{matrix} 2 \\ 4 \\ -2 \end{matrix} \right] *1+ \left[ \begin{matrix} 4 \\ 9 \\ -3 \end{matrix} \right]*(-2)+ \left[ \begin{matrix} -2 \\ -3 \\ 7 \end{matrix} \right]*0= \left[ \begin{matrix} -6 \\ -14 \\ 4 \end{matrix} \right]\tag{1} 2421+493(2)+2370=6144(1)


  step3:

  同理:
(2) A E 2 = [ 2 4 − 2 4 9 − 3 − 2 − 3 7 ] [ 0 1 0 ] = [ 4 9 − 3 ] AE2= \left[ \begin{matrix} 2 & 4 & -2 \\ 4 & 9 & -3 \\ -2 & -3 & 7 \end{matrix} \right] \left[ \begin{matrix} 0 \\ 1 \\ 0 \end{matrix} \right] = \left[ \begin{matrix} 4 \\ 9 \\ -3 \end{matrix} \right] \tag{2} AE2=242493237010=493(2)

(3) A E 3 = [ 2 4 − 2 4 9 − 3 − 2 − 3 7 ] [ 0 0 1 ] = [ − 2 − 3 7 ] AE3= \left[ \begin{matrix} 2 & 4 & -2 \\ 4 & 9 & -3 \\ -2 & -3 & 7 \end{matrix} \right] \left[ \begin{matrix} 0 \\ 0 \\ 1 \end{matrix} \right] = \left[ \begin{matrix} -2 \\ -3 \\ 7 \end{matrix} \right] \tag{3} AE3=242493237001=237(3)


   求得:

Y = ( 1 ) + ( 2 ) + ( 3 ) = [ A E 1 A E 2 A E 3 ] = [ − 6 4 − 2 − 14 9 − 3 4 − 3 7 ] Y=(1)+(2)+(3)= \left[ \begin{matrix} & & \\ AE1& AE2& AE3 \\ & & \end{matrix} \right] = \left[ \begin{matrix} -6 & 4 & -2 \\ -14 & 9 & -3 \\ 4 & -3 & 7 \end{matrix} \right] Y=(1)+(2)+(3)=AE1AE2AE3=6144493237

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值