Extracellular enzymes represent a public good for microbial communities, as they break down complex molecules into simple molecules that microbes can take up. These communities are vulnerable to cheating by microbes that do not produce enzymes, but benefit from those produced by others. However, extracellular enzymes are ubiquitous and play an important role in the depolymerization of nutrients. We developed a multi-genotype, multi-nutrient model of a community of exoenzyme-producing microbes, in order to investigate the relationship between diversity, social interactions, and nutrient depolymerization. We focused on coalitions between complementary types of microbes and their implications for spatial pattern formation and nutrient depolymerization. The model included polymers containing carbon, nitrogen, or phosphorus, and eight genotypes of bacteria, which produced different subsets of the three enzymes responsible for hydrolyzing these polymers. We allowed social dynamics to emerge from a mechanistic model of enzyme production, action, and diffusion. We found that diversity was maximized at high rates of either diffusion or enzyme production (but not both). Conditions favoring cheating also favored the emergence of coalitions. We characterized the spatial patterns formed by different interactions, showing that same-type cooperation leads to aggregation, but between-type cooperation leads to an interwoven, filamentous pattern. Contrary to expectations based on niche complementarity, we found that nutrient depolymerization declined with increasing diversity due to a negative competitive effect of coalitions on generalist producers, leading to less overall enzyme production. This decline in depolymerization was stronger for non-limiting nutrients in the system. This study shows that social interactions among microbes foraging for complementary resources can influence microbial diversity, microbial spatial distributions, and rates of nutrient depolymerization.