ideal class groups (or, rather, what were effectively ideal class groups) were studied some time before the idea of an ideal was formulated. these groups appeared in the theory of quadratic forms: in the case of binary integral quadratic forms, as put into something like a final form by gauss, a composition law was defined on certain equivalence classes of forms. this gave a finite abelian group, as was recognised at the time.