Geometry of ecological coexistence and niche differentiation

A fundamental problem in ecology is to understand how competition shapes biodiversity and species coexistence. Historically, one important approach for addressing this question has been to analyze consumer resource models using geometric arguments. This has led to broadly applicable principles such as Tilman’s R* and species coexistence cones. Here, we extend these arguments by constructing a novel geometric framework for understanding species coexistence based on convex polytopes in the space of consumer preferences. We show how the geometry of consumer preferences can be used to predict species which may coexist and enumerate ecologically-stable steady states and transitions between them. Collectively, these results provide a framework for understanding the role of species traits within niche theory.


I. INTRODUCTION
One of the most striking features of natural ecosystems is the immense diversity of flora and fauna they support.Understanding the origin of this diversity is a fundamental question in ecology.A single ecosystem can contain thousands of species, all living in close proximity and interacting with each other and the abiotic environment.For this reason, theoretical models have played a major role in guiding empirical research, helping to interpret experiments, and shaping ecological intuitions [1][2][3].
One major theoretical framework for understanding biodiversity is niche theory [1].Niche theory emphasizes the central role played by competition in shaping ecological properties.Within the niche paradigm, species must occupy distinct niches in order to coexist in an ecosystem [4,5].This idea is most succinctly summarized in Tilman's R* principle which states that every surviving species must be best at utilizing a different resource [2].Within the niche theory, the biodiversity of an ecosystem is determine by the number of distinct niches that species can occupy [6,7].
Consumer Resource Models (CRMs) have played a central role in the development of niche theory (Figure 1) [6,8,9].CRMs consists of two kinds of variables: resources and consumers.Each consumer is defined by a set of "consumer preferences" indicating which resources it can utilize.Species-species interactions arise through competition for the common pool of resources.An appealing feature of CRMs is that they explicitly model both species and resources, allowing us to understand environmental conditions in which species can coexist and when they competitively exclude each other.
Recently, there has been a renewed interest in Consumer Resource Models from both the ecology and statistical physics communities.A number of works have analyzed these models using methods from statistical physics in order to understand the behavior of complex ecosystems with many species and resources [10][11][12].Other works have generalized these models to study microbial ecology by incorporating metabolic considerations [13][14][15][16][17][18], including the role of metabolic tradeoffs [19][20][21].CRMs are also being increasingly used as a test-ground for furthering our understanding of eco-evolutionary dynamics [22][23][24][25][26] and community selection [26][27][28].
Historically, many of the central intuitions of niche theory have been developed using geometric arguments for analyzing CRMs [29,30].For example, Tilman's R* principle encodes the conditions for species coexistence as geometric intuitions about when zero net-growth isoclines (ZNGIs) of different species -defined as the set of resource abundances for which a species has zero growth rate -intersect in resource abundance space (i.e., the vector space of possible resource abundances) [2].Geometric reasoning is also fundamental to the development of contemporary niche theory [1].Within contemporary niche theory, whether two species can coexist is determined by the geometry of "coexistence cones" in resource abundance space (Figure 2) .
Traditional geometric arguments for determining species coexistence primarily work in resource abundance space.In this work, we derive an alternative geometric representation of species coexistence and niche differentiation in CRMs using a convex polytope in the space of "species consumption preferences."This novel geometric analysis extends previous work by foregrounding the central role played by niche differentiation in coexistence.It also allows us to enumerate all possible ecologicallystable steady states, as well as all transitions between steady states due to changes in resource supply.For this reason, it represents an interesting new way of understanding the origin of biodiversity within the context of niche theory.
To illustrate our ideas, we initially focus on MacArthur's Consumer Resource Model (MCRM) [6,8,9].In section II F, we show how this analysis can be extended to variants of the Consumer Resource Model (CRMs) including those analyzed by Tilman [31], CRMs with alternative resource dynamics [32], and CRMs with non-linear growth rates.
The MCRM consists of S species (also called consumers) with abundances N i (i = 1, . . ., S) that can consume M resources with abundances R α (α = 1, . . ., M ).Species grow by consuming resources and die at a percapita rate m i .Alternatively, m i can be interpreted as the minimum amount of energy that must be extracted from resources in order for species i to survive.Resources also have different "qualities" w α reflecting how much they contribute to growth.The preference of species i for a resource α is encoded in the matrix of consumption preferences c iα .In the absence of consumers, each resource is described by logistic growth with carrying capacity K α .In the presence of consumers, resources are depleted at a rate proportional to their consumption.
The dynamics of the MCRM are described by the following coupled ordinary differential equations: In general, at steady state, some of the resources and species will go extinct.Denote the number of species and resources that survive at steady state by S ⋆ and M ⋆ , respectively.Generically, the principle of competitive exclusion implies that at most S ⋆ ≤ M ⋆ species can survive in an ecosystem at steady state [5] (but also see [20,32,33] for discussion of exceptions and how they might arise).An example of the resulting dynamics is shown in Figure 1 for a system with S = 5 and M = 2. Notice that the steady-state abundances of the two resources is below their carrying capacities due to depletion, and the number of surviving species S ⋆ = 2 is bounded by the number of surviving resources, in this case M ⋆ = 2.
In general, which species survive depends on the resource supply point encoded in the "resource supply vector," K.As shown in Figure 2, by varying the resource supply point, the steady-state of the MCRM has qualitatively different behaviors: a single species i = 5 competitively excludes all species, two species i = 1, 5 coexist, species i = 1 competitively exclude all species, the two species i = 1, 4 coexist, and finally species i = 4 competitively excludes all other species.Notice that species 2 and 3 always go extinct and species 4 and 5 can never coexist for any choice of the carrying capacities K. Thus, even a simple model with two resource and five species exhibits an extremely rich set of possible steady-state behaviors.

