Proof of this Linear Algebra Identity Let $x, w \in \mathbb{R}^n$
How to show that: $(w^tx)x = (xx^t)w$ $\hspace{1em}$ ($t$ denotes transpose)
Attempt at proof:
$$
\begin{aligned}
\alpha &= (w^tx)x\\
\alpha^t &= x^t(w^tx)^t = x^t(x^tw)\\
(\alpha^t)^t &= (x^t)^t(x^tw) \hspace{1em} (\text{treating $x^tw$ as a scalar here})\\
\alpha &= x(x^tw) = (xx^t)w \hspace{1em} (\text{associativity})
\end{aligned}
$$
The above proof looks correct to me, but I'm still unsure as the last two steps feel like an "hack".
 A: Your proof looks correct to me, you are using that $x^T w$ is a scalar, and also that the matrix multiplication is associative.
More directly you can argue that
$$
 (w^T x) x = x (w^T x) = x(x^T w) = (x x^T) w \, ,
$$
where the first two steps use that $w^Tx$ is a scalar, and the last step uses that the matrix multiplication is associative.
A: I guess that $v'$ denotes the transpose.
This uses a trick, besides the transposition: $w'x$ is a scalar to be multiplied by an $n\times1$ matrix. You get the same result if you instead consider the product $x(w'x)$ where now $w'x$ is considered as an $1\times1$ matrix. But $w'x=x'w$, so you can write
$$
(w'x)x=(x'w)x=\underbrace{x}_{n\times 1}\underbrace{(x'w)}_{1\times 1}
=\underbrace{(xx')}_{n\times n}\underbrace{w}_{n\times 1}
$$
A: This kind of fact is understood easily using abstract linear algebra, as opposed to matrix algebra.
Let $x,w\in V$, where $V$ is a finite-dimensional vector space with a positive-definite inner product $\langle,\rangle$.
Both of your expressions, $(w^{t}x)x$ and $(xx^{t})w$, can be regarded as a matrix-level expression of the contraction of
$x \otimes x^{*} \otimes w \in V\otimes V^{*} \otimes V$,
the contraction being on the last 2 tensor factors, where $x^{*}=\langle x,-\rangle\in V^{*}$.
To make it more obvious that the identity is essentially associativity from this point of view, I would recommend writing it in the form:
$(xx^{t})w=x(x^{t}w)$
