  We completely determine the structure constants between real root vectors in
a rank 2 Kac--Moody algebra $\mathfrak{g}$. Our description is computationally
efficient, even in the rank 2 hyperbolic case where the coefficients of roots
on the root lattice grow exponentially with height. Our approach is to extend
Carter's method of finding structure constants from those on extraspecial pairs
to the rank 2 Kac--Moody case. We also determine all commutator relations
involving only real root vectors in all rank 2 Kac-Moody algebras. The
generalized Cartan matrix of $\mathfrak{g}$ is of the form $H(a,b)=
\left(\begin{smallmatrix} ~2 & -b\\ -a & ~2 \end{smallmatrix}\right)$ where
$a,b\in\mathbb{Z}$ and $ab\geq 4$. If $ab=4$, then $\mathfrak{g}$ is of affine
type. If $ab>4$, then $\mathfrak{g}$ is of hyperbolic type. Explicit knowledge
of the root strings is needed, as well as a characterization of the pairs of
real roots whose sums are real. We prove that if $a$ and $b$ are both greater
than one, then no sum of real roots can be a real root. We determine the root
strings between real roots $\beta,\gamma$ in $H(a,1)$, $a\geq 5$ and we
determine the sets $(\mathbb{Z}_{\geq 0}\alpha+\mathbb{Z}_{\geq
0}\beta)\cap\Delta^{\text{re}}(H(a,b))$. One of our tools is a characterization
of the root subsystems generated by a subset of roots. We classify these
subsystems in rank 2 Kac--Moody root systems. We prove that every rank two
infinite root system contains an infinite family of non-isomorphic symmetric
rank 2 hyperbolic root subsystems $H(k,k)$ for certain $k\geq 3$, generated by
either two short or two long simple roots. We also prove that a non-symmetric
hyperbolic root systems $H(a,b)$ with $a\ne b$ and $ab>5$ also contains an
infinite family of non-isomorphic non-symmetric rank 2 hyperbolic root
subsystems $H(a\ell,b\ell)$, for certain positive integers $\ell$.
