The paper describes the development and analysis of a mathematical model of the spread and demographic impact of HIV in heterosexual communities in developing countries. The model extends previous work in this area by the representation of patterns of mixing between and within different age and sexual activity classes in a two sex structure. Summary parameters are derived to represent different mixing patterns, ranging from assortative via random to disassortative, as are methods to ensure that particular mixing patterns between different age and sexual classes (stratified on the basis of rates of sexual partner change) meet constraints that balance the supply and demand for sexual partners as AIDS induced mortality influences the demographic structure of a population. Analyses of model behaviour rely on numerical methods due to the complexity of the mathematical framework, and sensitivity analyses are conducted to assess the significance of different assumptions and different parameter assignments. Simulated patterns of HIV spread across the two sexes and various age classes are compared with observed patterns in Uganda. The principle conclusion of the study is that the pattern of mixing between age and sexual activity classes, combined with the assumptions made to balance supply and demand between the sexes have a very major influence on the predicted pattern of HIV spread and the demographic impact of AIDS. The paper ends with a discussion of future needs in model development and data acquisition.