B. Geometry in resource abundance space
Contemporary niche theory provides a simple geometric picture for understanding possible steady-state behaviors in CRMs [1].Consider, once again the simple ecosystem shown in Figure 1.A key quantity of interest are the Zero Net Growth Isoclines (ZNGIs).A ZNGI for a given species corresponds the set of resource abundances for which a species has exactly zero growth rate.Setting dNi dt = 0 in eq. 1, we see that the ZNGI for a species i is defined by the equation, where we have defined the per-capita growth rate g i (R ⋆ ) of species i and introduced the notation where X ⋆ denotes the steady-state value of a quantity X.For an ecosystem with S species, we have S different ZNGIs corresponding to the indices i = 1, . . ., S. For each ZNGI, g i (R ⋆ ) = 0 defines a co-dimension one hyperplane in the space of the resource abundances (Figure 2a).As shown in the inset, this hyperplane divides the resource space into two regions: a region containing the origin where species i has negative per-capita growth rate and a region where species i has positive per-capita growth rate.Eq. 1 tells us that at steady state, the per-capita growth rate for a species i must either be zero if species i survives (i.e.g i (R ⋆ ) = 0) or negative if species i goes extinct (i.e.g i (R ⋆ ) < 0).For this reason and because the CRM in Eq. 1 is guaranteed to reach a steady state for all choices of the carrying capacities K [34,35], the steadystate resource abundances R ⋆ must lie on the boundary of the convex polytope formed by the intersection of the ZNGIs associated with the surviving species, restricted to the positive quadrant (Figure 2a).The position of R ⋆ on this boundary depends on the supplied resource vector K.We emphasize that different choices of K corre- If we further require that the steady state be ecologically uninvadable (i.e., cannot be invaded by any species), R ⋆ must lie inside the boundary of the polytope formed by the ZNGIs; we refer to this region as the infeasible region.In Figure 2a, this corresponds to the shaded region.The number and identity of species that coexist is directly related to the number of ZNGIs that intersect at R ⋆ since we must have g i (R ⋆ ) = 0 for all species i that survive at steady state.For the example in Fig. 2, the vertices on the boundary of the shaded region correspond to values of R ⋆ where two species coexist at steady state, and edges correspond to values of R ⋆ where one species competitively excludes all others.This basic argument also explains why, generically, the number of surviving species must be less than the number of surviving resources, S ⋆ ≤ M ⋆ , because at most M ⋆ planes can intersect in M ⋆ dimensions without fine tuning.
The arrangements of the intersections between the ZNGIs which fall in the intersection of all the closed halfspaces enumerate the possible coexisting species in various ecosystems, and the dimensions of the intersections correspond dually to the number of coexisting species.The species that coexist in a particular ecosystem depend on the resource supply vector K.At steady state, for a non-depleted resource α Eq. 1 states that Geometrically, the left hand side corresponds to the vec-tor from the steady-state resource values to the resource carrying capacities.By definition, N ⋆ i > 0, so the right hand side defines a "coexistence cone" with basis given by the consumer resource preferences (Figure 2b and [1] for extended discussion).As shown in the figure, this equation also implies that K must lie within the coexsistence cones.
The coexistence cones tile the resource-abundance phase space and classify each K by the species whose coexistence it supports.The number of species that coexist is the rank of the coexistence cone, and the apex of the coexistence cone is the intersection of all ZNGIs corresponding to the surviving species.In general, if S ⋆ species survive and coexist, the coexistence cone has rank S ⋆ , and the intersection of the surviving species' ZNGIs has dimension M −S ⋆ .An interactive Mathematica notebook illustrating this basic picture can be found on the corresponding Github repository (see appendix A 4).

