Transformation of Pauli matrices Given $\vec{r'}.\vec{\sigma}=\hat{U}(\vec{r}.\vec{\sigma})\hat{U}^{-1}$ where $\vec{r'}=(x',y',z'),\vec{r}= (x,y,z),\vec{\sigma}=(\sigma_x,\sigma_y,\sigma_z)$, ($\sigma_k$ the Pauli matrices) and $\hat{U}=\exp{(i\theta \sigma_z/2)}, \quad \theta$ being a constant. How can I calculate $\vec{r'}$ in terms of $\vec{\sigma}$ and $\vec{r}$? I used anti-commutation relations between the Pauli matrices, but did not get the answer.
 A: One way is to use that fact that $\vec r'\cdot\vec\sigma = \hat{U}(\vec{r}\cdot\vec{\sigma})\hat{U}^{-1}$ will be
$$\left(\begin{matrix} z' & x'-iy' \\ x'+iy' & -z' \end{matrix}\right)$$
From this it's easy to identify $x,y,z$.
Another, more algebraic way, is to use that $\sigma_i \sigma_j + \sigma_j \sigma_i = 2 \delta_{ij}$:
$$(x \sigma_x + y \sigma_y + z \sigma_z) \sigma_x + \sigma_x (x \sigma_x + y \sigma_y + z \sigma_z) \\
= x(\sigma_x \sigma_x + \sigma_x \sigma_x) + y (\sigma_y \sigma_x + \sigma_x \sigma_y) + z (\sigma_z \sigma_x + \sigma_x \sigma_z) \\
= x \cdot 2 + y \cdot 0 + z \cdot 0 = 2x$$
Thus, generally,
$$x_i = (\vec r \cdot \vec\sigma) \sigma_i + \sigma_i (\vec r \cdot \vec\sigma)$$
A: Calculation of $\hat U (\vec r \cdot \vec \sigma) \hat U^{-1}$
First we note the following formulas: 
$$\begin{align}
\hat U & = \exp(i\theta\sigma_z/2) & = \cos(\theta/2) \mathbf 1 + i \, \sin(\theta/2) \sigma_z \\
\hat U^{-1} & = \exp(-i\theta\sigma_z/2) & = \cos(\theta/2) \mathbf 1 - i \, \sin(\theta/2) \sigma_z
\end{align}
$$
$$
\sigma_x \sigma_z = -i \sigma_y = - \sigma_z \sigma_x, \quad
\sigma_y \sigma_z = +i \sigma_x = - \sigma_z \sigma_y, \quad
\sigma_z \sigma_z = \mathbf 1$$
$$
\sigma_z \sigma_x \sigma_z = -\sigma_x, \quad
\sigma_z \sigma_y \sigma_z = -\sigma_y, \quad
\sigma_z \sigma_z \sigma_z = +\sigma_z, \quad
$$
Now,
$$
\hat U (\vec r \cdot \sigma) \hat U^{-1}
= \hat U (x \sigma_x + y \sigma_y + z \sigma_z) \hat U^{-1}
= x (\hat U \sigma_x \hat U^{-1}) + y (\hat U \sigma_y \hat U^{-1}) + z (\hat U \sigma_z \hat U^{-1})
$$
Here,
$$
\hat U \sigma_x \hat U^{-1} 
= (\cos(\theta/2) \mathbf 1 + i \, \sin(\theta/2) \sigma_z) \, \sigma_x \,  (\cos(\theta/2) \mathbf 1 - i \, \sin(\theta/2) \sigma_z) \\
= \cos^2(\theta/2) \mathbf 1 \sigma_x \mathbf 1
+ i \, \sin(\theta/2) \cos(\theta/2) (\sigma_z \sigma_x \mathbf 1 - \mathbf 1 \sigma_x \sigma_z)
- i^2 \, \sin^2(\theta/2) (\sigma_z \sigma_x \sigma_z) \\
= \cos^2(\theta/2) \sigma_x
+ i \, \sin(\theta/2) \cos(\theta/2) (i \, 2 \sigma_y)
+ \sin^2(\theta/2) (- \sigma_x) \\
= (\cos^2(\theta/2) - \sin^2(\theta/2)) \sigma_x
+ i \, 2 \sin(\theta/2) \cos(\theta/2) (i \sigma_y) \\
= \cos(\theta) \sigma_x
- \, \sin(\theta) \sigma_y
$$
Likewise
$$
\hat U \sigma_y \hat U^{-1} 
= \cos(\theta) \sigma_y
+ \sin(\theta) \sigma_x
$$
but since $\hat U = \exp(i\theta\sigma_z/2)$ so $\hat U$ and $\sigma_z$ commute,
$$
\hat U \sigma_z \hat U^{-1} 
= \sigma_z \hat U \hat U^{-1} 
= \sigma_z
$$
Thus,
$$
\hat U (\vec r \cdot \sigma) \hat U^{-1} 
= x (\cos(\theta) \sigma_x - \, \sin(\theta) \sigma_y)
+ y (\cos(\theta) \sigma_y + \sin(\theta) \sigma_x)
+ z \sigma_z \\
= (x \cos(\theta) + y \sin(\theta)) \sigma_x
+ (y \cos(\theta) - x \sin(\theta)) \sigma_y
+ z \sigma_z
$$
i.e.
$$
\left(\begin{matrix} x' \\ y' \\ z' \end{matrix}\right)
= \left(\begin{matrix}
 \cos(\theta) & \sin(\theta) & 0 \\
-\sin(\theta) & \cos(\theta) & 0 \\
0 & 0 & 1
\end{matrix}\right)
\left(\begin{matrix} x \\ y \\ z \end{matrix}\right)
$$
