Solution (source code)

= Solution

The matrix is invertible precisely when $a\ne0$, and
$$
\begin{pmatrix}a&b\\0&1\end{pmatrix}^{-1}
=\begin{pmatrix}a^{-1}&-a^{-1}b\\0&1\end{pmatrix}.
$$
The largest group is therefore
$$
G=\left\{\begin{pmatrix}a&b\\0&1\end{pmatrix}:a\in\mathbb R^*,\ b\in\mathbb R\right\},
$$
the <real affine group> $\mathbb R\rtimes\mathbb R^*$ under $(a,b)(a',b')=(aa',b+ab')$.