C. Geometry in space of consumer preferences
We now provide an alternative geometric picture of ecosystems that works directly in the space of "consumer preferences."The virtue of working in the space of consumer preferences is that it allows one to directly link species coexistence to species traits, which are often easier to observe and characterize from data.On a technical level, the geometry in the consumer preference space is mathematically dual to the the geometry in resource space and hence contains the same information (see below) [36].However, the qualitative ecological intuitions it provides are quite distinct and meaningful from those discussed in the last section.
To formulate this new geometric picture we introduce "scaled consumption vectors" C i for each species: Notice the elements of C i are the original consumer preferences for surviving species divided by m i where resources are weighted by energetic content w α .In terms of these scaled consumer resources, the steady-state condition g i (R ⋆ ) ≤ 0 from Eq. 2 can be rewritten as, with strict equality for the indices corresponding to the S ⋆ surviving species.Geometrically, this equation states that the ZNGI for each a species i is perpendicular to C i and passes through the point C i /∥C i ∥ 2 .This can be easily verified by observing that This inversive relationship between the ZNGIs and the consumption vectors allows us to analyze many coexistence properties using the rescaled consumption vectors alone without explicit reference to steady-state resource abundances.In the main text, we limit ourselves to discussing the results and interpretations that follow from this observation and relegate technical details to Appendix B 1.
The central geometric object in our picture is a convex polytope formed by the scaled consumption preferences C i which we call the positive convex hull (PCH) of consumption vectors.The PCH is constructed by forming the convex hull of all scaled consumption vectors, C i , and these consumption vectors projected onto all combinations of coordinate axes.It is necessary to include these projections in order to account for the possibility that resources may be depleted; one may think of these projected vectors as consumption vectors for species that are forbidden from consuming some potentially-depleted resources.Figure 3 depicts the PCH corresponding to the ecosystem analyzed in Figure 2. The figure also provides an illustration of the geometric duality between the PCH and the convex polytope formed by the ZNGIs in resource space corresponding to the infeasible region (i.e the region where growth rates for all species are negative).This duality follows directly from Eq. 5 and has a number of powerful implications (see Appendix B 1). Chief among these is that a face of dimension M − d of the infeasible region polytope formed by the ZNGIs is in direct correspondence to a face of dimension d of the PCH.We use the usual definition that a face is an intersection of a boundary of the polytope with a hyperplane; a face is not necessarily maximal-rank and can be a single vertex.
In appendix B, under the same very mild assumptions where competitive exclusion holds, we show that: • Each face of the PCH corresponds directly to a set of species that can coexist at steady state (Figure 3).
• A face of the PCH has vertices C i1 , . . ., C i S ⋆ if and only if there exists a choice of the resource supply vector K for which precisely the species i = i 1 , . . ., i S ⋆ coexist.(Figure 4) • Transitions between different steady-state behaviors as the resource supply vector K is varied (Figure 2) are captured by the geometry of the PCH, with allowed transitions corresponding to neighboring faces (Figures 4 and 5) .
These three properties of the PCH allow us to enumerate, using only species attributes, possible ecologicallystable steady states and transitions between them as the supplied resources are varied.The information about steady-states and coexistence contained in the ZNGIs is exactly that contained in the PCH as they are dual objects.The chief advantage provided by the this dual picture is that it provides intuition for coexistence and niche differentiation in terms of species traits.Additionally, the PCH construction lends itself well to computational geometry, especially in high dimensions as there are systematic and efficient algorithms for enumerating faces of a convex hull of a set of points [37].We now discuss the implications of this geometric picture in greater detail.

