This paper provides an analysis of the global dynamics of a class of multigroup SIR epidemic models, with varying group sizes, in terms of the so-called basic reproduction number
. The incidence susceptible-infectious between groups is formulated as bilinear, giving rise to a constant nonnegative contact matrix model, which is assumed to be irreducible. Some well-known results from the graph theory applied to the study of irreducible nonnegative matrices, allow to construct a suitable Lyapunov function. As a consequence, the following result is established: If
, then the disease-free equilibrium is globally asymptotically stable. If
, then there exists a unique endemic equilibrium which is globally asymptotically stable in the interior of the feasible region.