# How do we prove $P(a_{n})=Tr\{\rho|a_{n}\rangle\langle a_{n}|\}$ in a mixed state?

If we have a mixed state such that, with probability $P_{1}$ the system is in state $|\psi_{1}\rangle$ and with probability $P_{2}$ the system is in the state $|\psi_{2}\rangle$

How do we prove that the probability to obtain a result $a_{n}$ in a mixed state is,

$$P(a_{n})=Tr\{\rho|a_{n}\rangle\langle a_{n}|\} \space \space \space?$$

where $\rho=|\psi_{1}\rangle\langle \psi_{1}|P_{1}+|\psi_{2}\rangle\langle \psi_{2}|P_{2}$ is the density operator

and $P(a_{n})=|\langle a_{n}|\psi_{1}\rangle|^{2}P_{1}+|\langle a_{n}|\psi_{2}\rangle|^{2}P_{2}$

Write down

$$\rho = p_1|\psi_1\rangle\langle\psi_1| + p_2|\psi_2\rangle\langle\psi_2|$$

Then re-write the definition for $p(a_n)$ as

$$p(a_n) = p_1\langle a_n|\psi_1\rangle\langle\psi_1|a_n\rangle + p_2\langle a_n|\psi_2\rangle\langle\psi_2|a_n\rangle$$

which, by the property of the trace ($\langle\psi|M|\psi\rangle = Tr[M|\psi\rangle\langle\psi|]$) equals to

$$p(a_n) = p_1Tr[|\psi_1\rangle\langle\psi_1|a_n\rangle\langle a_n|] + p_2Tr[|\psi_2\rangle\langle\psi_2|a_n\rangle\langle a_n|]$$

By linearity of the trace, you then get:

$$p(a_n) = Tr[p_1|\psi_1\rangle\langle\psi_1|a_n\rangle\langle a_n| + p_2|\psi_2\rangle\langle\psi_2|a_n\rangle\langle a_n|] = Tr[(p_1|\psi_1\rangle\langle\psi_1| + p_2|\psi_2\rangle\langle\psi_2|)|a_n\rangle\langle a_n|] = Tr[\rho|a_n\rangle\langle a_n|]$$
q.e.d.