正在加载图片...
entry of C is equal to the inner product of the ith row of A and the jth row of B.Symbolically, this looks like the following, aTb1ab2· aTbp a喝b C=AB ambi amb2 ambp Remember that since A∈Rmxn and B∈Rnxp,ai∈Rn and b,∈Rm,so these inner products all make sense.This is the most "natural"representation when we represent A by rows and B by columns.Alternatively,we can represent A by columns,and B by rows. This representation leads to a much trickier interpretation of AB as a sum of outer products. Symbolically, C=AB= a:t Put another way,AB is equal to the sum,over all i,of the outer product of the ith column of A and the ith row of B.Since,in this case,aiE Rm and biE RP,the dimension of the outer product ab is m x p,which coincides with the dimension of C.Chances are,the last equality above may appear confusing to you.If so,take the time to check it for yourself! Second,we can also view matrix-matrix multiplication as a set of matrix-vector products. Specifically,if we represent B by columns,we can view the columns of C as matrix-vector products between A and the columns of B.Symbolically, C=AB=A Ab Ab2 b, Here the ith column of C is given by the matrix-vector product with the vector on the right, ci=Abi.These matrix-vector products can in turn be interpreted using both viewpoints given in the previous subsection.Finally,we have the analogous viewpoint,where we repre- sent A by rows,and view the rows of C as the matrix-vector product between the rows of A and C.Symbolically, 二 C=AB Here the ith row of C is given by the matrix-vector product with the vector on the left, c=a B. 6entry of C is equal to the inner product of the ith row of A and the jth row of B. Symbolically, this looks like the following, C = AB =      — a T 1 — — a T 2 — . . . — a T m —        | | | b1 b2 · · · bp | | |   =      a T 1 b1 a T 1 b2 · · · a T 1 bp a T 2 b1 a T 2 b2 · · · a T 2 bp . . . . . . . . . . . . a T mb1 a T mb2 · · · a T mbp      . Remember that since A ∈ R m×n and B ∈ R n×p , ai ∈ R n and bj ∈ R n , so these inner products all make sense. This is the most “natural” representation when we represent A by rows and B by columns. Alternatively, we can represent A by columns, and B by rows. This representation leads to a much trickier interpretation of AB as a sum of outer products. Symbolically, C = AB =   | | | a1 a2 · · · an | | |        — b T 1 — — b T 2 — . . . — b T n —      = Xn i=1 aib T i . Put another way, AB is equal to the sum, over all i, of the outer product of the ith column of A and the ith row of B. Since, in this case, ai ∈ R m and bi ∈ R p , the dimension of the outer product aib T i is m × p, which coincides with the dimension of C. Chances are, the last equality above may appear confusing to you. If so, take the time to check it for yourself! Second, we can also view matrix-matrix multiplication as a set of matrix-vector products. Specifically, if we represent B by columns, we can view the columns of C as matrix-vector products between A and the columns of B. Symbolically, C = AB = A   | | | b1 b2 · · · bp | | |   =   | | | Ab1 Ab2 · · · Abp | | |  . Here the ith column of C is given by the matrix-vector product with the vector on the right, ci = Abi . These matrix-vector products can in turn be interpreted using both viewpoints given in the previous subsection. Finally, we have the analogous viewpoint, where we repre￾sent A by rows, and view the rows of C as the matrix-vector product between the rows of A and C. Symbolically, C = AB =      — a T 1 — — a T 2 — . . . — a T m —      B =      — a T 1 B — — a T 2 B — . . . — a T mB —      . Here the ith row of C is given by the matrix-vector product with the vector on the left, c T i = a T i B. 6
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有