D. Enumerating possible steady-states and transitions
Each face of the PCH is in direct correspondence to a possible set of species that can coexist.This allows us to easily enumerate all possible ecologically-stable steady states by listing all faces of the PCH and their neighbors.A simple example of this can be seen by comparing Figures 2 and 3 which give two different geometric pictures for the the same ecosystem with S = 5 species and M = 2 resources.Notice, there exists no choice of K where species 2 and 3 survive at steady-state.Both of these species are always competitively excluded from the ecosystem.In the PCH, this is reflected in the fact that the corresponding scaled consumption vectors fall on the interior of the PCH and hence are not part of any face.Furthermore, when K is varied in Figure 2, the resulting transitions are precisely captured by the geometry of the PCH in Figure 3: from a steady state where species 5 survives, to coexistence of species 1 and 5, to a steady state with only species 1, to coexistence with species 1 and 4, and finally a steady state where only species 4 survives.Here, we use the term "transition" to refer to a change in the set of species that coexist at uninvadable steady state as the resource supply vector K is varied either continuously or discretely while species may re-invade continuously.These possible transitions are independent of how K is varied because for any choice of K, there is a unique uninvadable steady state independent of initial conditions [35].If re-invasion did not occur, the geometry of the PCH would change such that scaled consumption vectors for extinct species are removed from the construction; nonetheless, possibly coexisting communities would still be represented by faces of the PCH.
More generally, the faces of the PCH are arranged in a lattice by subset inclusion, so we can find all possible transitions between coexisting species by descending through the face lattice and enumerating the species whose scaled consumption vectors are the vertices of the faces.An example illustrating these transitions in a more complex ecosystem with M = 3 resources and S = 20 species is shown in Figure 4 and the corresponding interactive Mathematica notebooks.The left side of each panel in the figure shows the geometry in resource abundance space and the location of the supplied resource vector K, while the right-hand side shows the dual geometry in terms of the PCH.Notice that the faces of the PCH capture possible steady-states, and transitions between different steady states can only occur if faces are neighbors; the lattice of all faces and transitions is shown in Figure 5.

E. Coexistence and competition
The geometry of the PCH can also be used to ask and answer interesting ecological questions.For example, how does changing species traits such as consumer preferences, c iα , or fitnesses, m i , affect what species can coexist?How does adding a fitter invasive species affect biodiversity?
To illustrate this, we once again consider the simple ecosystem of S = 5 species and M = 2 resources considered in Figures 2 and 3 and ask how increasing the fitness (i.e decreasing the death rate m 2 ) of species 2 changes possible ecological steady-states.Figure 6 shows the PCH and resource dynamics for this system as the fitness of species 2 is increased.
Notice, initially the rescaled consumption vector for species 2, C 2 , lies within the PCH indicating that species 2 always goes extinct for all choices of the resource supply vector K. Furthermore, since species 1 and 5 lie on a common face of the PCH, we know that there exists a choice of K where species 1 and 5 coexist.The bottom panel shows the species abundances as a function of time for one such choice of K .
As we increase the fitness of species 2 by decreasing m 2 , the scaled species consumption vector C 2 = w 2 c 2 /m 2 grows larger.Notice that the new PCH has faces with vertices of species 2 and 5 and species 2 and 1, but no face corresponding to species 1 and 5 as in the original PCH.For this reason, species 1 and 5 can no longer coexist.The simulations of species abundance as a function of time confirm this prediction.Further, increasing the fitness of species 2 results in the competitive exclusion of species 1 and 5 and coexistence of species 2 and 4. Finally, when species 2 is fit enough, it excludes all other species in the ecosystem.
This simple example helps illustrate how the PCH can be used to gain an intuitive understanding of how introducing a fitter species can change ecological steady states and biodiversity.If the fitness of the invasive species is the same order of magnitude as those of existing species, its introduction will not result in large scale extinction so long as it is sufficiently distinct from existing species and does not have some special advantage in its consumption preferences.Instead, the species will be able to carve out a distinct niche.However, as the magnitude of the rescaled consumer preference vector grows, there will be massive extinctions.The transitions between these two regimes can be encoded simply in the geometry of the PCH.Additionally, the relative orientation of faces on the PCH can be used to understand how similar communities are to each other and the degree of competition between species.Faces that are nearly parallel to each other indicate that the corresponding species are similar and will compete strongly and can survive in similar environments.While these results can also be derived without the PCH by using the infeasible region, the PCH provides many intuitions directly in terms of species' attributes.Finally, while here we have restricted our considerations to a low-dimensional setting with two resources, we expect new and interesting properties to emerge in high-dimensional settings with many resources since high-dimensional convex geometry is much more complex than its low-dimensional analogue.

F. Alternative Consumer Resource Models
In the previous section, we restricted our analysis to MacArthur's original Consumer Resource Model.However, the basic geometric picture discussed above also holds for other popular variants of Consumer Resource Models including the Tilman's Consumer Resource Model (TCRM), and the Consumer Resource Model with externallysupplied Resources (eCRM, eq.7), The underlying reason for this is because our geometric construction is derived from analyzing the sign of g i (R ⋆ ) for each species and the form of g i is identical for the eCRM, TCRM, and MCRM.The faces of the convex polytope formed from the rescaled consumption vectors still enumerate subsets of species that can stably coexist in each of these models.For the eCRM, this construction is nearly identical to the MCRM; while the positions of the coexistence cones are different, their structure and the PCH of rescaled consumption vectors is identical.
The correspondence between stably-coexisting species in the eCRM and faces of the PCH is shown in figures 9 and 10.For the TCRM, the appropriate convex polytope constructed from rescaled consumption vectors must be slightly modified because resource abundances can become nonphysically negative; for discussion and visualization, see appendix C 2.

