Dense and diverse microbial communities are found in many environments. Disentangling the social interactions between strains and species is central to understanding microbes and how they respond to perturbations. However, the study of social evolution in microbes tends to focus on single species. Here, we broaden this perspective and review evolutionary and ecological theory relevant to microbial interactions across all phylogenetic scales. Despite increased complexity, we reduce the theory to a simple null model that we call the genotypic view. This states that cooperation will occur when cells are surrounded by identical genotypes at the loci that drive interactions, with genetic identity coming from recent clonal growth or horizontal gene transfer (HGT). In contrast, because cooperation is only expected to evolve between different genotypes under restrictive ecological conditions, different genotypes will typically compete. Competition between two genotypes includes mutual harm but, importantly, also many interactions that are beneficial to one of the two genotypes, such as predation. The literature offers support for the genotypic view with relatively few examples of cooperation between genotypes. However, the study of microbial interactions is still at an early stage. We outline the logic and methods that help to better evaluate our perspective and move us toward rationally engineering microbial communities to our own advantage.