I want to find all nilpotent $2\times 2$ matrices.
All nilpotent $2 \times 2$ matrices are similar($A=P^{-1}JP$) to $J = \begin{bmatrix} 0&1\\0&0\end{bmatrix}$
But how do I find all of these matrices?
I do think that the only such cases are $J$ and $J^ T$
My mistake... in my comment above, I should not have said to solve the equations.
Rather: if you pick an arbitrary $P$, and compute $P^{-1} J P$, you get a nilpotent matrix. Using
$$ P = \begin{bmatrix} a & b \\ c & d\end{bmatrix} $$ but writing $P J P^{-1}$, I got $$ PJP^{-1} = D \cdot \begin{bmatrix} -ac & a^2 \\ -c^2 & ac\end{bmatrix} $$ where $D$ is the determinant $(ad - bc)$.
Such matrices (for $a \ne 0$) have the general form
$$ A = \begin{bmatrix} -S & T \\ -\frac{S^2}{T} & S\end{bmatrix}. $$ and this is a "parameterization" (with parameters $S$ and $T$) of almost all possible nilpotent matrices. We also need to add in the $a = 0$ case, i.e. $$ A = \begin{bmatrix} 0 & 0 \\ c & 0\end{bmatrix}. $$
Note that in this parameterization, it's essential that $T \ne 0$. Because of this, you can say that up to scalar multiples, all nilpotent matrices have the form $$ A = \begin{bmatrix} -S & 1 \\ -S^2 & S\end{bmatrix}. $$ or $$ A = \begin{bmatrix} 0 & 0 \\ 1 & 0\end{bmatrix}. $$