G. Extension to models with non-linear species growth-rates
The geometric construction presented in the last section exploits that fact that the growth rate of a species g i (R) is a linear function of the resource abundances.
Here, we show that many of the geometric intuitions still hold even in more complex models where g i (R) is a nonlinear function.To do so we consider a general Consumer Resource Model of the form, where the q iα (R) are impact vectors that encode how species change resource abundances.We further restrict our considerations to the case where, holds, with a i (R) and b α (R) arbitrary functions.Such a form can be motivated by noting that this choice reflects the idealized case where species consume resources directly proportional to the marginal utility they derive.It was also shown in [35] that for such a choice, interactions between species are always symmetric and there is a unique invadable fixed point.The uniqueness of an invadable fixed point when this condition holds is important because it implies that the PCH is well-defined and transitions between different steady states are invariant to the initial conditions, as discussed in section II D. For this more general non-linear case, many properties of the relationship between the PCH and coexistence are preserved, but unlike in the linear case, the consumption vectors C i (R ⋆ ) now depend on the steady-state resource abundances, R ⋆ .Expanding the species' growth rates about R = R ⋆ to linear order gives: Defining the αth component of C i (R ⋆ ) to be, to linear order g i (R ⋆ ) ≤ 0 is equivalent to, As shown in Figure 7, the consumption vectors now depend on the steady-state concentration R ⋆ , and both the PCH and its faces deform as R ⋆ changes as parameters are varied.However, the PCH still contains a considerable amount of information about possible steady-states and transitions.Given steady-state resource and species abundances R ⋆ and N ⋆ i , the consumption vectors corresponding to the surviving species still span a face of the PCH.In addition, we have found the PCH generally also captures the local steady-state structure including local transitions in steady-state behavior as a function of model parameter.The reason for this is because the structure of the PCH varies smoothly with R ⋆ , so transitions between stably-coexisting subsets of species are represented by adjacent faces on the PCH (see the interactive demonstrations (appendix A 4) to further understand utility and limitations).
One crucial difference is that in the non-linear case not all faces present on a specific realization of the PCH (i.e. a PCH corresponding to a particular choice of parameters) necessarily represent realizable steady-states.This is because as R ⋆ and N ⋆ i change, new faces can form and disappear.Since the PCH depends on linearizing the growth rate, it does not have any global information about non-linear effects.Information about these nonlinear effects is captured fully by looking to the infeasible region as described in section II B. However, with a moderate number of resources, the infeasible region in high-dimensions is difficult to visualize and compute, especially for nonlinear growth rates.Because the PCH can be computed efficiently using convex hull algorithms, it is a useful tool for understanding the local structure of transitions between steady-states in high-dimensional systems, even when growth rates may be nonlinear.Figure 6: Positive Convex Hull (PCH) of rescaled consumer preferences predicts coexistence properties when species fitness is modified.Panels show PCH (top) and species abundances as a function of time for fixed resource supply vector K (bottom) as the fitness of species 2 is increased by decreasing the parameter m 2 for the ecosystem analyzed in Figures 2 and 3. Increasing the fitness of species 2 interrupts the coexistence of species 1 and 5, followed by different levels of competitive exclusion.
In figure 7, we demonstrate how the PCH extends to the nonlinear case by considering a Consumer Resource Model where species growth saturates as a function of resource concentrations (also called a Type II functional response in the ecological literature), with M = 2 resources and S = 5 species [38].In the figure, one sees that as K changes, the resulting steadystate resource abundances R ⋆ also change, as do the generalized consumption vectors C i (R * ) and the resulting PCH.Since R ⋆ depends smoothly on the parameters, both C i (R * ) and the PCH also smoothly change as parameters are varied.For this reason, at least locally, the PCH remains an important source of intuition for possible ecological behaviors.

