# How to apply the outer product operator?

$$\newcommand{\q}{\langle #1 | #2 \rangle} \newcommand{\qr}{|#1\rangle} \newcommand{\ql}{\langle #1|} \renewcommand{\v}{\langle #1,#2\rangle} \newcommand{\norm}{\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. • Could you provide where you find this? So that we know if they are talking about some particular quantum state and in which context they do this. Oct 2, 2018 at 19:52
• Absolutely. Reference added to the question. Thanks! @cnada Oct 2, 2018 at 20:34
• A very serious advice: Use a different book. Oct 2, 2018 at 21:15
• the last equation can make sense if you denote with $\phi$ the projector over the ket $|\phi\rangle$, that is: $\phi\equiv\lvert\phi\rangle\!\langle\phi\rvert$. I've seen this notation used every once in a while, though I agree it is not very clear nor useful in this context
– glS
Oct 3, 2018 at 10:24
• @gIS: there's also the question of why you would want to write that. What information (mathematical or physical) is being conveyed by first projecting $\lvert \chi \rangle$ onto $\lvert \phi \rangle$, and then taking the inner product of the result with $\lvert \phi \rangle$, instead of just computing $\langle \phi \vert \chi \rangle$? Admittedly this may be answered with yet more context, but it appears to be poor writing of a different sort. Oct 3, 2018 at 15:41

It is normal you are lost. Indeed that is mathematically incorrect. I guess the original idea was to say that the inner product $$\langle \phi | \chi \rangle$$ corresponds just to a coefficient and can be written either at the right or left of $$| \psi \rangle$$, giving you a proportionality.