# Show that the trace of squared density matrix gives ${\rm tr}(\rho^2)=\frac12(1+\|\mathbf n\|^2)$ [duplicate]

Equation 7.7 is given below: $$\hat\rho = \frac12(I +n_x(\hat X)+n_y(\hat Y)+n_z(\hat Z))$$

Where $$I$$ is the identity matrix and $$\hat X,\hat Y,\hat Z$$ are Pauli matrices.

Now my attempt of this was to first square every term inside the bracket to get $$\hat\rho^2$$ When doing this, all Pauli matrices then convert into identity matrices. So if you were to add all terms together you would get a 2x2 matrix: $$\begin{bmatrix}4&0\\0&4\end{bmatrix}$$ But I'm unsure of how the matrices will cancel out to give the final result?

• I'm not quite sure why you are only squaring every term in the bracket. For example, $(A+B)^2 = (A+B)(A+B) = AA + AB + BA + BB$. Commented Nov 16, 2021 at 14:06
• Have you squared the $1/2$ out front? Commented Nov 16, 2021 at 14:51

\begin{align} \hat\rho^2 &= \left[\frac12\left(I +n_x\hat X+n_y\hat Y+n_z\hat Z\right)\right]^2 \\ &= \frac14\left[(1 + n_x^2 + n_y^2 + n_z^2)I + 2n_x\hat X + 2n_y\hat Y + 2n_z\hat Z\right] \end{align}
\begin{align} \mathrm{tr}\hat\rho^2 &= \mathrm{tr}\left[\frac14(1 + n_x^2 + n_y^2 + n_z^2)I + 2n_x\hat X + 2n_y\hat Y + 2n_z\hat Z\right] \\ &= \frac12(1 + n_x^2 + n_y^2 + n_z^2) \\ &= \frac12(1 + \|\textbf{n}\|^2) \end{align}