My understanding of roots in Lie algebra theory is as follows: given a Cartan subalgebra $\mathfrak{h}\subset\mathfrak{g}$ with basis $\{H_i\}_{i=1}^{r}$, and root vectors $\{X_\alpha\}_\alpha$, the roots $\alpha$ are $r$-dimensional vectors in Euclidean space such that
$$ [H_i, X_\alpha] = \alpha_i X_\alpha \quad \forall 1\leq i \leq r.$$
I am currently reading Bryan Hall's Lie Groups, Lie Algebras, and Representation Theory, and here, roots $\alpha$ are defined as linear functionals such that, for all $H \in \mathfrak{h}$ $$[H, X_\alpha] = \langle \alpha, H\rangle X_\alpha.$$ This makes sense to me, as, if one writes $$H = \sum_{i=1}^{r} \lambda_i H_i,$$ then presumably this linear functional is defined as $$ \langle \alpha, H\rangle = \sum_{i=1}^{r} \lambda_i \langle \alpha, H_i\rangle = \sum_{i=1}^{r} \lambda_i \alpha_i.$$ My confusion is: throughout the text, the roots are specified as elements of the Cartan subalgebra $\mathfrak{h}$. I don't understand how this is the case. At best, I could see that the roots are actually elements of the dual of the Cartan subalgebra, since they are linear functionals acting on $\mathfrak{h}$. Could someone clarify what is meant when they say that roots $\alpha$ are elements of $\mathfrak{h}$, and, given a root, how do I express the root as a linear combination of the basis elements of $\mathfrak{h}$?