# How it is possible that a ket precedes a bra in a matrix expression?

Is it possible to rewrite $$\langle a| M|b\rangle$$ as $$|b\rangle \langle a|M$$?

• I beg pardon but why is this physics and not just math? Sep 11 at 13:04
• Some context for the more casual reader: bra–ket notation. And perhaps Duality. Sep 11 at 14:14
• @Greendrake: Related to quantum mechanics? Though it isn't revealed. Sep 11 at 14:17
• @Greendrake The language employed is Dirac's bra-ket notation, which is used almost exclusively in physics. Translated into math, the question collapses to an evident "no" question. Sep 11 at 14:18
• The second expression is an outer product.
– J.G.
Sep 11 at 14:25

In general, you cannot rewrite $$\langle a | M | b \rangle$$ as $$|b\rangle \langle a| M$$. You can see that the two are not the same by just comparing what type of mathematical entity they are: $$\langle a | M | b \rangle$$ is a matrix element (of the operator $$M$$), which is a (complex) number. On the other hand, $$|b \rangle \langle a|$$ is an operator, as is $$M$$, so the product of the two is another operator, which is represented by a matrix, not just an element of one.

• “$\langle a|M|b\rangle$ is a matrix element (of the matrix $M$)” – no, unless both $a$ and $b$ happen to be basis vectors. Sep 11 at 15:20
• @leftaroundabout Yes, but one is free to choose whichever basis they like, so there is a matrix representation of the operator $M$ for which $\langle a | M | b \rangle$ is an actual element of that matrix. Apart from that, Dirac's notation is designed to be independent of the choice of basis and at least in the quantum mechanics lectures I heard and the books I read the term "matrix element" was used for any bra-operator-ket-expression. If this is not common practice, I'd appreciate being pointed to literature confirming this and will of course reformulate my answer accordingly.
– nu.
Sep 12 at 12:14
• Fair enough, but then don't say “of the matrix $M$”. That suggests that you already committed to representing operator-$M$ in a given basis, which will in general not include $a$ or $b$. Sep 13 at 12:02
• @leftaroundabout I replaced "matrix" with "operator" now where appropriate.
– nu.
Sep 13 at 15:50

The expressions you write are extensions in infinite-dimensional Hilbert space of plain matrix expressions.

Their analogs for finite dimensional real vector spaces and their matrices indexed by a finite set of indices i,j, whose repeated form implies summation over the whole set, are $$|a\rangle ~~\mapsto ~~ a_i \\ |b\rangle ~~\mapsto ~~b_i\\ M~~\mapsto M_{ij}\\ \langle a|M|b\rangle ~~\mapsto a_iM_{ij}b_j , ~~\hbox{ a scalar},\\ |b\rangle \langle a|M ~~\mapsto ~~ b_j a_i M_{ik}, ~~\hbox { a dyadic matrix,} \leadsto \\ \operatorname{Tr}(|b\rangle \langle a|M ) =\langle a|M|b\rangle ~~\mapsto ~~ a_i M_{ij} b_j .$$

Thinking in component form makes it easier to predict what kind of objects you will be getting out of Dirac notation. The expression $$\langle a|M$$ gives a bra (row vector): $$\begin{pmatrix}a_1^*& a_2^* \end{pmatrix}\begin{pmatrix}M_{11} & M_{12}\\ M_{21}&M_{22}\end{pmatrix}=\begin{pmatrix} a_1^*M_{11}+a_2^*M_{21} &a_1^*M_{12}+a_2^*M_{22}\end{pmatrix}$$ If we define $$\langle c|=\langle a|M$$ then your question becomes "is $$\langle c|b\rangle$$ the same as $$|b\rangle\langle c|$$?" They are not the same; the first expression is a scalar $$\langle c|b\rangle=\begin{pmatrix}c_1^*&c_2^*\end{pmatrix}\begin{pmatrix}b_1\\b_2\end{pmatrix}=c_1^*b_1+c_2^*b_2$$ while the second expression is a linear operator (matrix): $$|b\rangle\langle c|=\begin{pmatrix}b_1\\b_2\end{pmatrix}\begin{pmatrix}c_1^*&c_2^*\end{pmatrix}=\begin{pmatrix}b_1c_1^* &b_1c_2^*\\ b_2c_1^*&b_2c_2^*\end{pmatrix}$$ Heuristically you can see that $$|b\rangle$$ expects a bra on the left while $$\langle c|$$ expects a ket on the right. So the expression $$|b\rangle\langle c|$$ expects a bra on the left as well as a ket on the right.