Why is the following subgroup of $\mathrm{GL}(2,\mathbb{R})$
$$\left\lbrace \begin{pmatrix} a & b \\ 0 & 1\end{pmatrix} : a\in\mathbb{R}\setminus\lbrace{0}\rbrace, b\in\mathbb{R} \right\rbrace$$
is closed and its Lie algebra is
$$\mathrm{span}\left\lbrace \begin{pmatrix} 1 & 0 \\ 0 & 0\end{pmatrix} , \begin{pmatrix} 0 & 1 \\ 0 & 0\end{pmatrix} \right\rbrace?$$
$C=\left\lbrace \begin{pmatrix} a & b \\ 0 & 1\end{pmatrix} : a,b\in\mathbb{R} \right\rbrace$ is a closed subspace of the space of square matrices $M(2,\mathbb{R})$, to see this, consider the map defined by $f(\pmatrix{a&b\cr c&d})=(c,d)$, it is continuous and $f^{-1}(0,1)=C$. This implies that $G=C\cap Gl(2,\mathbb{R})$ is closed.
Remark that the dimesion of $G$ is $2$ since $f$ is a submersion, this implies that the dimension of the Lie algebra of $G$ is $2$, $exp(\pmatrix{t&0\cr 0&0})=\pmatrix{e^t&0\cr 0&1}$ and $exp(\pmatrix{0&t\cr 0&0})=\pmatrix{1&t\cr 0&1}$ are elements of $G$.