# Infinities in the diagonal matrix while calculating Von Neumann entropy

Consider the example case:$$|\phi\rangle=\frac{1}{\sqrt{2}}(|01\rangle-i|10\rangle)$$ From this we can easily calculate the density matrix:$$\rho=\frac{1}{2}\begin{bmatrix}0&0&0&0\\0&1&i&0\\0&-i&1&0\\0&0&0&0\end{bmatrix}$$Now trying to calculate the von Neumann entropy I could probably say that "it is a pure state, ergo $$S(\rho)=0$$". However when calculating explicitly the von Neumann entropy $$S=-tr(\rho ln \rho)$$ having to take the natural logarithm of $$\rho$$ runs to a problem.

After calculating the eigenvalues and eigenvectors I find: $$\lambda_1=1,\lambda_2=0,\lambda_3=0,\lambda_4=0$$. These values are the diagonal elements in the well-known D in $$\rho=M D M^{-1}$$. Here $$M$$ is the modal matrix and $$D$$ the diagonal matrix looking like:$$D=diag(\lambda_1,\lambda_2,\lambda_3,\lambda_4)$$

Now taking the natural logarithm of the matrix would require me to take the natural logarithm of the elements of $$D$$. In my case thought we would have to say that three of the diagonals go towards $$-\infty$$.

How is this entropy going to end up $$0$$ then since taking the trace would require to add infinities?

• This appears equally for classical entropies. May 23 '20 at 12:06

The convention usually followed is to define $$0 \ln 0 = 0$$.
That is not so bad as it looks, you may calculate $$\lim\limits_{x \rightarrow 0} x\ln x$$. Using L'Hopital's rules, $$\begin{array}{lll}\lim\limits_{x \rightarrow 0} x \ln(x) & = & \lim\limits_{x\rightarrow 0} \frac{\ln(x)}{x^{-1}} \\ { } & = & \lim\limits_{x \rightarrow 0} \frac{x^{-1}}{-x^{-2}} \\ {} & = & \lim\limits_{x\rightarrow 0}-x \\ { } & = & 0.\end{array}$$ Noting columns of $$M$$ as the eignevectors of $$\rho$$, with $$D$$ being the diagonal matrix of corresponding eigenvalues, here you will have \begin{align} -\text{tr}\left(\rho \ln(\rho)\right) &= -\text{tr}\left(M DM^{-1} \ln \left(MDM^{-1}\right)\right)\\ & = -\text{tr}\left(MDM^{-1} M \ln (D) M^{-1}\right) \\ & = -\text{tr}\left(M D\ln\left(D\right) M^{-1}\right). \end{align}
In $$D \ln \left(D\right)$$ one shall consider $$0 \ln 0 = 0$$. Hence the entropy ends up as $$0$$.