I have a dumb question:
I have proven that there is one isomorphism class for all two-dimensional non-abelian Lie algebras, with basis $\{x,y\}$ and bracket $[x,y]=x$.
and it was written in an answer that $$\{x,y\}=\left\{\begin{bmatrix}0&1\\0&0\end{bmatrix},\begin{bmatrix}1&0\\0&0\end{bmatrix}\right\}$$ gives us one of these Lie algebras.
But my problem is $[x,y]=xy-yx=-x=-[x,y]=[-x,y]$. What is happening here?
Simply that with such definitions you have $[x,y]=-x$ (so that the equality $-x=-[x,y]$ is false). You can easily find at this point an isomorphism in terms of matrices to the standard form you prefer.