H. Limitations of geometric construction
We end by briefly commenting on some important limitations of our geometric construction.In general, we expect that our geometric construction is valid whenever we can use ideas from contemporary niche theory like ZGNIs and coexistence cones to describe the underlying ecology [1][2][3].The underlying reason for this is that the geometry in the space of consumer preferences is mathematically dual to the geometry in resource abundance space.The validity of both geometric constructions require that the consumption vectors (i.e how resources affect growth rate) and the impact vectors (i.e.how species deplete resources) be closely related to each other.This statement can be made more precise using the recently discovered relationship between Consumer Resource Models and constrained optimization [34,35].
We expect the geometric pictures to hold when such a mapping to constrained optimization exists, namely that the effective species-species interactions are symmetric [35].
Another limitation of our construction is that it assumes that there are no hard geometric constraints on consumer-resource preferences.One prominent example of such hard constraints are metabolic tradeoffs that fix the consumer preference vectors to all have the same magnitude [20].Such constraints result in the violation of competitive exclusion and require evolutionary fine tuning of preferences [19,33].In this limit, our geometric picture begins to break down because the very tightly spaced faces become essentially parallel and species belonging to multiple faces can coexist (see appendix B).In essence, we can no longer think of our geometry as a convex shape but instead must treat it as a smooth sphere.As soon as some of the constraints are relaxed very slightly-perhaps by some disordered perturbation-the geometric principles become valid again with a very large number of faces which are very small, tightly-packed, and nearly parallel.This indicates that the species present in a community are very sensitive to the supply point and transitions between communities happen readily.

III. DISCUSSION
In this work, we have introduced a new geometric framework for understanding niche theory based on the species consumer resource preferences.Our work complements existing geometric intuitions by emphasizing the important role played by consumer preferences in shaping species coexistence and niche differentiation.One appealing aspect of the work is that it works in trait space, something that is often easier to observe and measure than resource abundances [39].Despite the simplicity of our picture, it can be used to make a series of powerful predictions including which species can coexist and how species coexistence patterns can transition as the resource supply vector is varied.We hope that our geometric framework can be used to help design new experiments and analyze empirical directions.
The geometric picture developed here may extend to other contexts to provide new insights.In this manuscript, we have largely focused on small ecosystems with a few resources and species.It will be interesting to ask how this picture generalizes to large ecosystems where methods from random matrix theory and statis-tical physics can be used to make powerful predictions [40].Doing so will require understanding convex hulls of randomly distributed points and represents an interesting mathematical problem [41].Another direction to explore is how this analysis can be extended to consider ecosystems with multiple trophic layers [42] and to microbial ecosystems where metabolic cross-feeding plays a central role [13,43,44].Additionally, we may be able to extend this picture to understand temporal niches, which may play an important role in shaping microbial ecosystems [43,45].

IV. ACKNOWLEDGEMENTS
We would like to thank Zhijie (Sarah) Feng and Jason Rocks for useful discussions.We would also like to thank Zhijie Feng, Emily Hager, and Maria Yampolskya for comments on the manuscript.This work was funded by NIH NIGMS R35GM119461 to PM and the Boston University Undergraduate Research Opportunities Program to EB.
The values of c iα were chosen by-hand to make features of the PCH clear.The various choices of K α were also chosen by-hand to highlight various coexistence cones; in figure 2 ).These values can be modified by-hand using a click-and-drag interface in the interactive Mathematica demonstration.In the numerical solutions to the differential equations, the initial conditions used are: N i (t = 0) = 0.5 and R α (t = 0) = K α .In plots of the PCH and consumption vectors, the horizontal and vertical axes range from 0 to 1; in plots of coexistence cones and the infeasible region, the horizontal and vertical axes range from 0 to 3. The vertical axes of plots of species population dynamics are scaled so that the curve fills the entire plot; simulations are run and plotted until t = 100.For details on the plots and numerical solutions including code or to modify plotting parameters, see the interactive demonstration.

Three resource model
In all figures with three resources (M = 3) the MCRM differential equations are simulated with twenty (S = 20) species and the following parameters:  These values can be modified using a drag-and-drop interface in the interactive Mathematica demonstrations.
In the numerical solutions, the initial conditions used are N i (t = 0) = 0.01 and R α = K α .In plots of the PCH and consumption vectors, the all axes range from 0 to 3; in plots of coexistence cones and the infeasible region, the horizontal and vertical axes range from 0 to 2. The consumption vectors that are labeled A,B,C,D correspond to species i = 18, i = 10, i = 12, i = 2 in the above matrix, respectively.The vertical axes of plots of species population dynamics are scaled so that the curve fills the entire plot; simulations are plotted until t = 40.
which has nonlinear growth rate, In the figure, there are M = 2 resources and S = 5 species with parameters, 2 0.5 0.5 2 1.5 1.5 0.9 0.7 0.7 0.9  interpreted to represent specialist species that are consumed only by a subset, A, of resources.The addition of these specialist species allows equation 3 to hold even when resources are depleted.

