Classsifying 1- and 2- dimensional Algebras, up to Isomorphism
Solution 1:
I found myself working on this same problem (for homework), and I think I've written a fairly detailed solution. So I will post it here, in case it is helpful to anyone else.
Let $\mathfrak{g}$ be a 1-dimensional Lie algebra, and let $\{E_1\}$ be a basis for $\mathfrak{g}$. Then for any two vector fields $X,Y\in\mathfrak{g}$, we have $X=aE_1$ and $Y=bE_1$, for some $a,b\in\mathbb{R}$. Thus, $$[X,Y]=[aE_1,bE_1]=ab[E_1,E_1]=0$$ for all $X,Y\in\mathfrak{g}$. Therefore, the only 1-dimensional Lie algebra is the trivial one. The map $$\varphi:\mathfrak{g}\rightarrow\mathfrak{gl}(2,\mathbb{R})$$ $$\varphi:aE_1\mapsto \left(\begin{array}{ll} a&0\\ 0&0 \end{array}\right)$$ is a Lie algebra homomorphism, since $$\varphi([aE_1,bE_1])=\varphi(0)=\left(\begin{array}{ll} 0&0\\ 0&0 \end{array}\right)\mbox{, and}$$ $$[\varphi(aE_1),\varphi(bE_1)]=\left(\begin{array}{ll} a&0\\ 0&0 \end{array}\right)\left(\begin{array}{ll} b&0\\ 0&0 \end{array}\right)-\left(\begin{array}{ll} b&0\\ 0&0 \end{array}\right)\left(\begin{array}{ll} a&0\\ 0&0 \end{array}\right)$$ $$=\left(\begin{array}{ll} 0&0\\ 0&0 \end{array}\right).$$ Thus, $\mathfrak{g}$ is isomorphic to the (abelian) Lie subalgebra $$\varphi(\mathfrak{g})=\left\{\left(\begin{array}{ll} a&0\\ 0&0 \end{array}\right)\in\mathfrak{gl}(2,\mathbb{R}):a\in\mathbb{R}\right\}\subset\mathfrak{gl}(2,\mathbb{R}).$$
Now let $\mathfrak{h}$ be a 2-dimensional Lie algebra, and let $\{E_1,E_2\}$ be a basis for $\mathfrak{h}$. Then for any two vector fields $X,Y\in\mathfrak{h}$, we have $X=aE_1+bE_2$ and $Y=cE_1+dE_2$, for some $a,b,c,d\in\mathbb{R}$. Thus, $$\begin{array}{ll} [X,Y]&=[aE_1+bE_2,cE_1+dE_2]\\ &=a[E_1,cE_1+dE_2]+b[E_2,cE_1+dE_2]\\ &=ac[E_1,E_1]+ad[E_1,E_2]+bc[E_2,E_1]+bd[E_2,E_2]\\ &=(ad-bc)[E_1,E_2]. \end{array}$$
If $[E_1,E_2]=0$, then we have the trivial 2-dimensional Lie algebra. The map $$\varphi:\mathfrak{h}\rightarrow\mathfrak{gl}(2,\mathbb{R})$$ $$\varphi:aE_1+bE_2\mapsto \left(\begin{array}{ll} a&0\\ 0&b \end{array}\right)$$ is a Lie algebra homomorphism, since $$\varphi([aE_1+bE_2,cE_1+dE_2])=\varphi(0)=\left(\begin{array}{ll} 0&0\\ 0&0 \end{array}\right)\mbox{, and}$$
$$[\varphi(aE_1+bE_2),\varphi(cE_1+dE_2)]=\left(\begin{array}{ll} a&0\\ 0&b \end{array}\right)\left(\begin{array}{ll} c&0\\ 0&d \end{array}\right)-\left(\begin{array}{ll} c&0\\ 0&d \end{array}\right)\left(\begin{array}{ll} a&0\\ 0&b \end{array}\right)$$ $$=\left(\begin{array}{ll} 0&0\\ 0&0 \end{array}\right).$$Furthermore, this map is faithful (injective). Thus, $\mathfrak{h}$ is isomorphic to the (abelian) Lie subalgebra $$\varphi(\mathfrak{h})=\left\{\left(\begin{array}{ll} a&0\\ 0&b \end{array}\right)\in\mathfrak{gl}(2,\mathbb{R}):a,b\in\mathbb{R}\right\}\subset\mathfrak{gl}(2,\mathbb{R}).$$
If $[E_1,E_2]\neq0$, then set $E_3=[E_1,E_2]$. Then for all $X,Y\in\mathfrak{h}$ we have $[X,Y]=\lambda E_3$ for some $\lambda\in\mathbb{R}$. In particular, for any $E_4\in\mathfrak{g}$ such that $E_4$ and $E_3$ are linearly independent, we have $[E_4,E_3]=\lambda_0 E_3$. Replacing $E_4$ with $1/\lambda_0 E_4$, we now have a basis $\{E_4, E_3\}$ for $\mathfrak{g}$ such that $[E_4, E_3]=E_3$. The map $$\varphi:\mathfrak{h}\rightarrow\mathfrak{gl}(2,\mathbb{R})$$ $$\varphi:aE_4+bE_3\mapsto \left(\begin{array}{ll} a&b\\ 0&0 \end{array}\right)$$ is a Lie algebra homomorphism, since $$\varphi([aE_4+bE_3,cE_4+dE_3])=\varphi((ad-bc)E_3)=\left(\begin{array}{ll} 0&ad-bc\\ 0&0 \end{array}\right)\mbox{, and}$$
$$[\varphi(aE_4+bE_3),\varphi(cE_4+dE_3)]=\left(\begin{array}{ll} a&b\\ 0&0 \end{array}\right)\left(\begin{array}{ll} c&d\\ 0&0 \end{array}\right)-\left(\begin{array}{ll} c&d\\ 0&0 \end{array}\right)\left(\begin{array}{ll} a&b\\ 0&0 \end{array}\right)$$ $$=\left(\begin{array}{ll} 0&ad-bc\\ 0&0 \end{array}\right).$$Furthermore, this map is faithful (injective). Thus, $\mathfrak{h}$ is isomorphic to the (non-abelian) Lie subalgebra $$\varphi(\mathfrak{h})=\left\{\left(\begin{array}{ll} a&b\\ 0&0 \end{array}\right)\in\mathfrak{gl}(2,\mathbb{R}):a,b\in\mathbb{R}\right\}\subset\mathfrak{gl}(2,\mathbb{R}).$$
Solution 2:
Although you've tagged your question "differential-geometry", it's actually a pure algebra question. While you're right that for Lie algebras over (e.g.) $\mathbb{R}$ there is a deep relationship with Lie groups which motivates their study and can be helpful for proving "purely algebraic theorems", it seems to me that juggling between Lie groups and Lie algebras is distracting you from the issues at hand.
One more comment on your Lie-theoretic approach: there is indeed a bijection between connected, simply connected real Lie groups and finite-dimensional real Lie algebras, but the group structure on the Lie group side cannot be ignored. It is not enough just to classify manifolds which admit a Lie group structure, since the same manifold may admit a Lie group structure in multiple different ways. An especially relevant example is that any nilpotent Lie group -- i.e., a Lie group with associated Lie algebra a nilpotent Lie algebra -- is as a manifold isomorphic to $\mathbb{R}^n$, but the group law need not be commutative.
Coming back to the classification of Lie algebras of small dimension:
You have actually already done the one-dimensional case, as you have observed that the Lie bracket on any one-dimensional Lie algebra must be trivial. Thus any two one-dimensional Lie algebras are isomorphic: any vector space isomorphism will do.
In two dimensions there is again the Lie algebra $L_1$ with trivial bracket, but there is also a noncommutative Lie algebra $L_2$. Concretely, if we take a basis of $x,y$ of $\mathbb{R}^2$ and define $[x,x] = [y,y] = 0$ and $[x,y] = -[y,x] = y$ then this works to give a Lie algebra. (Check this!) Now the same construction can be done in many other ways, but they are all isomorphic to this one: start by assuming that $[x,y] = ax + by$ with $a$ and $b$ not both zero and then find a new basis $X$, $Y$ under which the bracket is again $[X,Y] = Y$. Thus there are exactly two Lie algebras of dimension $2$ over $\mathbb{R}$. In both cases, the corresponding Lie groups are isomorphic as manifolds to $\mathbb{R}^2$ (there are many ways to see this, magic words being exponential map and Baker-Campbell-Hausdorff formula; you'll probably learn them later on), but one of the group structures is the usual one on $\mathbb{R}^2$ and the other is a non-commutative group structure.
Note by the way that the situation is much different starting in dimension three: there are then infinitely many isomorphism classes of Lie algebras, and indeed continuous families of Lie algebras. See for instance Section 4 of this paper which constructs, over an arbitrary field $F$, for each $a \in F$ a Lie algebra $L_a^3$ such that for $a,b \in F$, $L_a^3 \cong L_b^3 \iff a = b$. Thus Lie algebras "vary in moduli" starting in dimension three.