Skip to main content

Thank you for visiting nature.com. You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

Stability criteria for complex microbial communities

Abstract

Competition and mutualism are inevitable processes in microbial ecology, and a central question is which and how many taxa will persist in the face of these interactions. Ecological theory has demonstrated that when direct, pairwise interactions among a group of species are too numerous, or too strong, then the coexistence of these species will be unstable to any slight perturbation. Here, we refine and to some extent overturn that understanding, by considering explicitly the resources that microbes consume and produce. In contrast to more complex organisms, microbial cells consume primarily abiotic resources, and mutualistic interactions are often mediated through the mechanism of crossfeeding. We show that if microbes consume, but do not produce resources, then any positive equilibrium will always be stable to small perturbations. We go on to show that in the presence of crossfeeding, stability is no longer guaranteed. However, positive equilibria remain stable whenever mutualistic interactions are either sufficiently weak, or when all pairs of taxa reciprocate each other’s assistance.

Introduction

Early ecological intuition suggested that tightly woven networks of interactions would lead to more stable and robust communities1,2,3. But this intuition was later overthrown by the realization that large, complex, interacting systems will tend to become unstable to small perturbations once either the number or strength of interactions passes a certain threshold4,5. These original analyses were based on the strength and type of interactions between pairs of species, and initially pertained to random mixtures of interaction types, including predation, competition, and mutualism. More recently, similar results were derived for purely competitive interactions among a group of species, with the same bottom line: if pairwise competitive interactions are too numerous, or too strong, then any equilibrium of coexisting, competing species will be unstable6.

In parallel, theory had also been developed for groups of species consuming a set of distinct resources3,7,8,9,10,11,12. In these models, the resources actually being competed for are treated explicitly. Typically these models make several simplifying assumptions, including the timescales on which resources are replenished, and the way that consumer preferences differ. Some treat resources as biological organisms, with the capacity to grow and compete among themselves7,13, while others consider abiotic resources, which are replenished from outside the system14. Microbial communities composed of bacterial or archael cells provide an example of an ecological system where we can (almost) unambiguously separate the component parts into biological organisms and abiotic resources, where by abiotic we mean resources that are not capable of reproduction on their own. Even though a rich range of metabolites exchanged by microbial communities are of biological origin, we count these as abiotic for this reason. Direct predatory interactions among bacteria are somewhat rare15, while consumption and production of abiotic resources likely mediates much of microbial competition (via resource scarcity16) and mutalism (via crossfeeding17), suggesting that a consumer–producer–resource framework will provide a more general and appropriate framework for microbial interactions than direct, pairwise interactions. However, the broad-ranging properties of such large systems of consumers, producers, and abiotic resources are under-explored.

With these motivations in mind, we present a model of consumers that compete for a set of dynamical, abiotic resources, governed by a set of preferences for those resources, an influx rate for resource replenishment, and a mortality rate for consumers. We will prove that any positive densities of consumers and resources can be an equilibrium solution in our model, with no finite limit to the similarity of consumers. Moreover, in contrast to results for pairwise competition, these equilibria are always stable to small perturbations, so long as there are at least as many resources as consumers. We place no specific constraint on the set of preferences of consumers for resources to obtain this result—in other words, we do not need to assume a particular functional form (neither random, modular, or highly structured in some other way). For a fixed set of preferences of consumers for resources, we also use this model to examine the range of influx and mortality rates that lead to stable coexistence. We find that pairwise species similarity alone is not sufficient to determine the size of this range, thus clarifying and refining the classical expectation of limiting similarity in this context3,9,18,19.

Finally, we extend our model to include production of resources. Mutualistic pairwise interactions have been found to push communities closer to instability6, leading to a debate over how widespread mutualistic interactions can reasonably be in microbial communities20,21. We introduce a model for the exchange of resources, where microbes can both consume and now also produce resources, and choose a form for these equations that is interpretable as either a species-specific leakage of resources, or as a kind of recycling of biomass following mortality. In this model, we find a similar result in our consumer–producer–resource system, and for a range of cases bound the possible strength and prevalence of resource production. On the other hand, we find that if mutualistic interactions are completely symmetric, then stability is again guaranteed for feasible equilibria, a result at odds with earlier pairwise analyses.

Results

Model of competition for abiotic resources

Our model for consumers and resources is defined in terms of competition for substitutable resources:

