$\newcommand\bra[1]{\left\langle#1\right|}\newcommand\ket[1]{\left|#1\right\rangle} $ I am having a little bit of difficulty with part (4) of Exercises 2.72 from Nielsen and Chuang's "Quantum Computation and Quantum Information".
It asks us to show that "for pure states the description of the Bloch vector we have given ($\rho=\frac{I + r.\sigma}{2}$ ) coincides with that in section 1.2 (($\ket{\psi} = \cos(\frac{\theta}{2})\ket{0} + e^{i \phi} \sin(\frac{\theta}{2}) \ket{1}$, for $\ket{\psi}$ is on the surface of the Bloch sphere))
I have found that $\rho = \cos^{2}(\frac{\theta}{2}) \ket{0} \bra{0} + \frac{e^{-i \phi}\sin(\theta)}{2}\ket{0}\bra{1} + \frac{ e^{i \phi} \sin{\theta} }{2} \ket{1} \bra{0} + \sin^{2}(\frac{\theta}{2}) \ket{1} \bra{1}$
This is where I am stuck. A couple of the solutions online have said that
$\rho = \frac{I + r. \sigma}{2}$ can be expressed (in the computational basis) as: $$ \rho = \frac{1 + r_{z}}{2} \ket{0} \bra{0} + \frac{r_{x} - i r_{y}}{2} \ket{0} \bra{1} + \frac{r_{x} + i r_{y}}{2} \ket{1} \bra{0} + \frac{1 - r_{z}}{2} \ket{1} \bra{1}$$ I really don't understand how we get the above representation?
(Note that here $r$ is a three dimensional vector whose norm is less than or equal to $1$)