Deriving properties of the PCH
We will show that the consumption vectors that form vertices of a common face of the positive convex hull correspond directly to a set of ecologically-stable coexisting species.Specifically, we will use the definition that if R ⋆ are the steady-state resource abundances then a species i can survive if When we form the positive convex hull (PCH) of {C 1 , . . ., C S }, every point x in the positive orthant of R M is contained in the conic hull of a face of the PCH.If Let j = 1, . . ., S * index the surviving species, so C j • R ⋆ = 1 for all choices of j.If x = j γ j C j with γ j ≥ 0 and j γ j = 1 (i.e., x is a convex combination of C j ), then that x is on the boundary or outside of the PCH; convex combinations of points in a convex set cannot be outside the convex set, so x must be on the boundary of the PCH.If all convex combinations of vertices of a convex polytope are on the boundary of the convex polytope, then the vertices belong to a common face of the convex polytope.
Conversely, if there is a face with vertices indexed by j, then we can find a choice of R ⋆ (although it may not be unique if the number of surviving species is less than M ) so that C j • R ⋆ = 1 for all j and C k • R ⋆ < 1 for k ̸ = j.We can guarantee there is a choice of R ⋆ so that C j • R ⋆ = 1 because in R M , there is always an intersection of at most M hyperplanes which are not parallel.We then know that R ⋆ satisfies C k • R ⋆ < 1 for k ̸ = j because, following similar logic from before, if C k • R ⋆ ≥ 1, then we should be able to form any non-trivial convex combination of C k and C j , and it will on the boundary or outside the PCH; however, no non-trivial convex combinations of vertices that do not belong to a common face can lie on the boundary of the PCH, so we have a contradiction.The carrying-capacities K = R ⋆ + j c j will then lead to all species j surviving.
In this argument, we assumed that there are no C i that lie on a face of which it is not vertex.Equivalently, we assumed that there are no faces that contain a sub-face of the same rank.We could also say that there are no parallel faces.If this assumption is dropped, the statement 'all convex combinations of vertices of a common face belong to just one face' no longer holds; some convex combinations could belong to any of the various sub-faces.This means that all C i that belong to the face which contains all other sub-faces-whether the C i are vertices are notrepresent species that can coexist.In cases like these, it is possible that the number of surviving species is greater than the number of resources.However, in the generic case (for example, when ∥C i ∥ is a random variable with non-zero variance), no faces of the PCH are parallel and no C i belong to the interior of any face of the PCH so the correspondence between vertices of faces of the PCH and species that can coexist we just showed holds.3).Right: Population dynamics of all sets of stably-coexisting species; each plot corresponds to a different choice of supply rates, κ α .can be written as, for non-depleted resources α, allowing for an equation similar to Eq. 3: This equation defines the coexistence cones.The structure of coexisting species, identically to the MCRM, is determined by the sign of g i (R ⋆ ) for each species.As the form of g i is the same for the eCRM and MCRM and as κ α being non-negative implies R α is non-negative, the structure of coexistence in the eCRM is identical to that of the MCRM.That is, coexistence can be enumerated by the faces of the PCH of rescaled consumption vectors, just as in the MCRM.

Geometric Interpretation of the Tilman Consumer Resource Model
For the TCRM, resource abundances can become nonphysically negative and instead of the subsets of stablycoexisting species being enumerated by the faces of positive convex hull, the subsets of stably-coexisting species are now enumerated by the faces of the convex hull of {C i } S i=1 ∪ {0}, the union of all consumption vectors and the zero vector.This can be seen by noting that one reason the PCH was introduced is because in the MCRM, resources were required to have non-negative abundances and could be depleted, but we wanted the equation 3 to hold in order to make geometric arguments about coexistence cones.In the TCRM, this equation always holds even if resources are depleted because there is no overall factor of R α in the TCRM equation for resources (e.q., 6), so it is not necessary to add additional points correspond-ing to depleted resources when forming the appropriate convex polytope.The derivation of the properties of this convex polytope is essentially identical to the derivation of the properties of the PCH for the MCRM.See figure 11 for a visualization of the relevant convex polytope and a case where resource abundances become negative.

Figure 1 :
Figure 1: MacArthur Consumer Resource Model (a) A species i consumes resource α with preference set by consumer preferences c iα .(b) Population dynamics for a system with two resources and four species described by Eq. 1. (see appendix for parameters)

Figure 3 :
Figure 3: Relationship between coexistence cones and the positive convex hull (PCH) formed by rescaled consumption vectors.Left: Coexistence cones are highlighted in relation to the the ZNGIs for competitive species.If the vector of carrying capacities, K, belongs to cone α, species i = 1, i = 5 can coexist; if K belongs to cone β, species i = 1, i = 4 can coexist; otherwise only i = 5, i = 1, i = 4 can survive separately.Right: The positive convex hull (PCH) of rescaled consumption vectors C i has faces that are dual to the arrangement of the coexistence cones.Each possible ecologically-stable combination of surviving species is represented by a face of the PCH.

