This study investigates the structure of social hierarchies. We hypothesized that if social dominance relations serve to regulate conflicts over resources, then hierarchies should converge towards pyramidal shapes. Structural analyses and simulations confirmed this hypothesis, revealing a triadic-pyramidal motif across human and non-human hierarchies (114 species). Phylogenetic analyses showed that this pyramidal motif is widespread, with little influence of group size or phylogeny. Furthermore, nine experiments conducted in France found that human adults (N = 120) and infants (N = 120) draw inferences about dominance relations that are consistent with hierarchies’ pyramidal motif. By contrast, human participants do not draw equivalent inferences based on a tree-shaped pattern with a similar complexity to pyramids. In short, social hierarchies exhibit a pyramidal motif across a wide range of species and environments. From infancy, humans exploit this regularity to draw systematic inferences about unobserved dominance relations, using processes akin to formal reasoning.