Find $2\times2$ matrices such that $CD=-DC$, with CD different from $0$ Lets suppose matrices 
$$
    \begin{bmatrix}
     a & b\\
     c & d\\   
    \end{bmatrix}
$$
and
$$
    \begin{bmatrix}
    e & f\\
    g & h\\
    \end{bmatrix}
$$
Assuming the first matrix is $C$ and the second one is $D$, replacing them in $CD=-DC$ we arrive at the following set of equations:
$ea+bg=-ea-fc$
$ec+dg=-ga-hc$
$af+bh=-eb-fd$
$cf+dh=-gb-hd$
Is there a way to find general solutions to the set of equations?
 A: The best way is to use the so called elementary matrices. Let's say you have a matrix $A$, to make it easier let's assume it is really of size 2x2 like you need. It is a known fact that multiplying its first row by a scalar $\lambda$ is equivalent to multiplying $A$ by the matrix $P=\begin{pmatrix}\lambda&0\\0&1\end{pmatrix}$ on the left side. (which means $PA$ is the product that you get). In the same way multiplying the first column of $A$ by $\lambda$ is equivalent to multiplying $A$ by the same matrix $P$ on the right side. (you get the matrix $AP$). 
So if you know that then it's easy to see that in your exercise you should take $\lambda=-1$, the matrix $D=\begin{pmatrix}-1&0\\0&1\end{pmatrix}$ and then you only have to find the matrix $C$. Take $C=\begin{pmatrix}0&1\\1&0\end{pmatrix}$. And we really get:
$DC=\begin{pmatrix}-1&0\\0&1\end{pmatrix}\begin{pmatrix}0&1\\1&0\end{pmatrix}=\begin{pmatrix}0&-1\\1&0\end{pmatrix}$
$CD=\begin{pmatrix}0&1\\1&0\end{pmatrix}\begin{pmatrix}-1&0\\0&1\end{pmatrix}=\begin{pmatrix}0&1\\-1&0\end{pmatrix}=-DC$
So as you can see the theory works. $DC$ is $C$ with the first row multiplied by $-1$, $CD$ is $C$ with the first column multiplied by $-1$. That's why it is very useful to know the properties of elementary matrices. Of course I still had to guess the matrix $C$ but it was much easier than if I had to guess both matrices from the beginning. 
A: Let $X$ be a $2$-by-$2$ matrix over a field $K$.  For the sake of simplicity, we assume that $X$ is diagonalizable with eigenvalues $a$ and $b$.  The $K$-linear map $T_X:V\to V$, where $V:=\text{Mat}_{2\times 2}(K)$, defined by
$$T_X(Y):=XY+YX\text{ for all }Y\in V$$
is diagonalizable with eigenvalues $2a,2b,a+b,a+b$ (see this thread).  
In the case that $\text{char}(K)\neq 2$, there exists a nonzero matrix $Y\in V$ such that $T_X(Y)=0$ if and only if $a=0$, $b=0$, or $a+b=0$.  From the same thread, you can see that in case $a=0$ or $b=0$, every $Y\in\ker(T_X)$ satisfies $XY=YX=0$.  Thus, there exists $Y\in V$ for which $T_X(Y)=0$ but $XY$ and $YX$ are both nonzero if and only if $a$ and $b$ are nonzero elements of $K$ such that $a+b=0$.  This is why Mark's example above has to take a matrix of the form $\begin{bmatrix}+1&0\\0&-1\end{bmatrix}$.
In fact, if $K=\mathbb{R}$ (or any field of characteristic not equal to $2$), then we may without loss of generality assume that $X=\begin{bmatrix}+1&0\\0&-1\end{bmatrix}$.  Then, $\ker(T_X)$ is spanned by
$$\begin{bmatrix}0&1\\0&0\end{bmatrix}\text{ and }\begin{bmatrix}0&0\\1&0\end{bmatrix}\,.$$
That is, any matrix $Y$ of the form
$$Y=\begin{bmatrix}0&p\\q&0\end{bmatrix}\text{ with }(p,q)\in\mathbb{R}^2\setminus\big\{(0,0)\big\}$$
satisfies $XY+YX=T_X(Y)=0$ but $XY$ and $YX$ are nonzero.

In the case $K=\mathbb{C}$, we can see why the Pauli matrices have the form
$$\sigma_x=\begin{bmatrix}0&1\\1&0\end{bmatrix}\,,\,\,\sigma_y=\begin{bmatrix}0&-\text{i}\\+\text{i}&0\end{bmatrix}\,,\text{ and }\sigma_z=\begin{bmatrix}+1&0\\0&-1\end{bmatrix}\,.$$
If we start with setting $\sigma_z$ to be $\begin{bmatrix}+1&0\\0&-1\end{bmatrix}$, then $\ker(\sigma_z)$ consists of matrices of the form
$$\mu(p,q):=\begin{bmatrix}0&p\\q&0\end{bmatrix}\text{ with }p,q\in\mathbb{C}\,.$$
If we want the matrix $\mu(p,q)$ to also have eigenvalues $+1$ and $-1$, then $pq=1$ must hold.  We can then take $\sigma_x$ in the form $\mu(1,1)=\begin{bmatrix}0&1\\1&0\end{bmatrix}$, and look at $\ker(\sigma_x)\cap \ker(\sigma_z)$ to see whether it is nontrivial.  
Since $\ker(\sigma_x)$ is spanned by
$$\begin{bmatrix}1&1\\-1&-1\end{bmatrix}\text{ and }\begin{bmatrix}1&-1\\1&-1\end{bmatrix}\,,$$
$\ker(\sigma_x)\cap\ker(\sigma_z)$ consists of matrices of the form
$$\nu(r):=\begin{bmatrix}0&-r\\+r&0\end{bmatrix}\,,\text{ where }r\in\mathbb{C}\,.$$
Thus, a matrix $\nu(r)$ has eigenvalues $+1$ and $-1$ if and only if $r^2=-1$, or equivalently, $r\in\{-\text{i},+\text{i}\}$.  With the choice $r=+\text{i}$, we obtain the matrix
$$\sigma_y=\begin{bmatrix}0&-\text{i}\\+\text{i}&0\end{bmatrix}\,.$$
