Types: N/A
Examples: 10.2.1 Example of Matrix-Column-Vector Multiplication Using Dot Products
Constructions: N/A
Generalizations: N/A

Properties: N/A
Sufficiencies: N/A
Questions: N/A

Matrix-Column-Vector Multiplication via Dot Products

Let matrix ARm×n and 3.1 Column Vector xRn×1. We define matrix-column-vector product Ax=bRm×1 with 5.1 Inner Product Between Vectors using an entry-by-entry approach. The ith entry of the product b=Ax can be calculated via dot product between the ith row of A and the vector x.

bi=entry(i,1)(Ax)=(A(i,:))Tx=k=1naikxk

for row index i{1,2,,m}. When we calculate each entry of the output vector, we produce:

Ax=[a11x1+a12x2++a1nxna21x1+a22x2++a2nxnam1x1+am2x2++amnxn]=[b1b2bm]
  • ! The inner dimensions must agree!

Remark. To analyze the dot product definition of matrix-column-vector multiplication, let's cut up our matrix A into row partitions and output vector b into individual scalars.

[A]m×n[n]n×1=[A(1,:)1×nA(2,:)1×nA(m,:)1×n]m×n[x]n×1=[b1b2bm]m×1=[b]m×1

Let's take a look at how the individual entries are computed.

b1=Entry(1,1)(b)=[A(1,:)]n×1Tconvert row to columnfirst row of Axn×1column vector=[a11a12a1n][x1x2xn]=a11x1+a12x2++a1nxn=k=1naikxk

We use k for the sum because when working with row partitions, we are iterating across the columns. This process would continue for the rest of the entries b2,b3,,bm.


Remark. Let's connect our dot product definition with our 10.1 Matrix-Column-Vector Multiplication via Linear Combinations definition. Using commutativity, we can rearrange our variables to shift our perspective.

[b1b2bm]=[a11x1+a12x2++a1nxna21x1+a22x2++a2nxnam1x1+am2x2++amnxn]=[x1a11+x2a12++xna1nx1a21+x2a22++xna2nx1am1+x2am2++xnamn]=[x1a11x1a21x1am1]+[x2a12x2a22x2am2]++[xna1nxna2nxnamn]=x1[a11a21am1]+x2[a12a22am2]++xn[a1na2namn]Linear combination

The outputs are identical, but the operational units of each version are different.