Let's say I have a density matrix of the following form:
$$ \rho := \frac{1}{2} (|a \rangle \langle a| + |b \rangle \langle b|), $$ where $|a\rangle$ and $|b\rangle$ are quantum states. I saw that the eigenvalues of this matrix are: $$ \frac{1}{2} \pm \frac{|\langle a | b \rangle|}{2}. $$ I was just wondering how this is derived. It seems logical, i.e if $|\langle a | b \rangle| = 1$ then the eigenvalues are $0$ and $1$, otherwise if $|\langle a | b \rangle| = 0$ then they are half and half. This means that the entropy of the system would either be $0$ or $1$. But I was just wondering how to calculate the eigenvalues from $\rho$.