$$\left\{ {\begin{array}{*{20}{c}} \begin{array}{lcl}\dot R_i\hskip-0.6pc &=&\hskip-0.6pc \rho _i - R_i\mathop {\sum}\limits_j {\kern 1pt} C_{ij}S_j,\\ \dot S_i\hskip-0.6pc &=&\hskip-0.6pc \epsilon S_i\mathop {\sum}\limits_j {\kern 1pt} C_{ij}^TR_j - \mu _iS_i.\end{array} \end{array}} \right.$$
(1)

Here, i can take any value from 1 to N, the Ri represent a set of N resources, while the Si are a set of N consumers, and the nonnegative quantity Cij is the rate of consumption of resource i by consumer j, per unit consumer and resource. ρi and μj represent influx rates for resource i and mortality rate for consumer j, respectively, while ϵ is a free parameter characterizing the efficiency with which consumers convert resources into biomass. We could include an outflow, or leaching rate −ηiRi for resources14, though here we assume that consumption is sufficiently fast that this rate will be negligible (and moreover our results below for local stability are unchanged even when this outflow is incorporated). We also note that we could straightforwardly generalize these equations to include more general functional responses22 (for example it would be perfectly reasonable to consider a Monod-type form for the uptake rate of resources). However, we consider solely the mass action terms above in the spirit of the vast range of Lotka–Volterra analyses undertaken for pairwise interactions: if we can understand the properties of these idealized communities, we then have a baseline on which to layer further biological complexity.

Finally, we note that this is a model for substitutable resources, and while there may be families of resources which are to some extent substitutable (for example different carbon sources) the general picture for microbial consumers is likely colimitation by multiple, qualitatively different types of resource14,23,24. In many cases, we might expect that only one of these resources is actually rate-limiting (roughly, the rarest in a given environmental context), and this assumption leads to Liebig’s law of the minimum25, where growth rate of a consumer depends only on this single resource. In other circumstances, two or more resources may turn out to be limiting in any given environmental context, in which case growth rate has typically has been modeled as proportional to the product of these limiting resources, and termed multiplicative colimitation24. Beyond these phenomenological approximations of colimitation, there might be still more general functional dependencies26. Taking these possibilities into account, our analysis of substitutable resource consumption and production here may be seen as a starting point for these more general cases, and a good approximation for circumstances where a single ‘type’ or family of resources is rate-limiting.

The consumer–resource system represented by (1) has a set of equilibrium solutions

$$\left\{ {\begin{array}{*{20}{c}} \begin{array}{lcl}\vec R^ \ast \hskip-0.6pc &=&\hskip -0.6pc \left( {C^T} \right)^{ - 1}\frac{1}{\epsilon }(\vec \mu ),\\ \vec S^ \ast \hskip-0.6pc &=&\hskip-0.6pc \left[ {\left( {\vec R_{{\mathrm{diag}}}^ \ast } \right)C} \right]^{ - 1}\vec \rho .\end{array} \end{array}} \right.$$
(2)

where \(\vec R_{{\mathrm{diag}}}^ \ast\) denotes a diagonal matrix with the components of \(\vec R^ \ast\) along the diagonal. The only biologically reasonable solutions are those with positive densities of consumers and resources, known as feasible solutions27. For our model, for any positive \(\left\{ {\vec R^ \ast ,\vec S^ \ast } \right\}\), there are always positive influx and mortality rates \(\vec \rho\) and \(\vec \mu\) that result in these feasible solutions, independent of the form of the matrix C (our Methods Section details the proof of this statement). In other words, any feasible set of densities can be a solution of our equations, for an appropriate set of influx and mortality rates defining the environmental context. We now present two results. First, we will show that feasible solutions are stable to small perturbations. Then we will consider what range of parameter values for ρi and μi will lead to such feasible solutions.

Feasibility and stability under competitive interactions

We now demonstrate a departure from earlier results for pairwise competiton between species6: any and all of these feasible solutions are guaranteed to be stable to small perturbations. The Jacobian matrix corresponding to the equilibrium solutions given by (2) is

(3)

If all the eigenvalues of this Jacobian have negative real part, then this equilibrium is locally stable. In our Methods Section, we show that for a feasible solution (i.e., an equilibrium with positive abundances) this equilibrium is guaranteed to be stable to local perturbations, independent of the form of the matrix C, implying that competition alone in systems of consumers and resources is never sufficient to lead to an unstable, feasible equilibrium. We illustrate this (along with the full distribution of eigenvalues) for some example cases in Fig. 1. These plots demonstrate visually the form of the spectrum across a range of cases (both generalist and specialist consumers, and ordered and unordered resources). Beyond the fact that the largest eigenvalue always has negative real part, as our results state, we also note that the spectra have a characteristic ‘dragonfly’ form. The wings of the dragonfly will lead to the potential for oscillatory behavior around this equilibrium, while the typically large density of real eigenvalues near zero imply that some types of perturbation away from these equilibria will have long relaxation times.

Fig. 1
figure1

Positive equilibria are guaranteed to be stable under competition for abiotic resources. We show four examples demonstrating feasible solutions of (1) that are stable to small perturbations. Plots show the density (colored from red to blue) of eigenvalues for the Jacobian matrix at this equilibrium, defined using a fixed matrix of consumer preferences. The form of the consumer preferences is shown inset in blue, where each row represents a distinct resource, each column represents a distinct consumer, and darker blue indicates a higher rate of consumption. Each plot is obtained over multiple random draw for consumer and resource densities, drawn from a uniform distribution. In the left-hand panels, we consider a gradient from near-specialism, where each consumer has a favorite resource (but there are weak, randomly-drawn off-diagonal interactions), to near-generalism, where the off-diagonal preferences are stronger than the specialism. In the right-hand panels, we show a similar gradient of near-specialism to near-generalism, but where the resource preferences follow a smooth curve away from the preferred resource for each species. Both left- and right-hand panels therefore show a gradient from generalism to specialism, but the right-hand case assumes that there is an unambigious spectrum of similarity for resources, and that species that can consume a given resource also tend to consume similar resources. In all four cases, our theorem for local stability holds: the real parts of all eigenvalues of the Jacobian matrix are always negative. We also note the similarity in the ‘dragonfly’ shape for this distribution across all cases, contrasting with the classic circle (or elliptical) distributions for eigenvalues found in the case of pairwise interactions6, but similar to the distribution of eigenvalues found for bipartite Lotka–Volterra equilibria39

We now note several important generalizations. First, including the leaching or degredation of resources, which would ensure that resources would saturate even in the absence of consumers, does not change the form of this matrix or the result that feasibility implies stability. Second, we have so far considered equal numbers of resources and consumers. We can generalize this result to incorporate uinequal numbers of resources and consumers, NR and NS, and in our Methods Section we show that feasibility only implies stability in this case if NR ≥ NS, mirroring the classical expectation that coexistence of NS species will require at least that number of resources. Finally, we generalize this result to the case where one or more consumer has zero abundance. In our Methods Section we show that the remaining group of consumers (those with positive abundances) will coexist stably so long as the equilibrium is uninvasible by any of the extirpated consumers.

These results bear comparison with earlier calculations for the stability of systems of biotic consumers and biotic resources13,28. In these systems, resources themselves can grow and compete with each other, and can be eaten by the consumers. When treated as a set of Lotka–Volterra equations, in those cases feasibility also implies stability. The similarity with our results suggests that the horizontal structure here (i.e., a clear division of the system into consumers and resources) is key element for the local stability guarantee to hold. In large systems of consumers and biotic resources it might be seen as artificial to completely separate consumers and resources into two groups. On the other hand, in microbial systems with a clear biological distinction between abiotic resources and biotic consumers, this separation is very natural, and so our result applies unambiguously and generally.

Structural stability under competitive interactions

We now ask what range of values of \(\vec \mu\) and \(\vec \rho\) will lead to positive, feasible solutions for consumer and resource densities, for a given fixed set of preferences for resources, C. The volume of this parameter space is known as the structural stability of a given system29, and biologically it quantifies the robustness of equilibria. Suppose that the environmental context in which a group of species coexist shifts over time, and this shift affects \(\vec \mu\) and \(\vec \rho\). Then structural stability characterizes how likely it will be that the same species will continue to coexist in this new environmental context. In our Methods Section we derive results for the volume of \(\vec \mu\) and \(\vec \rho\) values that will lead to feasible solutions, for a given matrix C. For example, in the case of mortality rates, this volume is given by

$$V_\mu = 2\frac{{\left| {{\mathrm{det}}{\kern 1pt} C} \right|}}{{\pi ^{\frac{n}{2}}}}{\int}_{{\Bbb R}_ + ^n} e^{ - \left\langle {\xi ,C^TC\xi } \right\rangle }{\mathrm{d}}\xi,$$
(4)

where det C is the determinant of the matrix C and the angled brackets define the usual dot product. This contrasts with what perhaps might be the intuitive determinant of structural stability—something like the average of pairwise species similarity (say, defined in terms of the overlaps of two consumers’ preferences). In contrast, the determinant here does not depend in a simple way on the similarity of any two species—structural stability depends on C as a whole, rather than being a function just of pairwise similarities.

We can still ask how this volume changes as we make consumers more or less similar in terms of the resources they use, represented mathematically by the inner product of the columns of C. For example, in the special case where all species begin equally similar, then a uniform decrease in their similarity leads to a larger volume for the parameter space, and greater structural stability (detailed in Methods). This is in agreement with the ecological intuition that it is ‘easier’ for more dissimilar species to coexist. However, this is not the general case. Independent of the size of the system, there are some contexts where a decrease in the similarity of any pair of species will lead to less, not greater, structural stability. Figure 2 shows a specific example, for three species, where a decrease in the similarity of one pair of species (while keeping other pairwise similarities fixed) leads to a decrease in structural similarity. What is the general lesson here? The biological interpretation is that changes in structural stability as we change the similarity of any two species depend (in general) on all of the other consumption preferences. This reiterates our point above, that the determinant in Vμ does not depend in a trivial way on pairwise comparisons, and consequently the structural stability of systems of consumers and abiotic resources does not depend in a simple way on pairwise species similaritities expressed in terms of consumption preferences.

Fig. 2
figure2

Structural stability changes non-monotonically with species similarity. The volume of the set of mortality rates leading to feasible densities for the resources, R*, can decrease even when species similarity is decreased. Here, we show an example in three dimensions, where each axis represents one of the three mortality rates, μi, and the volume is a kind of wedge extending from the origin outwards. The measure, Vμ, of the size of this volume is then equivalent to the area (colored green or blue) of a triangle on the surface of the unit sphere, where the dissimilarity of each pair of species is proportional to the length of one of the triangle’s sides. On the left, this volume is shown for the particular 3 × 3 matrix CT detailed in our Methods section, and is colored green. When the angle between one pair of column vectors is increased while the other angles are unchanged, we get the volume shown on the right-hand side. The resulting volume decreases in size, despite the average similarity of these three species having decreased

Model of consumption and exchange of resources

Microbial taxa that can both consume and also produce resources have the potential for mutualistic, syntrophic interactions6,20,30. For this reason we now consider a more general set of dynamics for species and resources, which includes a matrix, C, representing the resource use of the consumers and a nonnegative matrix, P, representing the production of resources by the consumers:

$$\left\{ {\begin{array}{*{20}{c}} \begin{array}{lcl}\dot R_i \hskip-0.6pc &=&\hskip-0.6pc \rho _i - R_i\mathop {\sum}\nolimits_j {\kern 1pt} C_{ij}S_j + \mathop {\sum}\nolimits_j P_{ij}S_j,\\ \dot S_i \hskip-0.6pc &=&\hskip-0.6pc \epsilon S_i\mathop {\sum}\nolimits_j {\kern 1pt} C_{ij}^TR_j - S_i\mathop {\sum}\nolimits_j {\kern 1pt} P_{ij}^T - \mu _iS_i.\end{array} \end{array}} \right.$$
(5)

Our approach again makes use of mass action principles, and we note that we consider production of resources to remove biomass from the consumer density, meaning that terms corresponding to this leakage appear in both equations. We have also chosen a form for production that depends solely on the density of species that are present in the system, and not on what resources those species are using to grow. This may be a reasonable approximation for some processes, for example the production of various intermediates of the TCA cycle, the production of which are not substrate dependent31. But in other cases, we may need to allow for a more general form for production that depends both on the species that are present, and the specific resources they are consuming. Another interpretation of the same terms would be as a kind of recycling—where mortality does not just remove consumers from the system, but also returns some portion of their biomass to the common resource pool.

We now consider the properties of the equilibrium solutions

$$\left\{ {\begin{array}{*{20}{c}} \begin{array}{l}\vec R^ \ast = \left( {C^T} \right)^{ - 1}\frac{1}{\epsilon }\left( {P^T\vec 1 + \vec \mu } \right),\\ \vec S^ \ast = \left[ {\left( {R_{{\mathrm{diag}}}^ \ast } \right)C - P} \right]^{ - 1}\vec \rho .\end{array} \end{array}} \right.$$
(6)

which have a correspondingly more general Jacobian matrix

(7)

For this system, when the production matrix is nonzero, we do not know in general what additional constraints beyond feasibility are needed to ensure a stable equilibrium. However, we present evidence below that suggests production rates must in general be bounded for feasible solutions to also be locally stable. Conversely, we also show that there are some cases in which production rates can be arbitrarily large and local stability will still hold.

Feasibility and reciprocity guarantee local stability

To explore this, we consider the case of specialist consumers, C = cI, i.e., where each consumer specializes on just a single resource. We also tune the influx and mortality rates so that equilbrium species abundances and resource densities take the simplified form \(\vec S^ \ast = s\vec 1\), and \(\vec R^ \ast = r\vec 1\), for positive real values s and r. While this may seem restrictive, in that competition is solely intraspecific, we put no other restrictions on the production rates, Pij. Hence, we can think of this as close to the most general case of purely mutualistic interspecific interactions. In our Methods Section we express constraints on the production matrix to ensure that it is possible to obtain these feasible solutions. We then go on to prove that a sufficient (though not necessary) condition for feasible solutions to also be stable is

$$\begin{array}{*{20}{l}} {\left( {\mathop {\sum}\limits_{j \ne i} {\kern 1pt} P_{ij}} \right)^2 < \frac{{cs}}{\epsilon }\left( {cr - P_{ii} - \frac{{cs}}{{4\epsilon }}} \right)}. \hfill \end{array}$$
(8)

This result is straightforward to interpret. Suppose that consumers do not produce any of the resource that they specialize on, so that Pii vanishes. Then this result constrains a combination of the strength and prevalence of production of the ‘off-diagonal’ resources for each species in terms of consumption rate, c, conversion efficiency, \(\epsilon\), and the equilibrium abundances and densities s and r of consumers and resources. These results are reminiscent of constraints on stability for randomly drawn, pairwise interactions between species. In that case, mutualistic interactions tend to be more destabilizing than competitive interactions. Are we just recapitulating results that are qualitatively already understood via pairwise interactions? We emphasize that here our bound is sufficient, but not necessary for feasibility to imply stability, and there are cases where the bound above is not necessary for stability. One example is when production vanishes altogether, and we are back to our earlier, more general result that feasibility always implies stability.

A second example is when the production matrix is purely symmetric. In this case, feasibility alone is sufficient to guarantee local stability of the equilibrium solution, with no further restrictions on production. We call this case reciprocal, because symmetry of P ensures that each (specialized) consumer gives exactly as much of each other consumer’s preferred resource as they receive from that consumer. Figure 3 demonstrates this for some particular examples. The importance of reciprocity for stability seemingly contrasts with analysis of mutualistic interactions using direct interactions between species—for example in the case of plant-pollinator networks32. In these highly structured communities, it was found that strong effects of plants on pollinators (or vice versa) must come with weak interactions of pollinators on plants, or else the resulting community equilibrium would tend to be unstable. Even though these communities differ from the random interactions considered by ref. 6 and others, the same principle lies behind these results: if overall interaction strengths exceed a bound determined by intraspecific regulation, then a positive equilibrium can be unstable. In ref. 32, this bound means that stability requires a balance of strong and weak interactions, leading to asymmetry, rather than reciprocity. Our finding that the asymmetry in mutualistic interactions can be destabilizing rather than stabilizing demonstrates the quite different insights to be gained from the analysis of consumer–producer–resource communities.

Fig. 3
figure3

Positive equilibria are guaranteed to be stable if exchange of resources is reciprocal. We show two examples demonstrating feasible solutions of (5). Plots show the density (colored from red to blue) of eigenvalues for the Jacobian matrix at this equilibrium, defined using a fixed, diagonal matrix of consumer preferences. This is shown inset in blue, where each row represents a distinct resource and each column represents a distinct consumer; blue squares indicates a nonzero rate of consumption. We also consider a fixed, more general matrix of production rates (inset in green). Again, each row represents a distinct resource, each column represents a distinct consumer, and darker green indicates a higher rate of production. Each plot is obtained over multiple random draws for consumer and resource densities s and r, defined in the main text, and drawn from a uniform distribution (subject to the constraints necessary to ensure that these densities can be obtained with positive influx and mortality rates ρ and μ). In the left-hand panel, we consider a random set of production rates, which does not satisfy the bound necessary to guarantee stability, and indeed we see that there are some positive eigenvalues of the Jacobian matrix, to the right of the black dashed line. In the right-hand panel, we show a similar case but where we impose that the production matrix P is symmetric, meaning that each consumer gets as much of its favored resource as it gives. Even though the production matrix looks ‘similar’ to the naked eye in each case, this symmetry in the latter example is enough to guarantee local stability, with the largest eigenvalue bounded away from zero by a gap related to the consumer abundances

Discussion

We have modeled the interactions among biological populations that can consume, produce, and reproduce; and abiotic resources that can be introduced, leached, consumed, or produced, but do not reproduce. Perhaps more than any other biological system, this clear division is likely to be a good approximation in bacterial and archaeal communities, and may provide a more accurate description than modeling pairwise competitive and mutualistic interactions, which ignore the dynamics of resources. We revisit a series of classic analyses for ecological communities in this framework, and identify important differences with earlier theoretical results arising from direct, pairwise interactions. First, we find that any positive densities for consumers and resources can be an equilibrium solution to our equations, given an appropriate environmental context. We also find that these feasible solutions are always locally stable, unlike the classical results for pairwise interactions between species, which allow for unstable, feasible solutions5,6 unless particular restrictions are placed on species interactions27,33.

For systems of consumers and resources, we derived results for structural stability given a set of consumer preferences, a measure of robustness to environmental changes. In contrast to the classical expectation, we showed that structural stability is not guaranteed to increase as species become more dissimilar in terms of their resource preferences, echoing other recent work showing the complexity of structural stability for direct, pairwise interactions27,33. Our results clarify how this more general picture plays out when resource dynamics are modeled explicitly. Finally, we extended our approach to include the production of resources, which allows for mutualistic interactions via crossfeeding, where one species may produce a resource that another needs. In this case, we find that when production is too large, feasible solutions no longer guarantee local stability. But we also find that when mutualistic interactions are precisely balanced, that stability again is guaranteed. If species reciprocate with each other cooperatively, positive equilibria will be locally stable.

There are several opportunities for the extension of our results: including the consideration of more complex functional responses22,34 allowing for the saturation of resource usage or multi-way interactions; demographic or environmental stochasticity with (for example) their effects on local extirpation of resources or consumers35; and extending the more general analyses of global stability that have been developed in the case of Lotka–Volterra competition and mutualism13,36 to this system of consumers and abiotic resources. We also do not rule out that direct, pairwise interactions are likely to play a role (perhaps as an approximation to antagonistic interactions mediated by antiobiotic production, or even in rare cases direct cannibalism of microbial cells by each other), and clearly more general forms of colimitation and production are both possible and likely relevant in real communities. Finally, in the cases we have analyzed, we have been able to prove that there are circumstances when feasibility implies stability. But even in these cases, there is more to investigate in terms of the form of the eigenvalue spectrum. Exact or approximate solutions for the full spectrum, including what controls its overall shape and the size of its largest eigenvalues, will shed light on the dynamics near equilibrium.

In summary, our results reflect a general lesson. In any complex ecological system we inevitably draw lines around what we choose to model, and what we leave out. Our results here show that explicitly modeling the resources that mediate interactions between biological organisms can significantly alter our conclusions regarding stability, and hence what kinds of community structure we can expect to observe in nature.

Methods

Feasibility of solutions

For any solution for \(\vec R^ \ast\) and \(\vec S^ \ast\) with positive consumer and resource densities, we can identify positive-valued influx and mortality rates that will lead to these solutions as follows:

$$\left\{ {\begin{array}{*{20}{c}} \begin{array}{lcl}\vec \mu \hskip-0.6pc &=&\hskip-0.4pc \epsilon _{{\mathrm{diag}}}C^T\vec R^ \ast, \\ \vec \rho \hskip-0.6pc &=&\hskip-0.8pc \vec R_{{\mathrm{diag}}}^ \ast C\vec S^ \ast. \end{array} \end{array}} \right.$$
(9)

Because C is positive, any positive \(\vec R^ \ast\) will result in \(\vec \mu \ > \ 0\). And if \(\vec S^ \ast\) is positive, \(\vec \rho \,> \, 0\). Thus for appropriate choice of parameters, any positive \(\left\{ {\vec R^ \ast ,\vec S^ \ast } \right\}\) can be found as a solution to Eq. (1) in the main text.

Stability of feasible equilibria for competition

The Jacobian matrix corresponding to the equilibrium solutions given by Eq. (2) in the main text is

(10)

If all the real parts of the eigenvalues of this Jacobian are negative, then this equilibrium is locally stable. To compute these eigenvalues, we first note that the eigenvalue equation det(L − λI) = 0 is given by

(11)

Next, we note that \(\left[ {\left[ { - C\vec S^ \ast } \right]_{{\mathrm{diag}}} - \lambda I} \right]\) is invertible, so long as λ is not an eigenvalue of \(\left[ { - C\vec S^ \ast } \right]_{{\mathrm{diag}}}\). If it is an eigenvalue, then for nonnegative, invertible C and positive \(\vec S^ \ast\), the entries of \(C\vec S^ \ast\) are positive. And so for λ an eigenvalue of \(\left[ { - C\vec S^ \ast } \right]_{{\mathrm{diag}}}\), we have λ < 0. On the other hand, if λ is not an eigenvalue of \(\left[ { - C\vec S^ \ast } \right]_{{\mathrm{diag}}}\) then

$$\begin{array}{*{20}{l}} {{\mathrm{det}}(L - \lambda I)} \hfill & \,= \hfill & {{\mathrm{det}}\left( {\left[ { - C\vec S^ \ast } \right]_{{\mathrm{diag}}} - \lambda I} \right)} \hfill \\ {} \hfill & \times \hfill & {{\mathrm{det}}\left( { - \lambda I - \epsilon \left[ {\vec S_{{\mathrm{diag}}}^ \ast } \right]C^T\left[ {\left[ { - C\vec S^ \ast } \right]_{{\mathrm{diag}}} - \lambda I} \right]^{ - 1}\left[ { - \left[ {\vec R_{{\mathrm{diag}}}^ \ast } \right]C} \right]} \right)}. \hfill \end{array}$$

Defining \(D_1 = \epsilon \left[ {\vec S_{{\mathrm{diag}}}^ \ast } \right]\), D2 = \(\left[ {\left[ { - C\vec S^ \ast } \right]_{{\mathrm{diag}}} - \lambda I} \right]^{ - 1}\left[ { - \left[ {\vec R_{{\mathrm{diag}}}^ \ast } \right]} \right]\) and \(k = {\mathrm{det}}\left( {\left[ { - C\vec S^ \ast } \right]_{{\mathrm{diag}}} - \lambda I} \right)\) then

$$\begin{array}{*{20}{l}} {{\mathrm{det}}(L - \lambda I)} \hfill & = \hfill & {k{\kern 1pt} {\mathrm{det}}\left( { - \lambda I - D_1C^TD_2C} \right)} \hfill \\ {} \hfill & = \hfill & {k{\kern 1pt} {\mathrm{det}}\left( { - \lambda I - \left[ {\sqrt {D_2} C\sqrt {D_1} } \right]^T\left[ {\sqrt {D_2} C\sqrt {D_1} } \right]} \right)}. \hfill \end{array}$$
(12)

We now assume λ is a nonnegative real number. Then so long as D1, D2, and C are invertible (true by previous assumption and with \(\vec S^ \ast ,\vec R^ \ast \,> \, 0\), then \(\left[ {\sqrt {D_2} C\sqrt {D_1} } \right]^T\left[ {\sqrt {D_2} C\sqrt {D_1} } \right]\) is positive definite and thus λ < 0, contradicting the assumption. Biologically, our assumption that C is invertible only rules out essentially trivial cases, where e.g. a resource (or a linear combination of resources) can be removed from the system altogether, or the resource preferences of two species overlap identically.

More generally, assume Re(λ) ≥ 0. From (12) we have

$$\begin{array}{*{20}{l}} 0 \hfill & = \hfill & {{\mathrm{det}}\left( { - \lambda I - D_1C^TD_2C} \right)} \hfill \\ {} \hfill & = \hfill & {{\mathrm{det}}\left( { - \lambda I - \sqrt {D_1} C^TD_2C\sqrt {D_1} } \right)}. \hfill \end{array}$$
(13)

We wish to find a contradiction by proving the eigenvalues of \(\sqrt {D_1} C^TD_2C\sqrt {D_1}\) have positive real part and so it will be sufficient to show that the Hermitian part, \(H\left( {\sqrt {D_1} C^TD_2C\sqrt {D_1} } \right)\) is positive definite.

$$\begin{array}{*{20}{l}} {H\left( {\sqrt {D_1} C^TD_2C\sqrt {D_1} } \right)} \hfill & = \hfill & {\frac{1}{2}\left( {\sqrt {D_1} C^TD_2C\sqrt {D_1} + \sqrt {D_1} C^TD_2^\dagger C\sqrt {D_1} } \right)} \hfill \\ {} \hfill & = \hfill & {\sqrt {D_1} C^T{\mathrm{Re}}\left( {D_2} \right)C\sqrt {D_1} } \hfill \\ {} \hfill & = \hfill & {\left[ {\sqrt {{\mathrm{Re}}\left( {D_2} \right)} C\sqrt {D_1} } \right]^T\left[ {\sqrt {{\mathrm{Re}}(D_2)} C\sqrt {D_1} } \right]} \hfill \end{array}$$
(14)

Note that Re(D2) > 0, and \(\sqrt {{\mathrm{Re}}(D_2)}\), C and \(\sqrt {D_1}\) are all invertible and so \(H\left( {\sqrt {D_1} C^TD_2C\sqrt {D_1} } \right)\) is positive definite. Thus, we must have that Re(λ) < 0

Equivalently, we can give a more explicit proof, where we assume that λ = c + di is complex with real part c ≥ 0. Then we can choose the jth diagonal entry of \(\sqrt {D_2}\) to be written as aj + bji where \(| {a_j} | > | {b_j} |\) for all j, because each of the entries of the diagonal matrix D2 has positive real part. Now, let \(\sqrt {D_2} C\sqrt {D_1} = A + Bi\) with \(A = \vec a_{{\mathrm{diag}}}C\sqrt {D_1}\) and \(B = \vec b_{{\mathrm{diag}}}C\sqrt {D_1}\). Let \(\vec x\) be an eigenvector associated with the eigenvalue −λ of [A + Bi]T[A + Bi]. Then \(\vec x^ \ast [A + Bi]^T[A + Bi]\vec x\) should have non-positive real part; however,

$$\begin{array}{*{20}{l}} {\vec x^ \ast [A + Bi]^T[A + Bi]\vec x} \hfill & = \hfill & {\vec x^ \ast A^TA\vec x - \vec x^ \ast B^TB\vec x} \hfill \\ {} \hfill & {} \hfill & { +\, \left[ {\vec x^ \ast A^TB\vec x + \vec x^ \ast B^TA\vec x} \right]i} \hfill \end{array}$$
(15)

and the real part of \(\vec x^ \ast [A + Bi]^T[A + Bi]\vec x\) is

$$\vec x^ \ast A^TA\vec x - \vec x^ \ast B^TB\vec x$$
(16)

and because

$$A\vec x = \vec a_{{\mathrm{diag}}}C\sqrt {D_1} \vec x = \vec a_{{\mathrm{diag}}}\vec r$$
(17)

and

$$B\vec x = \vec b_{{\mathrm{diag}}}C\sqrt {D_1} \vec x = \vec b_{{\mathrm{diag}}}\vec r$$
(18)

where \(\vec r = C\sqrt {D_1} \vec x\), we have that \(\vec x^ \ast A^TA\vec x - \vec x^ \ast B^TB\vec x \ge 0\). If \(\vec x^ \ast A^TA\vec x - \vec x^ \ast B^TB\vec x = 0\), then it must be true that \(\vec r = 0\). Because C is assumed to be invertible, this means that \(\sqrt {D_1} \vec x = 0\); however, this is not possible based on the definitions of D1 and \(\vec x\). Therefore we contradict our initial assumption that λ has nonnegative real part.

Structural stability for competition

Feasible solutions for this system correspond to positive values for \(\vec R^ \ast\) and \(\vec S^ \ast\). The size of μ-space that lead to such positive solutions then depends on C, while similarly the size of ρ-space depends on CT. The size of the parameter space depends on det(C) which considers the relationship among all consumers’ resource use vectors and so it is more than just pairwise similarity that is important for the size of the parameter spaces33,37. This can be seen from mathematical expressions for these volumes, which are given by37

$$V_\mu = 2\frac{{\sqrt {{\mathrm{det}}{\kern 1pt} M_\mu } }}{{\pi ^{\frac{n}{2}}}}{\int}_{{\Bbb R}_ + ^n} e^{ - \left\langle {\xi ,M_\mu \xi } \right\rangle }{\mathrm{d}}\xi$$
(19)

and

$$V_\rho = 2\frac{{\sqrt {{\mathrm{det}}{\kern 1pt} M_\rho } }}{{\pi ^{\frac{n}{2}}}}{\int}_{{\Bbb R}_ + ^n} e^{ - \left\langle {\xi ,M_\rho \xi } \right\rangle }{\mathrm{d}}\xi .$$
(20)

Here, \(M_\mu = \hat C\hat C^T\) and the columns of \(\hat C^T\) are the normalized columns of CT and \(M_\rho = \tilde C^T\tilde C\) and the columns of \(\tilde C\) are the normalized columns of R*C. We note that while Vμ depends only on the properties of the consumer preference matrix, Vρ depends also on \(\vec R^ \ast\), which in turn depends on a specific choice of \(\vec \mu\). In other words, the volume Vρ changes with choice of \(\vec \mu\).

In the special case where all angles between pairs of column vectors are initially the same, a uniform increase in all angles does lead to a larger volume for the parameter space. To see this for a system with N consumers, let a = cos(θ) where θ represents the angle between each pair of normalized column vectors of C. The determinant of M is given by

$$\begin{array}{*{20}{l}} {{\mathrm{det}}(M)} \hfill & = \hfill & {{\mathrm{det}}\left( {\left[ {\begin{array}{*{20}{c}} 1 & a & \cdots & a \\ a & 1 & \ddots & \vdots \\ \vdots & \ddots & \ddots & a \\ a & \cdots & a & 1 \end{array}} \right]} \right)} \hfill \\ {} \hfill & = \hfill & {(1 - a)^{n - 1}(1 + (n - 1)a)}. \hfill \end{array}$$
(21)

Thus if the angle, θ, increases, then a = cos(θ) decreases and det(M) will increase.

However, it is not always the case that increasing angles between one or more species will increase Vμ or Vρ. We now consider the following example for N = 3, shown graphically in Fig. 2. Suppose initially that consumer preferences are given by the matrix

$$C^T = \left[ {\begin{array}{*{20}{c}} 1 & {\frac{1}{{\sqrt 2 }}} & {\frac{1}{{\sqrt 3 }}} \\ 0 & {\frac{1}{{\sqrt 2 }}} & {\frac{1}{{\sqrt 3 }}} \\ 0 & 0 & {\frac{1}{{\sqrt 3 }}} \end{array}} \right],$$
(22)

while after shifting species preferences we have the new matrix

$$\tilde C^T = \left[ {\begin{array}{*{20}{c}} 1 & {\frac{1}{{\sqrt 2 }}} & a \\ 0 & {\frac{1}{{\sqrt 2 }}} & b \\ 0 & 0 & c \end{array}} \right],$$
(23)

where \(a = \frac{1}{{\sqrt 3 }} - \frac{1}{4}\sqrt {\frac{{194}}{{75}}}\), \(b = \frac{1}{{\sqrt 3 }} + \frac{1}{4}\sqrt {\frac{{194}}{{75}}}\), and \(c = \frac{1}{{10}}\). The angles between the column pairs for CT are \(\left\{ {\theta _{12}} \right. = \frac{\pi }{4}\), \(\theta _{13} \approx 0.304\pi\), \(\left. {\theta _{23} \approx 0.196\pi } \right\}\) and the angles between the column pairs for \(\tilde C^T\) are {\(\tilde \theta _{12} = \frac{\pi }{4}\), \(\tilde \theta _{13} \approx 0.444\pi\), \(\tilde \theta _{23} \approx 0.196\pi\)}. So that \(\theta _{12} = \tilde \theta _{12}\), \(\theta _{13} < \tilde \theta _{13}\) and \(\theta _{23} = \tilde \theta _{23}\). The volumes of the associated parameter spaces are Vμ ≈ 0.0417 and \(\tilde V_\mu \approx 0.008\) for CT and \(\tilde C^T\), respectively. We note that these are just exemplars, and this counterintuitive result can be found for many different contexts, and is not limited to three species.

Feasibility and stability for competition and crossfeeding

For the case of specialized consumers and equilibria with equal abundances for species and equal densities for all resources, the equations for equilibrium abundances are (from Eq. (6) in the main text)

$$\left\{ {\begin{array}{*{20}{c}} \begin{array}{l}r\vec 1 = \frac{1}{{c\epsilon }}\left( {P^T\vec 1 + \vec \mu } \right),\\ s\vec 1 = [crI - P]^{ - 1}\vec \rho .\end{array} \end{array}} \right.$$
(24)

Then, solving for the parameters \(\vec \mu\) and \(\vec \rho\) we have

$$\left\{ {\begin{array}{*{20}{c}} \begin{array}{l}\vec \mu = cr\epsilon \vec 1 - P^T\vec 1,\\ \vec \rho = s[crI - P]\vec 1.\end{array} \end{array}} \right.$$
(25)

To ensure that positive resource density (i.e., positive r) can be obtained by positive rates, \(\vec \mu\), we need that \(cr\epsilon > \mathop {\sum}\nolimits_j {\kern 1pt} P_{ij}^T\), for all i. Similarly, to ensure that we obtain positive values for s from positive ρ, we need that \(cr > \mathop {\sum}\nolimits_j {\kern 1pt} P_{ij}\) for all i. In summary, not all possible values of consumer and resource density (i.e., not all positive values of r and s) can be obtained as solutions of these equations, conditioning on positive influx and mortality rates. That is, unlike the case of P = 0, there are now constraints for what subsets of feasible solutions are possible.

From Eq. (7) in the main text, we then find the Jacobian reduces to the form

(26)

We let λ represent an eigenvalue of \(\tilde L\). Then, \(\gamma = \frac{{\lambda (\lambda + cs)}}{{\epsilon cs}} + cr\) is an eigenvalue of P. Hence,

$$\lambda = \frac{{ - cs}}{2} \pm \frac{1}{2}\sqrt {(cs)^2 - 4\epsilon cs(cr - \gamma )}.$$

When all Re(λ) < 0 the equilibria above are stable to local perturbations.

We first consider a special case: where all γ are all real. An example of this occurs when P is symmetric, when (as discussed in the main text) each consumer species will get as much of its preferred resource as it gives to other species (of their preferred resources). In this case, if also all γ < cr, then all λ will be <0 and the equilibrium is locally stable. Using Gershgorin’s theorem38, this will be guaranteed when

$$\begin{array}{*{20}{c}} {cr > \mathop {\sum}\limits_j {\kern 1pt} P_{ij}} & {\forall i} \end{array}$$

In fact, this is the same as the criterion above that ensures \(\vec S^ \ast \ > \ 0\). So we conclude that feasibility and reciprocity together imply local stability, visualized in an example case of Fig. 3 in the main text.

To find necessary and sufficient conditions on γ ensuring this for non-symmetric P, first let \(\hat \gamma\) = \(\left| {\hat \gamma } \right|e^{i\theta }\) = \(cs - 4\epsilon (cr - \gamma )\). Then we want

$$\begin{array}{*{20}{l}} {{\mathrm{Re}}\left( {\sqrt {\hat \gamma } } \right)} \hfill & < \hfill & {\sqrt {cs} }, \hfill \\ {\sqrt {\left| {\hat \gamma } \right|} {\kern 1pt} {\mathrm{cos}}\frac{\theta }{2}} \hfill & < \hfill & {\sqrt {cs} }, \hfill \\ {\left| {\hat \gamma } \right|\left( {\frac{{1 + {\mathrm{cos}}{\kern 1pt} \theta }}{2}} \right)} \hfill & < \hfill & {cs}, \hfill \\ {\left| {\hat \gamma } \right| + {\mathrm{Re}}\left( {\hat {\gamma}} \right)} \hfill & < \hfill & {2cs} \hfill \end{array}$$
(27)

or equivalently

$$\epsilon \left({{Im}}\left(\gamma \right)\right)^2 \ < \ cs\left(cr - {\mathrm{Re}}\left(\gamma \right)\right).$$
(28)

Can we reexpress this in terms of direct criteria for P that will guarantee stability? Again using Gershgorin’s theorem38, for each eigenvalue, γ, of P we know that for some i

$$\left| {\gamma - P_{ii}} \right| < \mathop {\sum}\limits_{j \ne i} {\kern 1pt} P_{ij}$$
(29)

or equivalently:

$$\left( {{{Im}}(\gamma )} \right)^2 < - \left( {{\mathrm{Re}}(\gamma )} \right)^2 + 2P_{ii}{\mathrm{Re}}(\gamma ) + \left( {\mathop {\sum}\limits_{j \ne i} {\kern 1pt} P_{ij}} \right)^2 - \left( {P_{ii}} \right)^2$$
(30)

We can now rewrite our criteria for local stability as

$$\begin{array}{*{20}{l}} \epsilon\left(-({\mathrm{Re}}(\gamma))^2 + 2 P_{ii}{\mathrm{Re}}(\gamma) + \left(\sum_{j \neq i} P_{ij}\right)^2 - (P_{ii})^2\right) < cs( cr - {\mathrm{Re}}(\gamma)) \hfill \end{array}.$$
(31)

Rearranging terms and maximizing the quadratic in Re(γ) gives

$$\begin{array}{l} {\left( {\mathop {\sum}\limits_{j \ne i} {\kern 1pt} P_{ij}} \right)^2 < \ \frac{{cs}}{\epsilon }\left( {cr - P_{ii} - \frac{{cs}}{{4\epsilon }}} \right)} \hfill \end{array}$$
(32)

which is sufficient for stability when it holds for all i.

Unequal numbers of consumers and resources

For any solution for \(\vec R^ \ast\) and \(\vec S^ \ast\) with positive consumer and resource densities where the number of consumers is NS and the number of resources is NR, with NS not necessarily equal to NR, we can identify positive-valued influx and mortality rates that will lead to these solutions as follows:

$$\left\{ {\begin{array}{*{20}{c}} \begin{array}{l}\vec \mu = \epsilon _{{\mathrm{diag}}}C^T\vec R^ \ast, \\ \vec \rho = \vec R_{{\mathrm{diag}}}^ \ast C\vec S^ \ast. \end{array} \end{array}} \right.$$
(33)

Because C is positive, any positive \(\vec R^ \ast\) will result in \(\vec \mu \ > \ 0\). And if \(\vec S^ \ast\) is positive, \(\vec \rho \ > \ 0\). Thus for appropriate choice of parameters, any positive \(\left\{ {\vec R^ \ast ,\vec S^ \ast } \right\}\) can be found as a solution to Eq. (1) in the main text.

Let the number of consumers be NS, and the number of resources be NR. Assume an equilibrium solution such that all resources and all consumer species have positive density. The Jacobian matrix corresponding to any such equilibrium solution is

(34)

If all the real parts of the eigenvalues of this Jacobian are negative, then this equilibrium is locally stable. To compute these eigenvalues, we first note that the eigenvalue equation det(L − λI) = 0 is given by

(35)

Next, we note that \(\left[ {\left[ { - C\vec S^ \ast } \right]_{{\mathrm{diag}}} - \lambda I} \right]\) is invertible, so long as λ is not an eigenvalue of \(\left[ { - C\vec S^ \ast } \right]_{{\mathrm{diag}}}\). If it is an eigenvalue, then the entries of \(C\vec S^ \ast\) are nonnegative and so λ ≤ 0. However, if for some j, \(\left( {C\vec S^ \ast } \right)_j = 0\), then from Eq. (1), there is no nontrivial, finite equilibrium value for the corresponding resource, Rj. Thus, we consider this a degenerate situation and assume the entries of \(C\vec S^ \ast\) to be strictly positive. And so for λ an eigenvalue of \(\left[ { - C\vec S^ \ast } \right]_{{\mathrm{diag}}}\), we have λ < 0. On the other hand, if λ is not an eigenvalue of \(\left[ { - C\vec S^ \ast } \right]_{{\mathrm{diag}}}\) then

$$\begin{array}{*{20}{l}} 0 \hfill & = \hfill & \!\!\!{{\mathrm{det}}(L - \lambda I)} \hfill \\ {} \hfill & = \hfill & \!\!\!{{\mathrm{det}}\left( {\left[ { - C\vec S^ \ast } \right]_{{\mathrm{diag}}} - \lambda I} \right)} \hfill \\ {} \hfill & \times \hfill & \!\!\!{{\mathrm{det}}\left( {\left[ { - \lambda I - \epsilon \left[ {\vec S_{{\mathrm{diag}}}^ \ast } \right]} \right.C^T\left[ {\left[ { - C\vec S^ \ast } \right]_{{\mathrm{diag}}} - \lambda I} \right]^{ - 1}\left[ { - \left[ {\vec R_{{\mathrm{diag}}}^ \ast } \right]C} \right]} \right)}. \hfill \end{array}$$

Note that \({\mathrm{det}}\left( {\left[ { - C\vec S^ \ast } \right]_{{\mathrm{diag}}} - \lambda I} \right) \ \ne \ 0\). Thus, the above equation implies

$$0 = {\mathrm{det}}\left( { - \lambda I - \epsilon \left[ {\left( {\vec S^ \ast } \right)_{{\mathrm{diag}}}} \right]C^T\left[ {\left[ { - C\vec S^ \ast } \right]_{{\mathrm{diag}}} - \lambda I} \right]^{ - 1}\left[ { - \left[ {\vec R_{{\mathrm{diag}}}^ \ast } \right]C} \right]} \right).$$
(36)

Defining D1 = \(\epsilon \left[ {\left( {\vec S^ \ast } \right)_{{\mathrm{diag}}}} \right]\) and D2 = \(\left[ {\left[ { - C\vec S^ \ast } \right]_{{\mathrm{diag}}} - \lambda I} \right]^{ - 1}\left[ { - \left[ {\vec R_{{\mathrm{diag}}}^ \ast } \right]} \right]\) then

$$\begin{array}{*{20}{l}} 0 \hfill & = \hfill & {{\mathrm{det}}\left( { - \lambda I - D_1C^TD_2C} \right)} \hfill \\ {} \hfill & = \hfill & {{\mathrm{det}}\left( { - \lambda I - \sqrt {D_1} C^TD_2C\sqrt {D_1} } \right)}. \hfill \end{array}$$
(37)

Assume Re(λ) ≥ 0. We wish to find a contradiction by proving the eigenvalues of \(\sqrt {D_1} C^TD_2C\sqrt {D_1}\) have positive real part and so it will be sufficient to show that the Hermitian part, \(H\left( {\sqrt {D_1} C^TD_2C\sqrt {D_1} } \right)\) is positive definite.

$$\begin{array}{*{20}{l}} {H\left( {\sqrt {D_1} C^TD_2C\sqrt {D_1} } \right)} \hfill & = \hfill & {\frac{1}{2}\left( {\sqrt {D_1} C^TD_2C\sqrt {D_1} + \sqrt {D_1} C^TD_2^\dagger C\sqrt {D_1} } \right)} \hfill \\ {} \hfill & = \hfill & {\sqrt {D_1} C^T{\mathrm{Re}}\left( {D_2} \right)C\sqrt {D_1} } \hfill \\ {} \hfill & = \hfill & {\left[ {\sqrt {{\mathrm{Re}}\left( {D_2} \right)} C\sqrt {D_1} } \right]^T\left[ {\sqrt {{\mathrm{Re}}\left( {D_2} \right)} C\sqrt {D_1} } \right]}. \hfill \end{array}$$
(38)

Note that Re(D2) > 0. Now \(\sqrt {{\mathrm{Re}}(D_2)} C\sqrt {D_1}\) is an NR × NS dimensional matrix. We claim that \({\mathrm{rank}}\left( {\sqrt {{\mathrm{Re}}\left( {D_2} \right)} C\sqrt {D_1} } \right)\) = NS. First, because the entries of \(\sqrt {{\mathrm{Re}}\left( {D_2} \right)}\) and \(\sqrt {D_1}\) are positive, \({\mathrm{rank}}\left( {\sqrt {{\mathrm{Re}}\left( {D_2} \right)} C\sqrt {D_1} } \right)\) = rank(C). Now we assume rank(C) = NS. This is possible only when NS ≤ NR, in keeping with the expectation that coexistence of a group of NS species requires at least that many resources. Viewed another way, this means that the consumer species have sufficiently unique resource preferences. Now, with \({\mathrm{rank}}\left( {\sqrt {{\mathrm{Re}}\left( {D_2} \right)} C\sqrt {D_1} } \right)\) = NS, we may conclude that \(H\left( {\sqrt {D_1} C^TD_2C\sqrt {D_1} } \right)\) is positive definite.

Next, let the number of consumers be NS, and the number of resources be NR. Assume an equilibrium solution such that all resources have positive density, and all consumer species have nonnegative density. The Jacobian matrix corresponding to any such equilibrium solution is

(39)

If all the real parts of the eigenvalues of this Jacobian are negative, then this equilibrium is locally stable. To compute these eigenvalues, we first note that the eigenvalue equation det(LλI) = 0 is given by

(40)

Next, we note that \(\left[ {\left[ { - C\vec S^ \ast } \right]_{{\mathrm{diag}}} - \lambda I} \right]\) is invertible, so long as λ is not an eigenvalue of \(\left[ { - C\vec S^ \ast } \right]_{{\mathrm{diag}}}\). If it is an eigenvalue, then the entries of \(C\vec S^ \ast\) are nonnegative and so λ ≤ 0. However, if for some j, \(\left( {C\vec S^ \ast } \right)_j = 0\), then from Eq. (1), there is no nontrivial, finite equilibrium value for the corresponding resource, Rj. Thus, we consider this a degenerate situation and assume the entries of \(C\vec S^ \ast\) to be strictly positive. And so for λ an eigenvalue of \(\left[ { - C\vec S^ \ast } \right]_{{\mathrm{diag}}}\), we have λ < 0. On the other hand, if λ is not an eigenvalue of \(\left[ { - C\vec S^ \ast } \right]_{{\mathrm{diag}}}\) then

$$\begin{array}{lcl} 0 \hfill & = \hfill &\hskip-11pt \!\!\!{{\mathrm{det}}(L - \lambda I)} \hfill \\ {} \hfill & = \hfill &\hskip-11pt \!\!\!{{\mathrm{det}}\left( {\left[ { - C\vec S^ \ast } \right]_{{\mathrm{diag}}} - \lambda I} \right)} \hfill \\ {} \hfill & \times \hfill &\hskip-10pt {{\mathrm{det}}\left( {\left[ {\epsilon C^TR^ \ast - \mu } \right]_{{\mathrm{diag}}} - \lambda I - \epsilon \left[ {\vec S_{{\mathrm{diag}}}^ \ast } \right]C^T\left[ {\left[ { - C\vec S^ \ast } \right]_{{\mathrm{diag}}} - \lambda I} \right]^{ - 1}\left[ { - \left[ {\vec R_{{\mathrm{diag}}}^ \ast } \right]C} \right]} \right)}. \hfill \end{array}$$

Note that \({\mathrm{det}}\left( {\left[ { - C\vec S^ \ast } \right]_{\mathrm{diag}} - \lambda I} \right) \ne 0\). For simplicity, assume that there is only one consumer with non-positive density, \(S_j^ \ast = 0\). For all other consumers, the corresponding entries of \(\left[ {\epsilon C^TR^ \ast - \mu } \right]_{\mathrm{diag}}\) are zero. Thus, the above equation implies

$$\begin{array}{*{20}{l}} 0 \hfill & = \hfill & \!\!\!{\left( {\left[ {\epsilon C^TR^ \ast - \mu } \right]_j - \lambda } \right)} \hfill \\ {} \hfill & \times \hfill & {{\mathrm{det}}\left( { - \lambda I - \epsilon \left[ {\left( {\vec S_m^ \ast } \right)_{\mathrm{diag}}} \right]C_m^T\left[ {\left[ { - C_m\vec S_m^ \ast } \right]_{\mathrm{diag}} - \lambda I} \right]^{ - 1}\left[ { - \left[ {\vec R_{\mathrm{diag}}^ \ast } \right]C_m} \right]} \right)} \hfill \end{array}$$
(41)

With

$$\begin{array}{l}\vec S_m^ \ast = \vec S^ \ast {\kern 1pt} {\mathrm{with}}{\kern 2pt} {\mathrm{the}}{\kern 2pt} j{{\mathrm{th}}}{\kern 2pt} {\mathrm{entry}}{\kern 2pt} {\mathrm{removed}}\\ C_m = C{\kern 5pt} {\mathrm{with}}{\kern 2pt} {\mathrm{the}}{\kern 2pt} j{{\mathrm{th}}}{\kern 2pt} {\mathrm{column}}{\kern 2pt} {\mathrm{removed}}\end{array}$$

Defining D1  =  \(\epsilon \left[ {\left( {\vec S_m^ \ast } \right)_{\mathrm{diag}}} \right]\) and D2 = \(\left[ {\left[ { - C_m\vec S_m^ \ast } \right]_{\mathrm{diag}} - \lambda I} \right]^{ - 1}\left[ { - \left[ {\vec R_{\mathrm{diag}}^ \ast } \right]} \right]\) then

$$\begin{array}{*{20}{l}} 0 \,\hfill & = \hfill & {\left( {\left[ {\epsilon C^TR^ \ast - \mu } \right]_j - \lambda } \right) \times {\mathrm{det}}\left( { - \lambda I - D_1C_m^TD_2C_m} \right)} \hfill \\ {} \hfill & = \hfill & {\left( {\left[ {\epsilon C^TR^ \ast - \mu } \right]_j - \lambda } \right) \times {\mathrm{det}}\left( { - \lambda I - \sqrt {D_1} C_m^TD_2C_m\sqrt {D_1} } \right)} \hfill \end{array}$$
(42)

So we have that \(\left[ {\epsilon C^TR^ \ast - \mu } \right]_j\) is an eigenvalue. Now looking at 0 = det\(\left( { - \lambda I - \sqrt {D_1} C_m^TD_2C_m\sqrt {D_1} } \right)\), assume Re(λ) > 0. We wish to find a contradiction by proving the eigenvalues of \(\sqrt {D_1} C_m^TD_2C_m\sqrt {D_1}\) have positive real part and so it will be sufficient to show that the Hermitian part, \(H\left( {\sqrt {D_1} C_m^TD_2C_m\sqrt {D_1} } \right)\) is positive definite.

$$\begin{array}{*{20}{l}} {H\left( {\sqrt {D_1} C_m^TD_2C_m\sqrt {D_1} } \right)} \hfill & = \hfill & {\frac{1}{2}\left( {\sqrt {D_1} C_m^TD_2C_m\sqrt {D_1} + \sqrt {D_1} C_m^TD_2^\dagger C_m\sqrt {D_1} } \right)} \hfill \\ {} \hfill & = \hfill & {\sqrt {D_1} C_m^T{\mathrm{Re}}\left( {D_2} \right)C_m\sqrt {D_1} } \hfill \\ {} \hfill & = \hfill & {\left[ {\sqrt {{\mathrm{Re}}\left( {D_2} \right)} C_m\sqrt {D_1} } \right]^T\left[ {\sqrt {{\mathrm{Re}}\left( {D_2} \right)} C_m\sqrt {D_1} } \right]} \hfill \end{array}$$
(43)

Note that Re(D2) > 0. Now \(\sqrt {{\mathrm{Re}}\left( {D_2} \right)} C_m\sqrt {D_1}\) is an NR × NS − 1 dimensional matrix. We claim that \({\mathrm{rank}}\left( {\sqrt {{\mathrm{Re}}\left( {D_2} \right)} C_m\sqrt {D_1} } \right)\) = NS − 1. First, because the entries of \(\sqrt {{\mathrm{Re}}\left( {D_2} \right)}\) and \(\sqrt {D_1}\) are positive, \({\mathrm{rank}}\left( {\sqrt {{\mathrm{Re}}\left( {D_2} \right)} C_m\sqrt {D_1} } \right)\) = rank(Cm). Now we will have rank(Cm) = NS − 1 if rank(C) = NS. This is only possible when NS ≤ NR. This is again a biologically reasonable assumption to make, as it means that the consumer species have sufficiently unique resource preferences. Now, with \({\mathrm{rank}}\left( {\sqrt {{\mathrm{Re}}\left( {D_2} \right)} C_m\sqrt {D_1} } \right)\) = NS − 1, we may conclude that \(H\left( {\sqrt {D_1} C_m^TD_2C_m\sqrt {D_1} } \right)\) is positive definite. Thus the stability of the equilibrium \(\left\{ {\vec R^ \ast ,\vec S^ \ast } \right\}\) depends only on the sign of \(\left[ {\epsilon C^TR^ \ast - \mu } \right]_j\). If \(\left[ {\epsilon C^TR^ \ast - \mu } \right]_j < 0\), the system is uninvasible by species j and the equilibrium is stable.

Code availability

The authors used python code to generate matrices of appropriate structure to produce Figs. 13. The code necessary to generate these figures (or related) will be made available in the O’Dwyer lab github repository (https://github.com/odwyer-lab/consumer_producer).

Data availability

No datasets were generated or analyzed during the current study.

References

  1. 1.

    MacArthur, R. Fluctuations of animal populations and a measure of community stability. Ecology 36, 533–536 (1955).

    Article  Google Scholar 

  2. 2.

    Elton, C. S. The Ecology of Invasions by Animals and Plants (University of Chicago Press, Chicago, 1958).

  3. 3.

    May, R. M. Stability and Complexity in Model Ecosystems. (Princeton University Press, Princeton, 1973).

    Google Scholar 

  4. 4.

    Gardner, M. R. & Ashby, W. R. Connectance of large dynamic (cybernetic) systems: critical values for stability. Nature 228, 784–784 (1970).

    ADS  Article  PubMed  CAS  Google Scholar 

  5. 5.

    May, R. M. Will a large complex system be stable? Nature 238, 413–414 (1972).

    ADS  Article  PubMed  CAS  Google Scholar 

  6. 6.

    Allesina, S. & Tang, S. Stability criteria for complex ecosystems. Nature 483, 205–208 (2012).

    ADS  Article  PubMed  CAS  Google Scholar 

  7. 7.

    MacArthur, R. & Levins, R. The limiting similarity, convergence, and divergence of coexisting species. Am. Nat. 101, 377–385 (1967).

  8. 8.

    MacArthur, R. Species packing and competitive equilibrium for many species. Theor. Popul. Biol. 1, 1–11 (1970).

    Article  PubMed  CAS  Google Scholar 

  9. 9.

    May, R. M. & MacArthur, R. H. Niche overlap as a function of environmental variability. Proc. Natl. Acad. Sci. 69, 1109–1113 (1972).

    ADS  Article  PubMed  CAS  Google Scholar 

  10. 10.

    Abrams, P. The theory of limiting similarity. Annu. Rev. Ecol. Syst. 14, 359–376 (1983).

    Article  Google Scholar 

  11. 11.

    Chesson, P. Macarthur’s consumer-resource model. Theor. Popul. Biol. 37, 26–38 (1990).

    MathSciNet  Article  MATH  Google Scholar 

  12. 12.

    Chesson, P. Mechanisms of maintenance of species diversity. Annu. Rev. Ecol. Syst. 31, 343–366 (2000).

    Article  Google Scholar 

  13. 13.

    Case, T. J. & Casten, R. G. Global stability and multiple domains of attraction in ecological systems. Am. Nat. 113, 705–714 (1979).

    MathSciNet  Article  Google Scholar 

  14. 14.

    Tilman, D. Resources: a graphical-mechanistic approach to competition and predation. Am. Nat. 116, 362–393 (1980).

    Article  Google Scholar 

  15. 15.

    Rendulic, S. et al. A predator unmasked: life cycle of bdellovibrio bacteriovorus from a genomic perspective. Science 303, 689–692 (2004).

    ADS  Article  PubMed  CAS  Google Scholar 

  16. 16.

    Ghoul, M. & Mitri, S. The ecology and evolution of microbial competition. Trends Microbiol. 24, 833–845 (2016).

    Article  PubMed  CAS  Google Scholar 

  17. 17.

    Pfeiffer, T. & Bonhoeffer, S. Evolution of cross-feeding in microbial populations. Am. Nat. 163, E126–E135 (2004).

    Article  PubMed  Google Scholar 

  18. 18.

    Barabas, G., D’Andrea, R. & Ostling, A. M. Species packing in nonsmooth competition models. Theor. Ecol. 6, 1–19 (2013).

    Article  Google Scholar 

  19. 19.

    Barabas, G. & Meszena, G. When the exception becomes the rule: the disappearance of limiting similarity in the Lotka–Volterra model. J. Theor. Biol. 258, 89–94 (2009).

    MathSciNet  Article  PubMed  Google Scholar 

  20. 20.

    Coyte, K. Z., Schluter, J. & Foster, K. R. The ecology of the microbiome: Networks, competition, and stability. Science 350, 663–666 (2015).

    ADS  Article  PubMed  CAS  Google Scholar 

  21. 21.

    Momeni, B., Xie, L & Shou, W. Lotka–Volterra pairwise modeling fails to capture diverse pairwise microbial interactions. eLife 6, e25051 (2017).

  22. 22.

    Holling, C. S. The functional response of predators to prey density and its role in mimicry and population regulation. Mem. Èntomol. Soc. Can. 97, 5–60 (1965).

    Article  Google Scholar 

  23. 23.

    Shoresh, N., Hegreness, M. & Kishony, R. Evolution exacerbates the paradox of the plankton. Proc. Natl Acad. Sci. 105, 12365–12369 (2008).

    ADS  Article  PubMed  Google Scholar 

  24. 24.

    Saito, M. A., Goepfert, T. J. & Ritt, J. T. Some thoughts on the concept of colimitation: three definitions and the importance of bioavailability. Limnol. Oceanogr. 53, 276–290 (2008).

    ADS  Article  CAS  Google Scholar 

  25. 25.

    De Baar, H. J. W. von liebig’s law of the minimum and plankton ecology (1899-1991). Progress. Oceanogr. 33, 347–386 (1994).

    ADS  Article  Google Scholar 

  26. 26.

    Embree, M., Liu, J. K., Al-Bassam, M. M. & Zengler, K. Networks of energetic and metabolic interactions define dynamics in microbial communities. Proc. Natl Acad. Sci. 112, 15450–15455 (2015).

    ADS  Article  PubMed  CAS  Google Scholar 

  27. 27.

    Grilli, J. et al. Feasibility and coexistence of large ecological communities. Nat. Commun. 8, 14389 (2017).

    Article  CAS  PubMed Central  Google Scholar 

  28. 28.

    Hernández-Garca, E., López, C., Pigolotti, S. & Andersen, K. H. Species competition: coexistence, exclusion and clustering. Philos. Trans. R. Soc. Lond. A: Math., Phys. Eng. Sci. 367, 3183–3195 (2009).

    ADS  MathSciNet  Article  MATH  Google Scholar 

  29. 29.

    Rohr, R. P. et al. On the structural stability of mutualistic systems. Science 345, 416–425 (2014).

    Article  CAS  Google Scholar 

  30. 30.

    Zelezniak, A. et al. Metabolic dependencies drive species co-occurrence in diverse microbial communities. Proc. Natl Acad. Sci. 112, 6449–6454 (2015).

    ADS  Article  PubMed  CAS  Google Scholar 

  31. 31.

    Song, H. & Lee, S. Y. Production of succinic acid by bacterial fermentation. Enzym. Microb. Technol. 39, 352–361 (2006).

    Article  CAS  Google Scholar 

  32. 32.

    Bascompte, J., Jordano, P. & Olesen, J. M. Asymmetric coevolutionary networks facilitate biodiversity maintenance. Science 312, 431–433 (2006).

    ADS  Article  PubMed  CAS  Google Scholar 

  33. 33.

    Saavedra, S. et al. A structural approach for understanding multispecies coexistence. Ecol. Monogr. 87, 470–486 (2017).

    Article  Google Scholar 

  34. 34.

    Levine, J. M., Bascompte, J., Adler, P. B. & Allesina, S. Beyond pairwise mechanisms of species coexistence in complex communities. Nature 546, 56 (2017).

    ADS  Article  PubMed  CAS  Google Scholar 

  35. 35.

    Abrams, P. A., Rueffler, C. & Dinnage, R. Competition-similarity relationships and the nonlinearity of competitive effects in consumer-resource systems. Am. Nat. 172, 463–474 (2008).

    Article  PubMed  Google Scholar 

  36. 36.

    Goh, B. S. Stability in models of mutualism. Am. Nat. 113, 261–275 (1979).

    MathSciNet  Article  Google Scholar 

  37. 37.

    Gourion, D. & Seeger, A. Deterministic and stochastic methods for computing volumetric moduli of convex cones. Comput. Appl. Math. 29, 215–246 (2010).

    MathSciNet  Article  MATH  Google Scholar 

  38. 38.

    Horn, R. A. & Johnson, C. R. Matrix Analysis. 2nd edn, (Cambridge University Press, New York, NY, 2012).

    Book  Google Scholar 

  39. 39.

    Grilli, J., Rogers, T. & Allesina, S. Modularity and stability in ecological communities. Nat. Commun. 7, 12031 (2016).

    ADS  Article  PubMed  PubMed Central  CAS  Google Scholar 

Download references

Acknowledgements

J.O.D. acknowledges the Simons Foundation Grant #376199, McDonnell Foundation Grant #220020439, NSF #DEB1557192

Author information

Affiliations

Authors

Contributions

S.B. and J.O.D. contributed equally to this work.

Corresponding author

Correspondence to James P. O’Dwyer.

Ethics declarations

Competing interests

The authors declare no competing interests.

Additional information

Publisher's note: Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Electronic supplementary material

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Butler, S., O’Dwyer, J.P. Stability criteria for complex microbial communities. Nat Commun 9, 2970 (2018). https://doi.org/10.1038/s41467-018-05308-z

Download citation

Further reading

Comments

By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.

Search

Quick links

Nature Briefing

Sign up for the Nature Briefing newsletter — what matters in science, free to your inbox daily.

Get the most important science stories of the day, free in your inbox. Sign up for Nature Briefing