How does the expression $P=\frac12\left(1+\vec\sigma_1\cdot\vec\sigma_2\right)$ for the exchange of two spins work? According to wikipedia, the spin exchange operator can be expressed as $$P = \frac{1}{2}\big(1+\vec{\sigma}_1\cdot \vec{\sigma}_2 \big) $$
I am not sure I understand what this means. I think spin exchange should have the property
$$ \frac{1}{2}\big(1+\vec{\sigma}_1\cdot \vec{\sigma}_2 \big)\mid \uparrow\downarrow\rangle = \mid \downarrow\uparrow\rangle,$$
but I'm having trouble understanding how the operator $\vec{\sigma}_1\cdot \vec{\sigma}_2$ acts and how it comes to have this sort of behaviour. I'm also having trouble getting any intuition on how and why this operator has this form. Can someone explain how the given form of $P$ should act on a given, arbitrary state?
 A: This can simply be checked directly. We have
$$
\vec\sigma_1\cdot\vec\sigma_2 = \sigma_{1x}\sigma_{2x} + \sigma_{1y}\sigma_{2y} +  \sigma_{1z}\sigma_{2z},
$$
and we can use the convention
$$
\sigma_x = \begin{pmatrix}0&1\\1&0\end{pmatrix},\ 
\sigma_y = \begin{pmatrix}0&-i\\i&0\end{pmatrix},\ \text{and}\ 
\sigma_z = \begin{pmatrix}1&0\\0&-1\end{pmatrix}
$$
in the $\{\left|↑↑\right\rangle, \left|↑↓\right\rangle, \left|↓↑\right\rangle, \left|↓↓\right\rangle\}$ basis. Here
\begin{align}
\left(1+\vec\sigma_1\cdot\vec\sigma_2\right)\left|↑↑\right\rangle
& =
\left(1+\sigma_{1x}\sigma_{2x} + \sigma_{1y}\sigma_{2y} +  \sigma_{1z}\sigma_{2z}\right)\left|↑↑\right\rangle
\\& =
\left|↑↑\right\rangle+\left|↓↓\right\rangle + i^2\left|↓↓\right\rangle + \left|↑↑\right\rangle
\\& =
2\left|↑↑\right\rangle,
\end{align}
\begin{align}
\left(1+\vec\sigma_1\cdot\vec\sigma_2\right)\left|↑↓\right\rangle
& =
\left(1+\sigma_{1x}\sigma_{2x} + \sigma_{1y}\sigma_{2y} +  \sigma_{1z}\sigma_{2z}\right)\left|↑↓\right\rangle
\\& =
\left|↑↓\right\rangle+\left|↓↑\right\rangle + i(-i)\left|↓↑\right\rangle + (-1)\left|↑↓\right\rangle
\\& =
2\left|↓↑\right\rangle,
\end{align}
\begin{align}
\left(1+\vec\sigma_1\cdot\vec\sigma_2\right)\left|↓↑\right\rangle
& =
\left(1+\sigma_{1x}\sigma_{2x} + \sigma_{1y}\sigma_{2y} +  \sigma_{1z}\sigma_{2z}\right)\left|↓↑\right\rangle
\\& =
\left|↓↑\right\rangle+\left|↑↓\right\rangle + i(-i)\left|↑↓\right\rangle + (-1)\left|↓↑\right\rangle
\\& =
2\left|↑↓\right\rangle,
\quad \text{and}
\end{align}
\begin{align}
\left(1+\vec\sigma_1\cdot\vec\sigma_2\right)\left|↓↓\right\rangle
& =
\left(1+\sigma_{1x}\sigma_{2x} + \sigma_{1y}\sigma_{2y} +  \sigma_{1z}\sigma_{2z}\right)\left|↓↓\right\rangle
\\& =
\left|↓↓\right\rangle+\left|↑↑\right\rangle + (-i)^2\left|↑↑\right\rangle + (-1)^2\left|↓↓\right\rangle
\\& =
2\left|↓↓\right\rangle.
\end{align}
Since $\left(1+\vec\sigma_1\cdot\vec\sigma_2\right)$ coincides with $2P$ on a basis, they must coincide everywhere. Moreover, the calculations above should give a good flavour for how $\left(1+ \vec\sigma_1 \cdot \vec\sigma_2 \right)$ should be used on a general state.
The essence of the operator, however, can be distilled to a couple of principles that are visible in action above. In particular,


*

*$\frac12\left(1+\sigma_{1z}\sigma_{2z}\right)$ vanishes on the cross states, $\left|↑↓\right\rangle$ and $\left|↓↑\right\rangle$, because the second term simply picks up a minus, and it acts as the identity on the symmetric states $\left|↑↑\right\rangle$ and $\left|↓↓\right\rangle$ since the minus on $\left|↓↓\right\rangle$ comes twice and therefore vanishes.

*$\frac12\left(\sigma_{1x}\sigma_{2x} + \sigma_{1y}\sigma_{2y} \right)$, on the other hand, vanishes on the symmetric states, $\left|↑↑\right\rangle$ and $\left|↓↓\right\rangle$, because both operators flip both spins but they do so with opposite phase, so they cancel out. 
On the flip states, however, $\left|↑↓\right\rangle$ and $\left|↓↑\right\rangle$, both of the individual operators, $\sigma_{1x}\sigma_{2x}$ and $\sigma_{1y}\sigma_{2y}$, act much the same: they flip both spins, which is equivalent to exchange, and they do so with a flat phase from the flat off-diagonals of $\sigma_x$ or the product of the two opposite off-diagonals of $\sigma_y$, 
