# Math Help - matrix multiplication help?

1. ## matrix multiplication help?

Let ej denote the jth unit column that contains a 1 in the jth
position and zeros everywhere else. For a general matrix An×n, describe the following products. (a) Aej (c) eTiAej?
Theorem:
Rows and Columns of a Product
Suppose that A = [aij] is m × p and B = [bij] is p × n.
• [AB]i∗ = Ai∗B [( ith row of AB)=( ith row of A) ×B]. (3.5.4)

• [AB]∗j = AB∗j [ (jth col of AB)=A× ( jth col of B)]. (3.5.5)

• [AB]i∗ = ai1B1∗ + ai2B2∗ + · · · +aipBp∗aikBk∗. (3.5.6)

• [AB]∗j = A∗1b1j + A∗2b2j + · · · + A∗pbpjA∗kbkj (3.5.7)

These last two equations show that rows of AB are combinations of
rows of B, while columns of AB are combinations of columns of A.

For parts a and c im not even sure what they are even asking for. When its saying ej is a unit column does that mean like this (1 0 0...0) as an example?

2. ## Re: matrix multiplication help?

Hey bonfire09.

You are correct in saying that e^j is a unit vector where the jth element is a 1 and everything else is a zero. The ^t means transpose of that vector.

These assume the vectors are in R^n and not some other system.

3. ## Re: matrix multiplication help?

When they are asking to describe the product of Aej what do they mean here? Since e^j is a unit vector that means Aej= a11B*1+a21B*2+a31B*1+..+aipBp∗ from (3.5.6)?

4. ## Re: matrix multiplication help?

It will basically be like a dot product and it should return the (i,j)th element of the matrix (it will return one scalar number).

But remember that ej has the jth entry equal to 1 so you can have n different ej vectors (and ei vectors as well).

5. ## Re: matrix multiplication help?

the way i remember this stuff is that multiplying A on the RIGHT by ej picks out the j-th column of A, and then multiplying A on the LEFT by:

(ej)T (that is, a unit row-vector) picks out the j-th row of A.

now let's look at what happens with a product AB.

the j-th column of AB only need the j-th column of B to compute (we just take the dot product of the different rows of A with that column of B to get the entries).

if we expand this (it gets messy, but here goes):

Bj = b1je1 +...+bnjen.

so (AB)j = A(Bj) = A(b1je1 +...+bnjen)

= b1jA(e1) +... + bnjA(en)

= b1j(a11,a21,...,an1) +....+ bnj(a1n,a2n,...,ann)

and collecting all the coordinates in the same position together:

= (a11b1j+...+a1nbnj, a21bij+...+a2nbnj,....,an1b1j+...+annbnj)

this is what (3.5.5) says.

in particular, if B = ej (that is, B has only one column, which is the j-th standard unit vector) = (0,...,0,1,0,...0)

then A(ej) = (a1j,a2j,....,anj) (only the j-th entry in the i-th row survives).

if we want to know the i-th row of AB, we only need to use the i-th row of A.

let me work out some examples for you:

$A = \begin{bmatrix}2&1&3\\1&4&5\\-1&0&3 \end{bmatrix};\ B = \begin{bmatrix}-2&0&1\\3&2&0\\6&6&0\end{bmatrix}$.

then $AB = \begin{bmatrix}17&20&2\\40&38&1\\20&18&-1 \end{bmatrix}$.

see how the third column of AB is just the first column of A? also the second column of AB is just twice the second column of A plus 6 times the 3rd column of A:

(20,38,18) = 2(1,4,0) + 6(3,5,3).

in the same fashion, the third row of AB is just 3 times the third row of B minus the first row of B:

(20,18,-1) = 3(6,6,0) - (-2,0,1).

it should be clear that, for example:

$\begin{bmatrix}2&1&3\\1&4&5\\-1&0&3 \end{bmatrix} \begin{bmatrix}0\\1\\0 \end{bmatrix} = \begin{bmatrix}1\\4\\0 \end{bmatrix}$

-we just write down the second column of A.

can you think of a shortcut for writing down:

$\begin{bmatrix}0&1&0 \end{bmatrix} \begin{bmatrix}2&1&3\\1&4&5\\-1&0&3 \end{bmatrix}$?

6. ## Re: matrix multiplication help?

it be [1 4 5]. So e^TA is represented by Ai*.

7. ## Re: matrix multiplication help?

so, continuing this line of reasoning, what do you get when you take the j-th column of a matrix that is the i-th row of A (a row is a 1xn matrix)?

is this the same as the i-th row of the (nx1 matrix) the j-th column of A?

8. ## Re: matrix multiplication help?

I think your trying to say [0 1 0]A^T then it be [1 4 0] which be one of the rows of A^T. Well it does form the second column of Matrix A. Is there also a way to prove that Aej is equal to A*j?

9. ## Re: matrix multiplication help?

what i am asking is, what is (ei)TAej?

we can find this two ways:

$e_i^TA = \begin{bmatrix}a_{i1}&a_{i2}&\dots&a_{in} \end{bmatrix}$

what is the j-th column of that matrix (the columns are very short)?

or:

$Ae_j = \begin{bmatrix}a_{1j}\\a_{2j}\\ \vdots\\a_{nj}\end{bmatrix}$

what is the (rather narrow) i-th row of that?

10. ## Re: matrix multiplication help?

Oh I think I see it now. It just be an entry of Aej represented by anj. So (ei)TAej is just anj

11. ## Re: matrix multiplication help?

no, it is aij.

12. ## Re: matrix multiplication help?

oh ok. i was going off your notation but it makes sense.