# Lie group and algebraic group with isomorphic Lie algebra

This might be very silly but I have been struggling with this for a while now...

Consider two connected linear Lie groups $G\leq GL_n(\mathbb{R})$ and $H\leq GL_m(\mathbb{R})$ with Lie algebras $\mathfrak{g} \leq \mathfrak{gl}_n(\mathbb{R})$ and $\mathfrak{h} \leq \mathfrak{gl}_m(\mathbb{R})$ respectively. Now suppose that $\mathfrak{g}$ and $\mathfrak{h}$ are isomorphic and that $G=\mathbb{G}(\mathbb{R})$ is the real point of a linear algebraic group. My question is the following: is there a linear algebraic group $\mathbb{H}$ such that $H=\mathbb{H}(\mathbb{R})$?

Edit: It has been pointed out that the statement is actually not true : $SL_2(\mathbb{R})$ and the connected component of $SO(2,1)(\mathbb{R})$ have same Lie algebra but the second one is not the $\mathbb{R}$-points of an algebraic group. Actually this connected component is semialgebraic (defined by polynomials equalities and inequalities) so I would change the question for the following: is $H$ semialgebraic?