  The study of diatomic molecules plays a central role in the understanding of
the chemical bond. For their simplicity, they serve as a model for the study of
more complex molecular systems. In this article, we solve the rovibrational
Schr\"odinger equation for diatomic molecules using the Kratzer oscillator, by
means of so(2,1) Lie algebra. The energies and bound states for this simple
model are obtained through a canonical transformation of the molecular
Hamiltonian. The main contribution of the Lie-algebraic approach is that this
allows us to reduce the degree of Schr\"odinger equation, obtaining a
first-order differential equation whose resolution is considerably simpler than
the original one. Additionally, we give the physical insight of the symmetry
transformation of the SO(2,1) Lie group and show the relationship between this
group and its associated Lie algebra. Finally, as an illustrative example, we
calculated the selection rules for the vibrational quantum number by the use of
transformation rules of SO(2,1) Lie group.
