Contact networks are heterogeneous. People with similar characteristics are more likely to interact, a phenomenon called assortative mixing or homophily. While age-assortativity is well-established and social contact matrices for populations stratified by age have been derived through extensive survey work, we lack empirical studies that describe contact patterns of a population stratified by other attributes such as gender, sexual orientation, ethnicity, etc. Accounting for heterogeneities with respect to these attributes can have a profound effect on the dynamics of epidemiological forecasting models. Here, we introduce a new methodology to expand a given e.g. age-based contact matrix to populations stratified by binary attributes with a known level of homophily. We describe a set of linear conditions any meaningful social contact matrix must satisfy and find the optimal matrix by solving a non-linear optimization problem. We show the effect homophily can have on disease dynamics and conclude by briefly describing more complicated extensions. The available Python source code enables any modeler to account for the presence of homophily with respect to binary attributes in contact patterns, ultimately yielding more accurate predictive models.