# Why is a density operator defined the way it's defined?

It's stated that the density operator is:

$$\displaystyle \rho =\sum _{j}p_{j}|\psi _{j}\rangle \langle \psi _{j}|.$$

But I don't understand why this is the way both in mixed state and pure state. What is the significance of each component in the density matrix besides the trace? And how different a pure state representation than the way a mixed one is represented in the operator?

Let's say we have a quantum state $$|\psi\rangle$$. What is it we can actually find out about that state? Everything is the result of measurements. Each measurement result corresponds to a measurement operator $$P$$, and that outcome is given with probability $$\langle\psi|P|\psi\rangle$$. Essentially, those probabilities are everything we can access.
Now, note that we can rearrange that calculation $$\langle\psi|P|\psi\rangle=\text{Tr}(P|\psi\rangle\langle\psi|),$$ so if we do the calculation in that way, we see that it's sufficient to always work with $$|\psi\rangle\langle\psi|$$. Although this is a matrix, it actually contains less information than the state vector because both $$|\psi\rangle$$ and $$e^{i\phi}|\psi\rangle$$ give the same density matrices. In fact, that's important - that's telling you that global phases have no observable consequences.
Moving on, let's say that we're given a quantum state, and we're promised that either it's state $$|\psi_1\rangle$$ with probability $$p_1$$, or $$|\psi_2\rangle$$ with probability $$p_2$$ (we say it's one of an ensemble). Now what's the probability of getting the measurement outcome corresponding to $$P$$? With probability $$p_1$$ it's $$\text{Tr}(P|\psi_1\rangle\langle\psi_1|)$$ and with probability $$p_2$$ it's $$\text{Tr}(P|\psi_2\rangle\langle\psi_2|)$$. Hence, overall, the calculation is $$p_1\text{Tr}(P|\psi_1\rangle\langle\psi_1|)+p_2\text{Tr}(P|\psi_2\rangle\langle\psi_2|)=\text{Tr}(P(p_1|\psi_1\rangle\langle\psi_1|+p_2|\psi_2\rangle\langle\psi_2|))$$ So, the great thing is that if we group together $$\rho=p_1|\psi_1\rangle\langle\psi_1|+p_2|\psi_2\rangle\langle\psi_2|,$$ we just have to calculate $$\text{Tr}(P\rho)$$. This is true for any measurement, and the $$\rho$$ is independent of which measurement is being done, so that's the natural quantity to use. You could do the full calculation with an ensemble, but for large ensembles that's just creating extra work because the matrix $$\rho$$ has much less information (which you can see by the fact that many different ensembles give the same density matrix), and is therefore much less work to manipulate.