I don't understand how a vector * vector.T results in a matrix? Shouldn't the result be a single product?
For instance
multiplied with its transposed form.
Maybe I am confused as to how to multiply a vector with a transposed vector.
Best Answer
When you multiply a $3\times1$ vector by a $1\times3$ vector the result is $(3\times1)\cdot(1\times3)=3\times3$.
On the other hand, when you multiply a $1\times3$ vector by a $3\times1$ vector, you get $(1\times3)\cdot(3\times1)=1\times1$ (this is the inner product, aka the dot product)
The image in this answer is the easiest way to visualize this, imo.
Sometimes, we just say that a $1\times 1$ matrix is the same as a scalar. Afterall, when it comes to addition and multiplication of $1\times 1$ matrices vs addition and multiplication of scalars, the only difference between something like $\begin{bmatrix}3\end{bmatrix}$ and $3$ is some brackets. Consider $$(3+5)\cdot 4 = 32 \\ (\begin{bmatrix} 3\end{bmatrix} + \begin{bmatrix} 5\end{bmatrix})\begin{bmatrix} 4\end{bmatrix} = \begin{bmatrix} 32\end{bmatrix}$$ The algebra works out exactly the same. So sometimes it's not ridiculous to think of $1\times 1$ matrices as just another way of writing scalars.
But if you do want to distinguish the two, then just think of the formula $a\cdot b = a^Tb$ as a way of finding out which scalar you get from the dot product of $a$ and $b$ and not literally the dot product value itself (which should be scalar). That is, we calculate the dot product of $\begin{bmatrix} 1 \\ 2\end{bmatrix}$ and $\begin{bmatrix} 3 \\ 4\end{bmatrix}$ by using the formula $$\begin{bmatrix} 1 \\ 2\end{bmatrix}^T\begin{bmatrix} 3 \\ 4\end{bmatrix} = \begin{bmatrix} 1 & 2\end{bmatrix}\begin{bmatrix} 3 \\ 4\end{bmatrix} = \begin{bmatrix} 11\end{bmatrix}$$ and then say that this tells us that the dot product is really $11$. So the formula $a^Tb$ is just an algorithm we use to find the correct scalar.
You can view it either way. It doesn't really make a difference.
Best Answer
When you multiply a $3\times1$ vector by a $1\times3$ vector the result is $(3\times1)\cdot(1\times3)=3\times3$.
On the other hand, when you multiply a $1\times3$ vector by a $3\times1$ vector, you get $(1\times3)\cdot(3\times1)=1\times1$ (this is the inner product, aka the dot product)
The image in this answer is the easiest way to visualize this, imo.