# How do I show that $R_z(\theta)=e^{-iZ\theta/2}$?

I know that an $$R_z (\theta)$$ gate is equivalent to the unitary transformation $$e^{-iZ * \theta/2}$$ but I'm not sure how we get there.

I know that for every Hermitian matrix there is a corresponding Unitary matrix as $$U = e^{iH}$$ where the eigenvalues are exponentiated and the eigenstates remain the same. But I don't see how in this case, it leads to the matrix $$\left(\begin{array}{cc}e^{-i \frac{\lambda}{2}} & 0 \\ 0 & e^{i \frac{\lambda}{2}}\end{array}\right)$$

and not: $$\left(\begin{array}{cc}e^{i} & 0 \\ 0 & e^{-i}\end{array}\right)$$

I feel like I'm missing something really obvious

$$-iZ\frac{\theta}{2} = \begin{bmatrix}-i\frac{\theta}{2} &0\\0&i\frac{\theta}{2} \end{bmatrix}$$
To get the matrix you thought you would get, you would need $$iZ=\begin{bmatrix}i&0\\0&-i\end{bmatrix}$$ which when exponeniated, would give you $$\begin{bmatrix}e^{i}&0\\0&e^{-i}\end{bmatrix}$$
I am assuming you meant to write $$\theta$$ and not $$\lambda$$ in your first matrix.