Figure 4 :
Figure 4: Positive convex hull (PCH) formed by rescaled consumption vectors for an ecosystem with M = 3 resources and S = 20 species.In each panel, the left plot shows the infeasible region polytope formed by the ZNGI, the resource supply vector K, and the associated coexistence cone.The top plot shows the species populations N i as a function of time.The right plot depicts the PCH; the face corresponding to the steady-state for the choice of K is indicated by large green dots.Small dots indicate consumption vectors, C i , that lie in the interior of the PCH and correspond to species that go extinct for all choices of K.The directed graph shows possible transitions between these steady-states as K is varied when no re-invasion occurs.Values of K are chosen such that the species which survive demonstrate each face of the PCH.The panes are organized to reflect the face lattice of the PCH.(Also see the interactive Mathematica notebook).

Figure 5 :
Figure 5: Enumerating steady-states and transitions using the PCH.All possible steady-states and allowed transitions (without re-invasion) for the ecosystem in Figure 4 can be enumerated by considering the geometry of the faces on the PCH.

Figure 7 :
Figure 7: Positive Convex Hull (PCH) construction fora CRM with a nonlinear growth rate.Each row corresponds to a value of R ⋆ ; the left panels show K, R ⋆ , ZNGIs, coexistence cones; the right panels show the PCH construction and surviving species for the given R ⋆ .For a nonlinear growth rate, g i (R), the PCH's form depends on R ⋆ .This figure corresponds to the model from equations 14 and 15.

3 .Figure 7
Figure 7 is constructed using the CRM,

Figure 8 :
Figure 8: Construction of the positive convex hull of consumption vectors with three resources.Upper left: the positive convex hull of rescaled consumption vectors, represented by large blue dots.The projection of the rescaled consumption vectors onto the coordinate planes and axes are displayed with differently-colored smaller dots.Different view perspectives labeled A,B,C are shown with small eye cartoons.Upper right, lower left, lower right: The PCH along with the projected rescaled consumption vectors are shown from the different labeled view perspectives, emphasizing that the construction of the PCH is preserved under projection onto coordinate planes.
C 1 , . . ., C k , . . ., C d are the vertices of the minimal face whose conic hull contains x, then there are β k > 0 so that x = d k=1 β k C k ; note that C k may include consumption vectors that have been projected onto a subset of axes, as in appendix B 1. If x is in the interior of the PCH, then d k=1 β k < 1; if x is on the boundary of the PCH, d k=1 β k = 1; and if x is outside the PCH, d k=1 β k > 1.

Figure 9 :
Figure 9: Relationship between coexistence cones, the PCH formed by rescaled consumption vectors, and stably coexisting species in the Consumer Resource Model with Externally-Supplied Resources (eCRM).Left: Coexistence cones and ZNGIs are highlighted in the resource-abundance phase space.Notice that the coexistence cones have the same structure but are in different positions compared to fig. 3 Center: PCH formed by rescaled consumption vectors; the faces of this PCH enumerate stably coexisting species.(c.f., fig.3).Right: Population dynamics of all sets of stably-coexisting species; each plot corresponds to a different choice of supply rates, κ α .

Figure 10 :
Figure 10: Positive convex hull (PCH) formed by rescaled consumption vectors for an ecosystem with M = 3 resources with dynamics given by the Consumer Resource Model with Externally-Supplied Resources (eCRM).The structure and layout of this figure is identical to that of Figure 4, but the dynamics and coexistence cones shown are those of the eCRM model (eq.7).

Figure 11 :
Figure 11: Convex polytope enumerating coexisting species for the Tilman Consumer Resource Model.Left: resource-abundance phase space, with K, R ⋆ , and the trajectory R(t) plotted as in Figure 2; here, however, negative values of resource abundances are shown.The species population dynamics are additionally inset.Right: The relevant convex polytope which is the convex hull of {C i } S i=1 ∪ {0} has faces which enumerate the possible sets of species that can coexist.The face corresponding to the coexisting species shown in the left figure is highlighted in green.
ZNGIs for each species are plotted in the space of resource abundances.The highlighted region corresponds to the polytope defining the infeasible region where the growth rate is negative for all species.(Inset)ZNGIfor one species where different growth-rate regions are labeled.(b)Trajectories of solutions in resource phase space (black lines), coexistence cones (green cones), and species abundances N i as a function of time for five different choices of carrying capacity indicated by K A , ..., K E .Dynamics in Figure1correspond to trajectory with carrying capacity K D .See interactive demonstrations in appendix A 4.