#  Geometry of ecological coexistence and niche differentiation

Emmy Blumenthal  Department of Physics, Boston University, Boston, MA 02215,
USA  Pankaj Mehta  Department of Physics, Boston University, Boston, MA 02215,
USA  Biological Design Center, Boston University, Boston, MA 02215, USA
Faculty of Computing and Data Sciences, Boston University, Boston, MA 02215,
USA

###### Abstract

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 (CRMs)
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 coexistence and enumerate ecologically-stable steady states
and transitions between them. Collectively, these results constitute a
qualitatively new way of understanding the role of species traits in shaping
ecosystems 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 Chase and Leibold (2009);
Tilman (1982); Levins (2020).

One major theoretical framework for understanding biodiversity is niche theory
Chase and Leibold (2009). 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
MacArthur and Levins (1967); Armstrong and McGehee (1980). 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 Tilman
(1982). Within the niche theory, the biodiversity of an ecosystem is determine
by the number of distinct niches that species can occupy MacArthur (1969);
Levin (1970).

Consumer Resource Models (CRMs) have played a central role in the development
of niche theory (Figure 1) MacArthur (1970, 1969); Chesson (1990). 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
Tikhonov and Monasson (2017); Cui  _et al._ (2020a, 2021). Other works have
generalized these models to study microbial ecology by incorporating metabolic
considerations Goldford  _et al._ (2018); Marsland III  _et al._ (2019);
Niehaus  _et al._ (2019); Muscarella and O’Dwyer (2020); Bajic and Sanchez
(2020); Gowda  _et al._ (2022), including the role of metabolic tradeoffs
D’Andrea  _et al._ (2020); Posfai  _et al._ (2017); Li  _et al._ (2020). CRMs
are also being increasingly used as a test-ground for furthering our
understanding of eco-evolutionary dynamics Good  _et al._ (2018); Caetano  _et
al._ (2021); Tikhonov  _et al._ (2020); Goyal  _et al._ (2022); Chang  _et
al._ (2021) and community selection Xie  _et al._ (2019); Chang  _et al._
(2021); Sanchez  _et al._ (2022).

Historically, many of the central intuitions of niche theory have been
developed using geometric arguments for analyzing CRMs Leibold (1996); Levins
(1966). 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) Tilman (1982).
Geometric reasoning is also fundamental to the development of contemporary
niche theory Chase and Leibold (2009). 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 ecologically-stable 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.

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

##  II  Methods and Results

###  II.1 Model

To illustrate our ideas, we initially focus on MacArthur’s Consumer Resource
Model (MCRM) MacArthur (1970, 1969); Chesson (1990). In section II.6, we show
how this analysis can be extended to variants of the Consumer Resource Model
(CRMs) including those analyzed by Tilman Tilman (2020), CRMs with alternative
resource dynamics Cui  _et al._ (2020b), and CRMs with non-linear growth
rates.

The MCRM consists of $S$ species (also called consumers) with abundances
$N_{i}$ ($i=1,\ldots,S$) that can consume $M$ resources with abundances
$R_{\alpha}$ ($\alpha=1,\ldots,M$). Species grow by consuming resources and
die at a per-capita 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_{\alpha}$ reflecting how much they contribute to growth. The preference of
species $i$ for a resource $\alpha$ is encoded in the matrix of consumption
preferences $c_{i\alpha}$. In the absence of consumers, each resource is
described by logistic growth with carrying capacity $K_{\alpha}$. 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:

$\displaystyle\frac{dR_{\alpha}}{dt}$
$\displaystyle=R_{\alpha}\left(K_{\alpha}-R_{\alpha}\right)-\sum_{i=1}^{S}c_{i\alpha}N_{i}R_{\alpha}$
$\displaystyle\frac{dN_{i}}{dt}$
$\displaystyle=N_{i}\left(\sum_{\alpha=1}^{M}w_{\alpha}c_{i\alpha}R_{\alpha}-m_{i}\right).$
(1)

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^{\star}$ and $M^{\star}$, respectively.

