TITLE: Proof of this Linear Algebra Identity
QUESTION [7 upvotes]: 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".

REPLY [2 votes]: 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)$