# Show that $\langle v,O(v)\rangle= \mathrm{tr}(O|v\rangle\langle v|)$ for $v \in V$

I have a question regarding this exercise:

Let O be an observable on V. Show that $$\langle v,O(v)\rangle= \mathrm{tr}(O|v\rangle\langle v|)$$ for $$v \in V$$.

I thought that this exercise is quite easy because I thought I can use the fact that we define $$|v\rangle\langle v|$$ as density operator. Any other ideas or is my idea the right one?

• Here are two hints, you can use either to find the desired conclusion. 1. The trace is cyclic; 2. You can take the trace in any orthonormal basis you want. Note that you should really try to use mathjax to write your equations though: here's a guide Oct 27 at 16:41

Extend $$|v\rangle$$ to an orthonormal basis $$|u_1\rangle, |u_2\rangle, \dots, |u_n\rangle$$ so that $$|u_1\rangle=|v\rangle$$. Then we have
$$\mathrm{tr}(O|v\rangle\langle v|) = \sum_k\langle u_k|O|v\rangle\langle v|u_k\rangle = \langle v|O|v\rangle$$