I am trying to understand the transformation from a summation form to vectorization (or a form of matrix multiplications) in order to implement it in some programming language (octave or python or whatever) without using for loops.
The expression that I want to vectorize is this
The document that I got this form from tried to explain the process

So far this is clear except for (1) which the document tried to explain it like this:
I felt confused because what I know from matrix multiplication is to multiply a row by a column. I cannot understand this step where the multiplication here is like multiplying a column by a row.
Could you explain the last step a little further?


You can think a column vector as an element of the matrix. Let me explain with a simple example.
Support the $A$ is a 3 by 3 matrix and $\vec{a_i}$ is its $i$th column vector.
$$ A = \begin{bmatrix} a & b & c \\ d & e & f \\ g & h & i \end{bmatrix} = \begin{bmatrix} \vec{a_1} & \vec{a_2} & \vec{a_3} \end{bmatrix} $$ for some 3-dimensional vector $\vec{v} = \begin{bmatrix} x & y & z \end{bmatrix} $,
$$ \begin{align} &A\vec{x}\\ &= \begin{bmatrix} ax + by + cz \\ dx + ey + fz \\ gx + hy + iz \end{bmatrix} \\ &= \begin{bmatrix} ax \\ dx \\ gx \end{bmatrix} + \begin{bmatrix} by \\ ey \\ hy \end{bmatrix} + \begin{bmatrix} cz \\ fz \\ iz \end{bmatrix}\\ &=x\vec{a_1} + y\vec{a_2} + z\vec{a_3} \\ &= \begin{bmatrix} \vec{a_1} & \vec{a_2} & \vec{a_3} \end{bmatrix} \begin{bmatrix} x \\ y \\ z \end{bmatrix} \\ &= \begin{bmatrix} \vec{a_1} & \vec{a_2} & \vec{a_3} \end{bmatrix} * \vec{v} \end{align} $$