Solution (source code)

= Solution

In the spin-$z$ <orthonormal basis>, $|\uparrow\rangle=(1,0)^T$ and $|\downarrow\rangle=(0,1)^T$. The <spin angular momentum> operators are $s_i=(\hbar/2)\sigma_i$. The <Pauli matrices> obey $[\sigma_i,\sigma_j]=2i\epsilon_{ijk}\sigma_k$, so
$$
\boxed{[s_i,s_j]=i\hbar\epsilon_{ijk}s_k,\qquad \mathbf s^2=\frac{\hbar^2}{4}\sum_i\sigma_i^2=\frac{3\hbar^2}{4}I.}
$$
The second identity is the correct $s(s+1)\hbar^2$ eigenvalue for $s=1/2$. Matrix multiplication gives
$$
\boxed{s_x|\uparrow\rangle=\tfrac\hbar2|\downarrow\rangle,\quad s_x|\downarrow\rangle=\tfrac\hbar2|\uparrow\rangle,\quad s_y|\uparrow\rangle=\tfrac{i\hbar}2|\downarrow\rangle,\quad s_y|\downarrow\rangle=-\tfrac{i\hbar}2|\uparrow\rangle.}
$$
Thus $s_x$ and $s_y$ flip the spin-$z$ basis states, with different complex phases.