Matrix and vector multiplication in component notation

846 Views Asked by At

I am confused about the index notation when it comes to matrix and vector multiplication. Let $A,B\in GL(n,\mathbb{R}), x\in \mathbb{R}^{n}$. I know that for two matrices the product between them is defined as $$(AB)_{ij}=\sum\limits_{k=1}^nA_{ik}B_{kj}.$$ therefore the product between a matrix and a vector should be something like $$(Ax)_i = \sum\limits_{k=1}^n A_{ik}x_k.$$ The thing that confuses me now is when I try to write a sum for $Ax$ rather than $(Ax)_i$. Assuming that $A$ and $x$ are written in terms of the standardbasis $\{e_i\}_{i=0}^n$, I came up with the following $$Ax=\sum\limits_{i=1}^nx_iAe_i=\sum\limits_{i,k=1}^n A_{ki}x_ie_k.$$ The problem now is that in one of my lecturenotes it says $Ae_i=\sum_{k=1}^n A_{ij}e_j$, which doesn't really work with what I have written above...

I tried a simple example and got $$\begin{pmatrix}a&b\\c&d\end{pmatrix}\begin{pmatrix}0\\1\end{pmatrix}= \begin{pmatrix}b\\d\end{pmatrix} = A_{12}e_1+A_{22}e_2=\sum\limits_{k=1}^2A_{k2}e_k.$$ So why exactly is $Ae_i=\sum_{k=1}^n A_{ij}e_j$ correct?

2

There are 2 best solutions below

1
On

Assuming $e_i$ is the all zero vector except $1$ at the $i^{th}$ position, then \begin{align}(Ae_i)_j &= \sum\limits_{k=1}^nA_{jk}(e_i)_k \\ &= A_{j1}(e_i)_1 + \ldots + A_{ji}(e_i)_i + \ldots + A_{jn}(e_i)_n \\ &= 0 + \ldots + A_{ji} + \ldots + 0 \\ &= A_{ji}.\end{align} That is, $$(Ae_i)_j = A_{ji}.$$ Hence, $$Ae_i= \begin{bmatrix} (Ae_i)_1 \\ \vdots \\ (Ae_i)_n \end{bmatrix} = \begin{bmatrix} A_{1i} \\ \vdots \\ A_{ni} \end{bmatrix}.$$ In other words, we select the $i^{th}$ column of $A$.

0
On

Matrix-vector multiplication was shown to me before matrix-matrix multiplication. It's easy to grasp when you see a picture of how it works. Let $a_{j}$ denote the $jth$ column of $A$ and the $mth$ vector then we can write the matrix-vector product as

$$ b= Ax =\sum_{j=1}^{n} x_{j}a_{j} $$

This can be seen intuitively here. enter image description here

$b$ is expressed as a linear combination of the columns of $a_{j}$

the matrix-matrix product is just like this, $B=AC$

$$ b_{ij} = \sum_{k=1}^{m} a_{ik}c_{kj}$$

then we have enter image description here

this is better understood as this, giving us the $b_{j}$ column as a linear combination of the columns $a_{k}$ where the coefficients are $c_{kj}$

$$ b_{j} = Ac_{j} = \sum_{k=1}^{m} c_{kj}a_{k}$$