$\newcommand{\q}[2]{\langle #1 | #2 \rangle} \newcommand{\qr}[1]{|#1\rangle} \newcommand{\ql}[1]{\langle #1|} \renewcommand{\v}[2]{\langle #1,#2\rangle} \newcommand{\norm}[1]{\left\lVert#1\right\rVert}$ Here's an application of the operator $\qr{\psi}\ql{\phi}$ to the vector $\qr{x}$. One writes $$ \begin{align} (\qr{\psi}\ql{\phi})\qr{x} &= \qr{\psi}(\ql{\phi}\qr{x})\\ &= \qr{\psi}(\q{\phi}{x})\\ &= (\ql{\phi}\phi\qr{x})\qr{\psi} \end{align}$$
The last equation totally loses me. First I don't understand what is the meaning of $\ql{\phi}\phi\qr{x}$ and I have no idea how it came about (moving $\qr{\psi}$ to the other end of the expression).
I know $\qr{\psi}\ql{\phi}$ is a matrix and I know how to get the matrix if I have two concrete vectors $\qr{\psi}$ and $\ql{\phi}$. I also know how to multiply a matrix by a vector, but I don't know how to apply the outer product as in those equations above. (They seem to be saying something important and I'm missing it.)
This is found in the very definition of outer product in the nice book by David McMahon: Quantum Computing Explained, ISBN 978-0-470-09699-4. The two relevant pages, including an example.