Generically, the principle of competitive exclusion implies that at most
$S^{\star}\leq M^{\star}$ species can survive in an ecosystem at steady state
Armstrong and McGehee (1980) (but also see Posfai  _et al._ (2017); Cui  _et
al._ (2020b); Pacciani-Mori  _et al._ (2020) 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^{\star}=2$ is bounded by the number of
surviving resources, in this case $M^{\star}=2$.

In general, which species survive depends on the resource supply point encoded
in the “resource supply vector,” $\mathbf{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 $\mathbf{K}$. Thus, even a simple model with two
resource and five species exhibits an extremely rich set of possible steady-
state behaviors.

###  II.2 Geometry in resource abundance space

Figure 2: Zero Net Growth Isoclines (ZNGIs) and coexistence cones for
ecosystems with $S=5$ species and $M=2$ resources. (a) 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) ZNGI for 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 $\mathbf{K}_{A},\dots,\mathbf{K}_{E}$. Dynamics
in Figure 1 correspond to trajectory with carrying capacity $\mathbf{K}_{D}$.
See interactive demonstrations in appendix A.4.

Contemporary niche theory provides a simple geometric picture for
understanding possible steady-state behaviors in CRMs Chase and Leibold
(2009). 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 $\frac{dN_{i}}{dt}=0$ in eq. 1, we see
that the ZNGI for a species $i$ is defined by the equation,

$g_{i}(\mathbf{R}^{\star})=\sum_{\alpha=1}^{M}w_{\alpha}c_{i\alpha}R_{\alpha}^{\star}-m_{i}=0,$
(2)

where we have defined the per-capita growth rate $g_{i}(\mathbf{R}^{\star})$
of species $i$ and introduced the notation where $X^{\star}$ 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,\ldots,S$. For each
ZNGI, $g_{i}(\mathbf{R}^{\star})=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}(\mathbf{R}^{\star})=0$) or negative if species $i$ goes extinct (i.e.
$g_{i}(\mathbf{R}^{\star})<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 $\mathbf{K}$ Mehta  _et al._ (2019); Marsland III  _et al._ (2020),
the steady-state resource abundances $\mathbf{R}^{\star}$ 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 $\mathbf{R}^{\star}$ on this boundary depends on
the supplied resource vector $\mathbf{K}$. We emphasize that different choices
of $\mathbf{K}$ correspond to _different_ ecosystems with distinct
distributions of supplied resources (i.e. resource carrying capacities in the
absence of consumers).

If we further require that the steady state be _ecologically uninvadable_
(i.e., cannot be invaded by any species), $\mathbf{R}^{\star}$ 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 $\mathbf{R}^{\star}$ since we must have
$g_{i}(\mathbf{R}^{\star})=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 $\mathbf{R}^{\star}$ where two species coexist
at steady state, and edges correspond to values of $\mathbf{R}^{\star}$ 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^{\star}\leq M^{\star}$, because at most
$M^{\star}$ planes can intersect in $M^{\star}$ dimensions without fine
tuning.

The arrangements of the intersections between the ZNGIs which fall in the
intersection of all the closed half-spaces 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
$\mathbf{K}$. At steady state, for a non-depleted resource $\alpha$ Eq. 1
states that

$\mathbf{K}-\mathbf{R}^{\star}=\sum_{i,N_{i}^{\star}>0}c_{i\alpha}N_{i}^{\star}.$
(3)

Geometrically, the left hand side corresponds to the vector from the steady-
state resource values to the resource carrying capacities. By definition,
$N_{i}^{\star}>0$, so the right hand side defines a “coexistence cone” with
basis given by the consumer resource preferences (Figure 2b and Chase and
Leibold (2009) for extended discussion). As shown in the figure, this equation
also implies that $\mathbf{K}$ must lie within the coexsistence cones.

The coexistence cones tile the resource-abundance phase space and classify
each $\mathbf{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^{\star}$ species survive and coexist, the
coexistence cone has rank $S^{\star}$, and the intersection of the surviving
species’ ZNGIs has dimension $M-S^{\star}$. An interactive Mathematica
notebook illustrating this basic picture can be found on the corresponding
Github repository (see appendix A.4).

###  II.3  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) Blekherman  _et al._
(2012). 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” $\mathbf{C}_{i}$ for each species:

$\displaystyle\mathbf{C}_{i}$
$\displaystyle=\left(\begin{array}[]{ccccc}w_{1}c_{i1}/m_{i}&\dots&w_{\alpha}c_{i\alpha}/m_{i}&\dots&w_{M}c_{iM}/m_{i}\end{array}\right)^{\mathrm{T}}.$
(5)

Notice the elements of $\mathbf{C}_{i}$ are the original consumer preferences
for surviving species divided by $m_{i}$ where resources are weighted by
energetic content $w_{\alpha}$. In terms of these scaled consumer resources,
the steady-state condition in Eq. 1 can be rewritten

$\mathbf{C}_{i}\cdot\mathbf{R}^{\star}-1\leq 0,$ (6)

with strict equality for the indices corresponding to the $S^{\star}$
surviving species. Geometrically, this equation states that the ZNGI for each
a species $i$ is perpendicular to $\mathbf{C}_{i}$ and passes through the
point $\mathbf{C}_{i}/\|\mathbf{C}_{i}\|^{2}$. This can be easily verified by
observing that $\mathbf{R}^{\star}=\mathbf{C}_{i}/\|\mathbf{C}_{i}\|^{2}$ is a
solution to Eq. 6.

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 $\mathbf{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, $\mathbf{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. 6 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.

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
$\mathbf{C}_{i_{1}},\dots,\mathbf{C}_{i_{S^{\star}}}$ if and only if there
exists a choice of the resource supply vector $\mathbf{K}$ for which precisely
the species $i=i_{1},\dots,i_{S^{\star}}$ coexist. (Figure 4)

  * •

Transitions between different steady-state behaviors as the resource supply
vector $\mathbf{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 ecologically-stable steady states and transitions between
them as the supplied resources are varied. We now discuss the implications of
this geometric picture in greater detail.

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, $\mathbf{K}$, belongs to cone $\alpha$, species
$i=1,i=5$ can coexist; if $\mathbf{K}$ belongs to cone $\beta$, 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
$\mathbf{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.

###  II.4 Enumerating possible steady-states and transitions

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 $\mathbf{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 $\mathbf{K}$ is indicated by large green dots. Small dots indicate
consumption vectors, $\mathbf{C}_{i}$, that lie in the interior of the PCH and
correspond to species that go extinct for all choices of $\mathbf{K}$. The
directed graph shows possible transitions between these steady-states as
$\mathbf{K}$ is varied. The panes are organized to reflect the face lattice of
the PCH. (Also see the interactive Mathematica notebook).

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
$\mathbf{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 $\mathbf{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.

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 $\mathbf{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.

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

###  II.5 Niche differentiation and coexistence

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 $\mathbf{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.

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\alpha}$, 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$,
$\mathbf{C}_{2}$, lies within the PCH indicating that species $2$ always goes
extinct for all choices of the resource supply vector $\mathbf{K}$.
Furthermore, since species $1$ and $5$ lie on a common face of the PCH, we
know that there exists a choice of $\mathbf{K}$ where species $1$ and $5$
coexist. The bottom panel shows the species abundances as a function of time
for one such choice of $\mathbf{K}$ .

As we increase the fitness of species $2$ by decreasing $m_{2}$, the scaled
species consumption vector $\mathbf{C}_{2}=w_{2}\mathbf{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. 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. 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.

###  II.6 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),

$\displaystyle\frac{dR_{\alpha}}{dt}$
$\displaystyle=\left(K_{\alpha}-R_{\alpha}\right)-\sum_{i=1}^{S}c_{i\alpha}N_{i},$
$\displaystyle\frac{dN_{i}}{dt}$
$\displaystyle=N_{i}\left(\sum_{\alpha=1}^{M}w_{\alpha}c_{i\alpha}R_{\alpha}-m_{i}\right),$
(7)

and the Consumer Resource Model with externally-supplied Resources (eCRM, eq.
8),

$\displaystyle\frac{dR_{\alpha}}{dt}$
$\displaystyle=\left(\kappa_{\alpha}-R_{\alpha}\right)-\sum_{i=1}^{S}c_{i\alpha}N_{i}R_{\alpha},$
$\displaystyle\frac{dN_{i}}{dt}$
$\displaystyle=N_{i}\left(\sum_{\alpha=1}^{M}w_{\alpha}c_{i\alpha}R_{\alpha}-m_{i}\right).$
(8)

The underlying reason for this is because our geometric construction is
derived from analyzing the sign of $g_{i}(\mathbf{R}^{\star})$ 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.

###  II.7 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}(\mathbf{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}(\mathbf{R})$ is a non-
linear function. To do so we consider a general Consumer Resource Model of the
form,

$\displaystyle\frac{dN_{i}}{dt}$ $\displaystyle=N_{i}g_{i}(\mathbf{R}),$ (9)
$\displaystyle\frac{dR_{\alpha}}{dt}$
$\displaystyle=h_{\alpha}(\mathbf{R})+\sum_{i}N_{i}q_{i\alpha}(\mathbf{R}),$
(10)

where the $q_{i\alpha}(\mathbf{R})$ are impact vectors that encode how species
change resource abundances. We further restrict our considerations to the case
where,

$\displaystyle
q_{i\alpha}(\mathbf{R})=-a_{i}(\mathbf{R})b_{\alpha}(\mathbf{R})\frac{\partial
g_{i}}{\partial R_{\alpha}},$ (11)

holds, with $a_{i}(\mathbf{R})$ and $b_{\alpha}(\mathbf{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
their marginal utility they derive. It was also shown in Marsland III  _et
al._ (2020) that for such a choice, interactions between species are always
symmetric and there is a unique fixed point.

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 $\mathbf{C}_{i}(\mathbf{R}^{\star})$ now depend on the
steady-state resource abundances, $\mathbf{R}^{\star}$. Expanding the species’
growth rates about $\mathbf{R}=\mathbf{R}^{\star}$ to linear order gives:

$\displaystyle g_{i}(\mathbf{R})\approx\sum_{\beta=1}^{M}\left.\frac{\partial
g_{i}}{\partial
R_{\beta}}\right|_{\mathbf{R}=\mathbf{R}^{\star}}(R_{\beta}-R_{\beta}^{\star})+g_{i}(\mathbf{R}^{\star}).$
(12)

Defining the $\alpha$th component of $\mathbf{C}_{i}(\mathbf{R}^{\star})$ to
be,

$\displaystyle[\mathbf{C}_{i}(\mathbf{R}^{\star})]_{\alpha}=\frac{\left.\frac{\partial
g_{i}}{\partial
R_{\alpha}}\right|_{\mathbf{R}=\mathbf{R}^{\star}}}{\sum_{\beta=1}^{M}\left.\frac{\partial
g_{i}}{\partial
R_{\beta}}\right|_{\mathbf{R}=\mathbf{R}^{\star}}R_{\beta}^{\star}-g_{i}(\mathbf{R}^{\star})},$
(13)

to linear order $g_{i}(\mathbf{R}^{\star})\leq 0$ is equivalent to,

$\displaystyle\mathbf{C}_{i}(\mathbf{R}^{\star})\cdot\mathbf{R}^{\star}-1\leq
0.$ (14)

As shown in Figure 7, the consumption vectors now depend on the steady-state
concentration $\mathbf{R}^{\star}$, and both the PCH and its faces deform as
$\mathbf{R}^{\star}$ 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
$\mathbf{R}^{\star}$ and $N_{i}^{\star}$, 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 $\mathbf{R}^{\star}$, 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 $\mathbf{R}^{\star}$ and $N_{i}^{\star}$ 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.

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),

$\displaystyle\frac{dR_{\alpha}}{dt}$
$\displaystyle=\tau^{-1}(K_{\alpha}-R_{\alpha})-\sum_{i=1}^{S}N_{i}R_{\alpha}\frac{e_{i}k_{i\alpha}\mu_{i\alpha}}{(k_{i\alpha}+R_{\alpha})^{2}},$
(15) $\displaystyle g_{i}(\mathbf{R})$
$\displaystyle=e_{i}\sum_{\alpha=1}^{M}\frac{\mu_{i\alpha}R_{\alpha}}{k_{i\alpha}+R_{\alpha}}-m_{i},$
(16)

with $M=2$ resources and $S=5$ species. In the figure, one sees that as
$\mathbf{K}$ changes, the resulting steady-state resource abundances
$\mathbf{R}^{\star}$ also change, as do the generalized consumption vectors
$\mathbf{C}_{i}(\mathbf{R}^{*})$ and the resulting PCH. Since
$\mathbf{R}^{\star}$ depends smoothly on the parameters, both
$\mathbf{C}_{i}(\mathbf{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.

Figure 7:  Positive Convex Hull (PCH) construction for a CRM with a nonlinear
growth rate. Each row corresponds to a value of $\mathbf{R}^{\star}$; the left
panels show $\mathbf{K},\mathbf{R}^{\star}$, ZNGIs, coexistence cones; the
right panels show the PCH construction and surviving species for the given
$\mathbf{R}^{\star}$. For a nonlinear growth rate, $g_{i}(\mathbf{R})$, the
PCH’s form depends on $\mathbf{R}^{\star}$. This figure corresponds to the
model from equations 15 and 16.

###  II.8 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 Chase and Leibold (2009);
Tilman (1982); Levins (2020). 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 Mehta  _et al._ (2019); Marsland III  _et al._
(2020). We expect the geometric pictures to hold when such a mapping to
constrained optimization exists, namely that the effective species-species
interactions are symmetric Marsland III  _et al._ (2020).

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 Posfai  _et al._ (2017).
Such constraints result in the violation of competitive exclusion and require
evolutionary fine tuning of preferences D’Andrea  _et al._ (2020); Pacciani-
Mori  _et al._ (2020). 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.

##  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 McGill  _et al._ (2006). 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 statistical physics can be used to make powerful predictions
Allesina and Tang (2015). Doing so will require understanding convex hulls of
randomly distributed points and represents an interesting mathematical problem
Litvak  _et al._ (2005). Another direction to explore is how this analysis can
be extended to consider ecosystems with multiple trophic layers Duffy  _et
al._ (2007) and to microbial ecosystems where metabolic cross-feeding plays a
central role Goldford  _et al._ (2018); Amarnath  _et al._ (2021); Dal Bello
_et al._ (2021). Additionally, we may be able to extend this picture to
understand temporal niches, which may play an important role in shaping
microbial ecosystems Amarnath  _et al._ (2021); Fridman  _et al._ (2022).

##  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.

##  Appendix A Details of models analyzed in figures

###  A.1 Two resource model

In all figures with two resources $(M=2)$, the MCRM differential equations are
simulated with five species $(S=5)$ and the following parameters:

$\displaystyle[c_{i\alpha}]=\left[\begin{array}[]{cc}0.7185&0.202\\\
0.2675&0.464\\\ 0.2325&0.812\\\ 0.599&0.577\\\ 0.4875&0.273\\\
\end{array}\right]$ (22) $\displaystyle m_{i}=1,\quad i=1,\dots,5$ (23)
$\displaystyle w_{\alpha}=1,\quad\alpha=1,2.$ (24)

The values of $c_{i\alpha}$ were chosen by-hand to make features of the PCH
clear. The various choices of $K_{\alpha}$ were also chosen by-hand to
highlight various coexistence cones; in figure 2,
$\mathbf{K}_{A}=(0.53,2.48),\mathbf{K}_{B}=(1.48,2.82),\mathbf{K}_{C}=(1.92,1.74),\mathbf{K}_{D}=(2.88,1.18),\mathbf{K}_{E}=(2.85,0.50)$;
in figure 6, $\mathbf{K}=(1.21,2.82)$. 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_{\alpha}(t=0)=K_{\alpha}$. 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 further details on
the plots and numerical solutions including code or to modify plotting
parameters, see the interactive demonstration.

###  A.2 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:

$\displaystyle[c_{i\alpha}]=\left[\begin{array}[]{ccc}0.416&0.023&0.17\\\
1.652&0.923&0.198\\\ 0.329&0.874&0.8\\\ 0.135&0.565&0.741\\\
0.226&0.173&1.109\\\ 0.069&0.616&1.262\\\ 0.424&0.777&1.394\\\
0.17&0.401&0.716\\\ 1.074&1.041&0.643\\\ 1.038&1.666&0.555\\\
0.184&0.926&1.029\\\ 0.588&2.077&0.163\\\ 1.466&0.881&0.144\\\
1.221&0.38&1.211\\\ 0.888&0.891&0.016\\\ 0.024&0.077&0.535\\\
1.131&0.534&0.465\\\ 0.797&1.337&1.49\\\ 0.914&0.988&0.716\\\
0.295&1.071&0.531\\\ \end{array}\right],$ (45) $\displaystyle m_{i}=1,\quad
i=1,\dots,20,$ (46) $\displaystyle w_{\alpha}=1,\quad\alpha=1,2,3.$ (47)

The values of $c_{i\alpha}$ were drawn as random variables $|X|$, where $X$ is
a unit normal random variable. The various choices of $K_{\alpha}$ were chosen
by-hand to highlight various coexistence cones; in figure 4, upper left:
$\mathbf{K}=(0.64,1.49,0.64)$, upper right: $\mathbf{K}=(0.94,1.00,0.55)$,
center: $\mathbf{K}=(0.81,1.04,0.57)$, bottom: $\mathbf{K}=(0.66,0.84,0.92)$;
in figure 10, upper left: $\boldsymbol{\kappa}=(0.58,1.87,0.53)$, upper right:
$\boldsymbol{\kappa}=(1.41,1.02,0.53)$, center:
$\boldsymbol{\kappa}=(0.94,1.21,0.69)$, bottom:
$\boldsymbol{\kappa}=(1.10,1.13,1.01)$. 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_{\alpha}=K_{\alpha}$. 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$.

###  A.3 Model with nonlinear growth rate

Figure 7 is constructed using the CRM,

$\displaystyle\frac{dR_{\alpha}}{dt}$
$\displaystyle=\tau^{-1}(K_{\alpha}-R_{\alpha})-\sum_{i=1}^{S}N_{i}R_{\alpha}\frac{e_{i}k_{i\alpha}\mu_{i\alpha}}{(k_{i\alpha}+R_{\alpha})^{2}},$
(48) $\displaystyle\frac{dN_{i}}{dt}$ $\displaystyle=N_{i}g_{i}(\mathbf{R}),$
(49)

which has nonlinear growth rate,

$\displaystyle
g_{i}(\mathbf{R})=e_{i}\sum_{\alpha=1}^{M}\frac{\mu_{i\alpha}R_{\alpha}}{k_{i\alpha}+R_{\alpha}}-m_{i}.$
(50)

In the figure, there are $M=2$ resources and $S=5$ species with parameters,

$\displaystyle[\mu_{i\alpha}]=\begin{bmatrix}2&0.5\\\ 0.5&2\\\ 1.5&1.5\\\
0.9&0.7\\\ 0.7&0.9\\\
\end{bmatrix},\quad[k_{i\alpha}]=\begin{bmatrix}2.03&0.54\\\ 0.54&2.05\\\
1.43&1.58\\\ 0.96&0.77\\\ 0.63&0.81\\\ \end{bmatrix},$ (51)
$\displaystyle[m_{i}]=\begin{bmatrix}1&1&1.1&1&1\end{bmatrix},\quad\tau=1,$
(52) $\displaystyle e_{i}=1,\quad i=1,\dots,5.$ (53)

###  A.4 Interactive demonstrations

Link to Mathematica notebooks on GitHub here. https://github.com/Emergent-
Behaviors-in-Biology/Geometry-of-Coexistence

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.

##  Appendix B Technical details of geometric construction

###  B.1 Resource depletion/defining the positive convex hull

Let $\\{\mathbf{C}_{i}\\}_{i=1}^{n}\in\mathbb{R}^{M}$ be a set of points with
components
$\mathbf{C}_{i}=\left[\begin{array}[]{ccccc}C_{i1}&\dots&C_{i\alpha}&\dots&C_{iM}\end{array}\right]^{\mathrm{T}}$
which are all non-negative: $C_{i\alpha}\geq 0$. If
$A\subseteq\\{1,\dots,M\\}$ is a subset of resources, let $P_{A}$ project a
vector $\mathbf{C}_{i}$ onto the coordinate axes $\alpha\in A$; that is,
$P_{A}(\mathbf{C}_{i})$ has the entries of $\mathbf{C}_{i}$ but with
$C_{i\alpha^{\prime}}=0$ for entries with indices $\alpha^{\prime}\notin A$.
The positive convex hull (PCH) is the convex hull of
$\cup_{i\in\\{1,\dots,S\\}}\cup_{A\in
2^{\\{1,\dots,M\\}}}P_{A}(\mathbf{C}_{i})$, the union of
$P_{A}(\mathbf{C}_{i})$ over all possible subsets $A$ of $\\{1,\dots,M\\}$ and
all species $i\in\\{1,\dots,S\\}$. The PCH is the convex hull of a total of
$S\times 2^{M}$ points in $\mathbb{R}^{M}$, including the origin. The PCH
occurs in this work because the concepts presented should be consistent when
any subset of resources is removed/depleted from the ecosystem. For an example
of this consistency under projection, see figure 8. The additional points
created by projection $P_{A}(\mathbf{C}_{i})$ could be 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.

###  B.2 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
$\mathbf{R}^{\star}$ are the steady-state resource abundances then a species
$i$ can survive if $\mathbf{C}_{i}\cdot\mathbf{R}^{\star}=1$.

When we form the positive convex hull (PCH) of
$\\{\mathbf{C}_{1},\dots,\mathbf{C}_{S}\\}$, every point $\mathbf{x}$ in the
positive orthant of $\mathbb{R}^{M}$ is contained in the conic hull of a face
of the PCH 111We use the 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.. If
$\mathbf{C}_{1},\dots,\mathbf{C}_{k},\dots,\mathbf{C}_{d}$ are the vertices of
the minimal face whose conic hull contains $\mathbf{x}$, then there are
$\beta_{k}>0$ so that $\mathbf{x}=\sum_{k=1}^{d}\beta_{k}\mathbf{C}_{k}$; note
that $\mathbf{C}_{k}$ may include consumption vectors that have been projected
onto a subset of axes, as in appendix B.1. If $\mathbf{x}$ is in the interior
of the PCH, then $\sum_{k=1}^{d}\beta_{k}<1$; if $\mathbf{x}$ is on the
boundary of the PCH, $\sum_{k=1}^{d}\beta_{k}=1$; and if $\mathbf{x}$ is
outside the PCH, $\sum_{k=1}^{d}\beta_{k}>1$.

Let $j=1,\ldots,S^{*}$ index the surviving species, so
$\mathbf{C}_{j}\cdot\mathbf{R}^{\star}=1$ for all choices of $j$. If
$\mathbf{x}=\sum_{j}\gamma_{j}\mathbf{C}_{j}$ with $\gamma_{j}\geq 0$ and
$\sum_{j}\gamma_{j}=1$ (i.e., $\mathbf{x}$ is a convex combination of
$\mathbf{C}_{j}$), then
$\left(\sum_{j}\gamma_{j}\mathbf{C}_{j}\right)\cdot\mathbf{R}^{\star}=\sum_{j}\gamma_{j}=1$.
Now, let $\mathbf{x}=\sum_{k=1}^{d}\beta_{k}\mathbf{C}_{k}$ where
$\beta_{k}>0$ are the minimal face conic hull coordinates like before; because
$\mathbf{C}_{i}\cdot\mathbf{R}^{\star}\leq 1$ for all species $i$, if
$\mathbf{x}$ is in the interior of the PCH,
$\mathbf{x}\cdot\mathbf{R}^{\star}=\sum_{k}\beta_{k}\mathbf{C}_{k}\cdot\mathbf{R}^{\star}\leq\sum_{k}\beta_{k}<1$.
Therefore, $\mathbf{x}\cdot\mathbf{R}^{\star}=1$ implies that $\mathbf{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 $\mathbf{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 $\mathbf{R}^{\star}$ (although it may not be unique if the number
of surviving species is less than $M$) so that
$\mathbf{C}_{j}\cdot\mathbf{R}^{\star}=1$ for all $j$ and
$\mathbf{C}_{k}\cdot\mathbf{R}^{\star}<1$ for $k\neq j$. We can guarantee
there is a choice of $\mathbf{R}^{\star}$ so that
$\mathbf{C}_{j}\cdot\mathbf{R}^{\star}=1$ because in $\mathbb{R}^{M}$, there
is always an intersection of at most $M$ hyperplanes which are not parallel.
We then know that $\mathbf{R}^{\star}$ satisfies
$\mathbf{C}_{k}\cdot\mathbf{R}^{\star}<1$ for $k\neq j$ because, following
similar logic from before, if $\mathbf{C}_{k}\cdot\mathbf{R}^{\star}\geq 1$,
then we should be able to form any non-trivial convex combination of
$\mathbf{C}_{k}$ and $\mathbf{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
$\mathbf{K}=\mathbf{R}^{\star}+\sum_{j}\mathbf{c}_{j}$ will then lead to all
species $j$ surviving.

In this argument, we assumed that there are no $\mathbf{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 $\mathbf{C}_{i}$ that belong to the face which
contains all other sub-faces—whether the $\mathbf{C}_{i}$ are vertices are
not—represent 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 $\|\mathbf{C}_{i}\|$ is a
random variable with non-zero variance), no faces of the PCH are parallel and
no $\mathbf{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.

##  Appendix C Analysis of alternative Consumer Resource Models

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, $\kappa_{\alpha}$.

###  C.1 Geometric interpretation of Consumer Resource Models with externally-
supplied resources

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. 8).

When considering the externally-supplied resources model, the differential
equation for resource dynamics can be written as,

$\displaystyle\frac{dR_{\alpha}}{dt}=R_{\alpha}\left(\frac{1}{R_{\alpha}}(\kappa_{\alpha}-R_{\alpha})-\sum_{i=1}^{S}N_{i}c_{i\alpha}\right),$
(54)

for non-depleted resources $\alpha$, allowing for an equation similar to eq.
3:

$\displaystyle\boldsymbol{\kappa}-\mathbf{R}^{\star}=\sum_{i,N_{i}>0}N_{i}\mathbf{R}^{\star}\odot\mathbf{c}_{i}.$
(55)

This equation defines the coexistence cones. The structure of coexisting
species, identically to the MCRM, is determined by the sign of
$g_{i}(\mathbf{R}^{\star})$ for each species. As the form of $g_{i}$ is the
same for the eCRM and MCRM and as $\kappa_{\alpha}$ being non-negative implies
$R_{\alpha}$ 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.

Figure 11: Convex polytope enumerating coexisting species for the Tilman
Consumer Resource Model. Left: resource-abundance phase space, with
$\mathbf{K}$, $\mathbf{R}^{\star}$, and the trajectory $\mathbf{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
$\\{\mathbf{C}_{i}\\}_{i=1}^{S}\cup\\{\mathbf{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.

###  C.2 Geometric Interpretation of the Tilman Consumer Resource Model

For the TCRM, resource abundances can become nonphysically negative and
instead of the subsets of stably-coexisting 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
$\\{\mathbf{C}_{i}\\}_{i=1}^{S}\cup\\{\mathbf{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_{\alpha}$ in the TCRM equation for
resources (e.q., 7), so it is not necessary to add additional points
corresponding 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.

## References

  * Chase and Leibold (2009) J. M. Chase and M. A. Leibold,  _Ecological niches: linking classical and contemporary approaches_ (University of Chicago Press, 2009).
  * Tilman (1982) D. Tilman,  _Resource competition and community structure_ (Princeton university press, 1982).
  * Levins (2020) R. Levins, in  _Evolution in Changing Environments_ (Princeton University Press, 2020).
  * MacArthur and Levins (1967) R. MacArthur and R. Levins, The American Naturalist 101, 377 (1967).
  * Armstrong and McGehee (1980) R. A. Armstrong and R. McGehee, The American Naturalist 115, 151 (1980).
  * MacArthur (1969) R. MacArthur, Proceedings of the National Academy of Sciences 64, 1369 (1969).
  * Levin (1970) S. A. Levin, The American Naturalist 104, 413 (1970).
  * MacArthur (1970) R. MacArthur, Theoretical population biology 1, 1 (1970).
  * Chesson (1990) P. Chesson, Theoretical Population Biology 37, 26 (1990).
  * Tikhonov and Monasson (2017) M. Tikhonov and R. Monasson, Physical review letters 118, 048103 (2017).
  * Cui  _et al._ (2020a) W. Cui, R. Marsland III, and P. Mehta, Physical review letters 125, 048101 (2020a).
  * Cui  _et al._ (2021) W. Cui, R. Marsland III, and P. Mehta, Physical Review E 104, 034416 (2021).
  * Goldford  _et al._ (2018) J. E. Goldford, N. Lu, D. Bajić, S. Estrela, M. Tikhonov, A. Sanchez-Gorostiaga, D. Segrè, P. Mehta, and A. Sanchez, Science 361, 469 (2018).
  * Marsland III  _et al._ (2019) R. Marsland III, W. Cui, J. Goldford, A. Sanchez, K. Korolev, and P. Mehta, PLoS computational biology 15, e1006793 (2019).
  * Niehaus  _et al._ (2019) L. Niehaus, I. Boland, M. Liu, K. Chen, D. Fu, C. Henckel, K. Chaung, S. E. Miranda, S. Dyckman, M. Crum, _et al._ , Nature communications 10, 1 (2019).
  * Muscarella and O’Dwyer (2020) M. E. Muscarella and J. P. O’Dwyer, Theoretical Ecology 13, 503 (2020).
  * Bajic and Sanchez (2020) D. Bajic and A. Sanchez, Current opinion in biotechnology 62, 123 (2020).
  * Gowda  _et al._ (2022) K. Gowda, D. Ping, M. Mani, and S. Kuehn, Cell 185, 530 (2022).
  * D’Andrea  _et al._ (2020) R. D’Andrea, T. Gibbs, and J. P. O’Dwyer, PLoS computational biology 16, e1008102 (2020).
  * Posfai  _et al._ (2017) A. Posfai, T. Taillefumier, and N. S. Wingreen, Physical review letters 118, 028103 (2017).
  * Li  _et al._ (2020) Z. Li, B. Liu, S. H.-J. Li, C. G. King, Z. Gitai, and N. S. Wingreen, PLoS computational biology 16, e1008156 (2020).
  * Good  _et al._ (2018) B. H. Good, S. Martis, and O. Hallatschek, Proceedings of the National Academy of Sciences 115, E10407 (2018).
  * Caetano  _et al._ (2021) R. Caetano, Y. Ispolatov, and M. Doebeli, Elife 10, e67764 (2021).
  * Tikhonov  _et al._ (2020) M. Tikhonov, S. Kachru, and D. S. Fisher, Proceedings of the National Academy of Sciences 117, 8934 (2020).
  * Goyal  _et al._ (2022) A. Goyal, L. S. Bittleston, G. E. Leventhal, L. Lu, and O. X. Cordero, Elife 11, e74987 (2022).
  * Chang  _et al._ (2021) C.-Y. Chang, J. C. Vila, M. Bender, R. Li, M. C. Mankowski, M. Bassette, J. Borden, S. Golfier, P. G. L. Sanchez, R. Waymack, _et al._ , Nature ecology & evolution 5, 1011 (2021).
  * Xie  _et al._ (2019) L. Xie, A. E. Yuan, and W. Shou, PLoS biology 17, e3000295 (2019).
  * Sanchez  _et al._ (2022) A. Sanchez, D. Bajic, J. Diaz-Colunga, A. Skwara, J. C. Vila, and S. Kuehn, (2022).
  * Leibold (1996) M. A. Leibold, The American Naturalist 147, 784 (1996).
  * Levins (1966) R. Levins, American scientist 54, 421 (1966).
  * Tilman (2020) D. Tilman, in  _Resource Competition and Community Structure.(MPB-17), Volume 17_ (Princeton university press, 2020).
  * Cui  _et al._ (2020b) W. Cui, R. Marsland III, and P. Mehta, Physical Review Letters 125, 048101 (2020b).
  * Pacciani-Mori  _et al._ (2020) L. Pacciani-Mori, A. Giometto, S. Suweis, and A. Maritan, PLoS computational biology 16, e1007896 (2020).
  * Mehta  _et al._ (2019) P. Mehta, W. Cui, C.-H. Wang, and R. Marsland III, Physical Review E 99, 052111 (2019).
  * Marsland III  _et al._ (2020) R. Marsland III, W. Cui, and P. Mehta, The American Naturalist 196, 291 (2020).
  * Blekherman  _et al._ (2012) G. Blekherman, P. A. Parrilo, and R. R. Thomas,  _Semidefinite optimization and convex algebraic geometry_ (SIAM, 2012).
  * McGill  _et al._ (2006) B. J. McGill, B. J. Enquist, E. Weiher, and M. Westoby, Trends in ecology & evolution 21, 178 (2006).
  * Allesina and Tang (2015) S. Allesina and S. Tang, Population Ecology 57, 63 (2015).
  * Litvak  _et al._ (2005) A. E. Litvak, A. Pajor, M. Rudelson, and N. Tomczak-Jaegermann, Advances in Mathematics 195, 491 (2005).
  * Duffy  _et al._ (2007) J. E. Duffy, B. J. Cardinale, K. E. France, P. B. McIntyre, E. Thébault, and M. Loreau, Ecology letters 10, 522 (2007).
  * Amarnath  _et al._ (2021) K. Amarnath, A. V. Narla, S. Pontrelli, J. Dong, T. Caglar, B. R. Taylor, J. Schwartzman, U. Sauer, O. X. Cordero, and T. Hwa, bioRxiv , 2021 (2021).
  * Dal Bello  _et al._ (2021) M. Dal Bello, H. Lee, A. Goyal, and J. Gore, Nature Ecology & Evolution 5, 1424 (2021).
  * Fridman  _et al._ (2022) Y. Fridman, Z. Wang, S. Maslov, and A. Goyal, PLoS computational biology 18, e1010244 (2022).
  * Note (1) We use the 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.