Hierarchy seems to pervade complexity in both living and artificial systems. Despite its relevance, no general theory that captures all features of hierarchy and its origins has been proposed yet. Here we present a formal approach resulting from the convergence of theoretical morphology and network theory that allows constructing a 3D morphospace of hierarchies and hence comparing the hierarchical organization of ecological, cellular, technological, and social networks. Embedded within large voids in the morphospace of all possible hierarchies, four major groups are identified. Two of them match the expected from random networks with similar connectivity, thus suggesting that nonadaptive factors are at work. Ecological and gene networks define the other two, indicating that their topological order is the result of functional constraints. These results are consistent with an exploration of the morphospace, using in silico evolved networks. modularity | evolution F ifty years ago (1), Herbert Simon defined complex systems as nested hierarchical networks of components organized as interconnected modules. Hierarchy seems a pervasive feature of the organization of natural and artificial systems (2, 3). The examples span from social interactions (4, 5), urban growth (6, 7), and allometric scaling (8) to cell function (9-13), development (14), ecosystem flows (15, 16), river networks (17), brain organization (18), and macroevolution (19,20). It also seems to pervade a coherent form of organization that allows reducing the costs associated to reliable information transmission (21) and to support efficient genetic and metabolic control in cellular networks (22). However, hierarchy is a polysemous word, involving order, levels, inclusion, or control as possible descriptors (23), none of which captures either its complexity or the problem of its measure and origins. Although previous work using complex networks theory has quantitatively tackled the problem (4, 24-34), some questions remain: Is hierarchy a widespread feature of complex systems organization? What types of hierarchies do exist? Are hierarchies the result of selection pressures or, conversely, do they arise as a by-product of structural constraints?A well-established concept where such questions are addressed involves the use of a morphospace (35-40), namely a phenotype space where a small set of quantitative traits can be defined as the axes. Here we take a step in this direction by combining morphospace and network theories, taking the intuitive idea of hierarchy as the starting point: a pattern of relations where there is no ambiguity in who controls whom with a pyramidal structure in which the few control the many. Formally, the picture of hierarchy matches a tree of relations (41), ideally represented by a directed graph. As shown in Fig. 1 A-D, the elements of the system are represented by nodes connected by arrows establishing the map of relations of who affects whom. Accordingly, a measure of hierarchy should account for the deviations from this ideal ...