Some guidance on using mathematical notation in ecology

Mathematical modelling is playing an increasing role in studies of ecological systems. This requires the communication of the details of a mathematical model, including the use of mathematical notation to represent ecological variables, parameters and processes. In our experience, the clarity of mathematical notation varies between papers and can often be inconsistent with general conventions. Poor notation can impede communication and understanding of ideas, and make models appear more complicated than necessary. Here, we present some guidelines, including: (a) define every term in an equation, (b) use fonts appropriately (italicise mathematical symbols, use bold lower case for vectors and bold upper case for matrices), (c) use subscripts appropriately (to index quantities, for example, by year), (d) use superscripts appropriately (to indicate a power, the transpose of a matrix or the steady‐state value of a quantity), (e) avoid multiletter variable names, and (f) revisit notation early on in a project to see if it should be refined. Although we focus mainly on ecology, our guidelines should be of interest to researchers applying models in evolutionary biology and broader areas of biology.


| INTRODUC TI ON
Six decades ago, Lowry (1959) pleaded for the "increased use of mathematical notation where appropriate in ecological literature." This has certainly been realised. For example, equations appeared in only 14% of the 37 contributions in the issue of Ecology containing the Lowry (1959) paper, but in 38% of the 26 contributions comprising the March 2018 issue. Not surprisingly, in Methods in Ecology and Evolution, a relatively new journal focussed on methodological developments, there is an even higher percentage (56% of the 34 contributions in the March 2018 issue). Advantages given by Lowry (1959) include precise communication of logical thought (beyond that afforded by the written word), and the reproducibility of methods and results. He noted that advantages "accrue in proportion to the care used by the author in the use of notation." There are many books concerning the various skills needed to produce a scientific paper that uses mathematical modelling in ecology.
For example, there are books covering introductory ecology (Begon, Harper, & Townsend, 1986), general mathematics (Kreyszig, 1993), ecological modelling (Hilborn & Mangel, 1997), implementing ecological models in the programming language R (Bolker, 2008) and, the final step, writing and publishing a paper (Day, 1994). Modern tools such as Git and GitHub are recommended to streamline workflows, particularly for large collaborative projects (Lowndes et al., 2017), and recommendations exist for making computer code available and reproducible (Barnes, 2010;Mislan, Heer, & White, 2016;Wickham, 2015). However, missing from this advice are tips on developing the mathematical notation to use in a model.
Here we recommend some guidelines based on our joint experience of over 25 years of publishing papers in the area of ecological modelling. Our target audience is anyone using mathematical models in ecology, including biologists who are starting graduate training and anticipate using mathematical models, and established field biologists conducting quantitative analyses (such as population models, fisheries stock assessments and movement models). Our guidelines are appropriate for all technical documents, such as journal papers, theses, government reports, consultant reports and documentation for software.
We have sometimes found that mathematical models are described in a more complicated way than necessary-a principal cause is the lack of careful consideration of the notation used. Similarly, we have seen mathematical models that are lacking important information. We ourselves have papers with notation that could, in hindsight, be improved. Unfortunately, poor mathematical notation may mean that a reviewer of a manuscript is unable to comprehend the model used and therefore is unable to properly evaluate a manuscript. This is analogous to a manuscript that has an incomplete description of the methods of a laboratory experiment. Clarity of model descriptions is obviously important. For example, Individual Based Models were previously criticised as generally being so poorly documented that they could not be evaluated or reproduced, which motivated development of standardised protocols that has led to a more rigorous formulation of models and enhanced understanding (Grimm et al., 2010).
By "notation" we are specifically referring to the letters used to represent quantities in equations, as well as the use of subscripts, superscripts and related concepts. Letters are usually taken from the Roman (a, b, c, …)  Biology and Evolution, Nature, PLOS ONE and Science. There is minimal guidance regarding mathematical notation. Only two (Evolution and Journal of the Royal Society Interface) have no mention of equations, but the mathematical-related guidelines for the other journals are almost exclusively restricted to typesetting aspects (such as bold for vectors) rather than the broader considerations that we present here.
Our guidance goes beyond typesetting, and is aimed to help authors think about the choice of notation to improve clarity and understanding. The onus for good notation should be on authors rather than journals (though ideally journals might adopt our guidelines), because: (a) notation should be decided early on in a study (possibly before deciding on a particular journal), (b) work may first appear in a technical document such as a thesis before being submitted to a journal, (c) the Supporting Information of a paper often contains the full mathematical details of models and is not typeset or edited by publishers, such that responsibility for clarity rests with the authors.
Our guidelines are based on those traditionally used in mathematics and are in a somewhat logical order. Our aim is for them to be useful and adopted, though we anticipate exceptions for which they are purposefully overlooked. Where appropriate, we use examples from common ecological models, our own fields of research and from evolutionary biology.

| Define all terms
The number one guideline is to define every term that is used in an equation. For example, although readers will recognise the equation it does not convey any information as written (since the letters are not defined). Similarly, many ecologists may be familiar with the equation but it requires the definition of the terms to be understandable to all readers. For this reason, it is imperative to give the equation and the definitions of its terms. For example, where S represents the number of species (of a particular taxonomic category) in area A, the constant c is the number of species that would be in one square unit, and the dimensionless exponent z quantifies the change in species number with area (May, Crawley & Sugihara, 2007). This indicates that (3) represents an increase (because z is typically around 0.2-0.3) in species richness with area.
Thus, immediately after an equation (as part of the same sentence) any previously undefined symbols should be defined using the phrase "where …".
There is no need to define a term for a second time in the text, although a reminder may be warranted if the term was introduced much earlier in a lengthy article (and a table of notation can be helpful for complicated models). However, in line with the author guidelines of many journals, it can be desirable for tables and figures to be understandable on their own and so notation should be additionally defined in their captions.

| Use italics, boldface and capitalisation appropriately
By convention, mathematical symbols should be italicised. This distinguishes text from mathematical notation-for example, "a large value of a" is more comprehensible than "a large value of a." However, vectors and matrices should be Roman type (not italicised) and bold, with vectors being lower case and matrices being upper case. So a would be a vector and A would be a matrix. Element i of a is often denoted a i and the element in row i and column j of A is hence A ij (or a ij , e.g. Caswell, 2001;Kreyszig, 1993). A vector a will usually be a column vector unless otherwise specified. Generic random variables are usually denoted by upper-case letters (like X), with possible numeric values represented by the corresponding lower-case letter (x).
Use Roman type for standard mathematical functions such as sin, cos, log, ln and e x , and when using other words, such as describing a statistical distribution like for variable X coming from a normal distribution with mean μ and standard deviation σ. Also use a Roman d for derivative: for the derivative of variable X with respect to time t. Similarly for integration, e.g. ∫f(x)dx. Italics and Roman type may be more easily distinguishable in a serif font (see Supporting Information).
Units should always be given and also be in Roman type, e.g. the speed of the polar bear was 1 km/hr. This distinguishes units from mathematical variables, and allows use of phrases such as: let the speed be x km/hr.

| Use subscripts appropriately
Subscripts are used to represent different values of a quantity. For example, define B t as the biomass of a population in year t, where t = 1, 2, 3, …, T, and T represents the maximum year. Note that you cannot then use, say, B s to represent the biomass in spatial area s. This is because setting t = 1 gives B 1 as the biomass in year 1. But setting s = 1 also gives B 1 , creating obvious confusion. Usually, a subscript that is used as an index should appear on both sides of an equation, such as in for the relationship between two variables x t and y t at each time t; there is a value of y t corresponding to each setting of t. There should generally not be a mixture of subscripts, such as This equation implies that y t depends on the value of x i , and therefore on i, and so y t should really be denoted y it . Otherwise, for example, we may have y t = 9 for x 1 = 3 (with i = 1), but y t = 13 for x 2 = 5 (with i = 2)-but the notation y t does not distinguish between the different values for i = 1 and i = 2.
An expression such as is valid-it just means that the ij value of y is the same for all values of the index j (since nothing on the right-hand side depends on j).
One source of confusion is having i and j as indices, but then using these again in a summation to sum N values: The problem is that i is used here as an index, such that the equation is valid for all values of i, but then is also used in the summation where it is just a dummy index. A better formulation would be where k is a dummy index. Another way to understand this is to realise that the following are all equivalent: because k, l and m are just dummy indices used to indicate the terms to be added together by the summation-switching between them in Equation (10) will not affect any related equations, whereas changing i and j likely will.
For spatio-temporal situations, an alternative to the aforementioned B st is using Y t (s) to represent the value of a random variable Y at time t and spatial location s (Cressie & Wikle, 2011). For times t 1 , t 2 , and t 3 , and spatial locations s 1 , s 2 , and s 3 , such notation enabled Cressie and Wikle (2011) to succinctly represent the spatial process at the fixed time t 1 as where ′ represents the transpose, and the temporal process at the fixed spatial location s 1 as Note that Y t 1 and Y(s 1 ) are vectors of random variables but cannot be simultaneously lower-case bold (as vectors should be) and uppercase italics (as random variables should be), further emphasising the need for clear definitions.

| Be careful with superscripts
Superscripts can be used to distinguish two related variables, e.g. X and X ′ . Although be aware that, as in Equation (12), single quotes are sometimes used to designate the transpose of vectors or matrices (e.g. X ′ , though X t or X T are also common), or to represent the derivatives of functions (e.g. f ′ (x)). Asterisks (e.g. X * ) traditionally represent the steady state of a dynamic variable.
A number or a letter (as an index) should not be used as a superscript. For example, we have seen B t used as the biomass in year t, but this looks like B raised to the power t. When we explicitly set t = 2 we get B 2 , which is interpreted as B squared, not the desired biomass in year 2. Another example is using u sg at to represent the exploitation rate of fish that are of sex s and age a being caught by fishing gear g in year t. To avoid the superscripts it is fine to use u atsg like in the earlier example of multiple subscripts (B ijkmn ).
Subscripts and superscripts should always come after the variable, to avoid confusing notation such as j v t . Otherwise, if θ multiplies j v t to give j v t then there is ambiguity as to whether the first component of this term should be interpreted as j or just θ.

| It can be helpful to distinguish variables from parameters
It is essential to understand the differences between variables, parameters and constants in a model (Platt & Sathyendranath, 1993).
To help emphasise the distinction between variables and parameters, upper-case letters are often used for variables, whereas lowercase (and Greek) letters designate parameters and constants. The dependent variable is usually on the left-hand side of an equation and depends on everything on the right-hand side. An example is the following formulation of the Ricker model (Bjorkstedt, 2012): where R is the dependent variable (the recruitment of new fish) arising from the independent variable S (the spawning stock biomass), with parameters α (the maximum number of recruits produced by each unit of spawning stock biomass) and β (which scales the intensity of density dependence). If there is a choice (such as when developing a new model) then it is useful to use upper and lower case to distinguish variables from parameter and constants. Though it can be best to stick with established convention when this is not followed, for example in Equation (1), or for simple equations involving variables denoted as x and y with no letters used for parameters, as in Equation (6)-we used x and y there since they are often the first choice to represent unknown variables.

| Avoid multiletter variable names
Use only one letter (rather than two or more) to represent a quantity. For example, in fisheries science it is common to see the abbreviation SSB for spawning stock biomass. This is fine as an acronym in a sentence, but can become problematic when SSB is used as a mathematical quantity in an equation. A subscript t might then be added to represent time: SSB t . But if there is a quantity S defined as, say, selectivity, and B t is defined as the total (spawning plus nonspawning) biomass in year t, then an equation such as is very ambiguous. Can the S's be cancelled? What about the B t 's? Does the denominator represent S 2 multiplied by B t ? A solution would be to use B t and T t for, respectively, the spawning and total biomasses at time t.
Occasionally it may be okay to use an acronym or word as a variable name. For example, Zuur, Hilbe, and Ieno (2013) often use words as variables in their statistical models, resulting in terms such as e 1 + 2 × MeanDepth i which intuitively represents an exponential effect of a linear function of mean depth ( 1 and 2 are parameters). In such statistical models there is generally no further subsequent mathematical manipulation which may avoid the problems outlined by Equation (15). The use of words or acronyms can make models more understandable to, say, stakeholders who are not quantitatively trained but have insights into the system being modelled-this also may be particularly appropriate for a presentation or a poster, especially if not all details of a model are going to be given. And using words or acronyms does not require people to remember notation. However, it should be ensured that there is no potential for confusion (which can be hard to guarantee when first defining notation) or for equations to become cumbersome and hard to understand. One approach can be to simultaneously give equations in word and notation form (e.g. Edwards & Brindley, 1996).

| Fully define probability distributions
A discrete random variable takes discrete values (e.g. 1, 2, 3, …), whereas a continuous random variable can take any value within a specified range (e.g. between 0 and 10). The probability mass function of a discrete variable X is written as f(x), and is just the probability that X takes each possible value of x, i.e. f(x) = P(X = x), where P(·) stands for the probability of occurrence of the event in parentheses.
For example, the Poisson distribution can be used for count data and is represented by where x are the possible values and there is just one parameter λ > 0 (e.g. Bolker, 2008). The corresponding cumulative distribution function is given by the upper case F(x) = P(X ≤ x) = ∑ x i=0 f(i). Note that sometimes F(x) is simply called the probability distribution function (Grimmett & Stirzaker, 1990), though this term can be ambiguous (e.g.

Cressie & Wikle, 2011 used it for the probability density function)
and so it may be best avoided. Explicitly stating that F(x) = P(X ≤ x) can avoid any confusion.
For a continuous variable X, we have the continuous probability density function f(x) and the cumulative probability distribution For example, the lognormal distribution is often used in population dynamics and has for parameters μ and σ (e.g. Bolker, 2008); log here is the natural logarithm (this is worth specifying and using log 10 for base-10 logarithm, though ln is also used for the natural logarithm). Note the definition of the domain (x > 0). Other distributions may take only positive integer values (e.g. Poisson distribution), any value between two bounds (e.g. uniform distribution), or any value between two positive values (e.g. bounded power-law distribution)-see Bolker (2008) and Edwards, Robinson, Plank, Baum, and Blanchard (2017). Defining the domain also helps the author confirm that the distribution is appropriate for the question at hand. For the normal distribution, since X can take any positive or negative value there is generally no need to specify that the domain is given by −∞ < x < ∞.
Defining the domain of indices (and parameters) is similarly necessary. For example, in state space models of animal movements, observations may start at time t = 1, but an unobserved initial location at t = 0 needs to be modelled and explicitly explained (e.g.

Auger-Méthé et al., 2016).
If a second random variable, Y, is being considered, then its density function is often expressed as f Y (y), and that for X would become f X (x). Alternatively, g(y) could be used. Note that f(y) does not work as it is not distinguishable from f(x); the f in Equation (18) represents the lognormal distribution, not the x. The analogous cumulative distribution function for Y would be F Y (y) or G(y).
Some distributions have a conventional shorthand. For example, X ∼ N( , 2 ) for a variable X that is normally distributed with mean μ and standard deviation σ; though when using N(0, 2) specify whether the 2 is the standard deviation or the variance.
While the shorthand for the Gamma distribution is generally X ∼ Gamma(a, b), it is important to define the parameters as the distribution can be parameterised using shape and either rate, scale or mean.

| Give equations of a model rather than just computer code
One reason that acronyms or words get used to identify variables may be that this is how they are written in computer code. Using words in code can be helpful because it can make the code easier to read and avoid typographical errors. One solution is to write the equations first and then have a comment in the corresponding code that links the words used in the code to the corresponding mathematical notation. A modern simpler alternative is the R package knitr (Xie, 2018), that interweaves the text and computer code in a single file, easily enabling the same succinct notation to be used throughout. Although writing the equations first may seem a necessary prerequisite to writing code, some people, especially with the popularity of R (R Core Team, 2018), are proficient programmers but are sometimes unable to translate the code into mathematical notation. For example, for a numeric vector x in R, the command is defined as creating a vector y where each element is the cumulative sum of the elements of x. That can seem more intuitive than having to express the same idea using an equation: for a vector x of length n, However, the verbal description is ambiguous, unlike Equation (19).
Similarly, it may not be obvious how to translate for loops into although l can be hard to distinguish from 1 or I (capital i).
A command such as cumsum() may just be part of the book-keeping involved when writing code to implement a model and may not require an equation. However, a log-likelihood function is usually an essential part of the model and should be written explicitly.
So although a piece of R code may be more intuitive than the corresponding equations, a drawback of just supplying code is that it relies on the reader to have knowledge of R. Programming languages evolve and fall out of favour, and R may not be around in 20 years, whereas properly documented equations will stand the test of time. In addition, while code can be added in supplementary materials, it is rarely included in the main text and properly verified by reviewers. The equations provide a clear description of what has been done and can often be incorporated in the main text.
2.9 | Abide by conventions (but still define everything) Table 1 gives some common mathematical uses of certain letters that it is worth being aware of when creating new notation. For example, compare the following descriptions: 1. The population size is given by where t is the population in year ε (ε = 1, 2, 3, …, Γ), g is the intrinsic growth rate at low population size and f is normally distributed random noise with mean σ and variance 2 .

The population size is given by
where X t is the population in year t (t = 1, 2, 3, …, T), r is the intrinsic growth rate at low population size and t is normally distributed random noise with mean μ and variance 2 .
While the two equations convey the same meaning, the choice of notation makes (22) less understandable than (23). Reading (22) is quite jarring and requires extra effort for the reader (acknowledging that we purposefully chose the notation to make such a point).
Within some fields, certain notation may be fairly standard.
However, notation should still be clearly defined, in particular because of the multidisciplinary nature of ecology. It may be best to try to retain the established convention of a particular field, though this may depend on how well thought-out the conventional notation was. If you decide to use nonconventional notation then maybe briefly clarify why (which may help convince others and establish a new convention). With multidisciplinary work it may be hard to retain all conventions (and appease everyone), further emphasising the need to define all notation upon first occurrence.
When learning a new subject area the equations can seem daunting at first and require careful examination to understand. But after reading a number of papers the equations (if conventions are established) often become familiar and require less effort to understand, as indeed does the subject area in general.

| Use parentheses and brackets only as necessary
Parentheses, (), are used around the arguments of a function, e.g.
f(x) in Equation (16), and to denote which calculations in an equation need to be done first, as in Equation (23 Parentheses are also used in the form x ∈ (0, 1) to represent 0 < x < 1, and similarly x ∈ [0, 1] means 0 ≤ x ≤ 1; a combination such as x ∈ [0, 1) consequently means 0 ≤ x < 1.

| Equations should be part of sentences
The equations above are all part of sentences. Some of those in the middle of a sentence may require a comma, as in Equation (6), or not, as in Equation (4), and those completing a sentence are

| Revise notation early on if necessary
As well as thinking about notation before defining a model, it can be useful to revisit the notation early on in a project once some of the details have become more fleshed out. Once a project has proceeded far enough-for example, two papers already published with thousands of lines of computer code shared with others-it can be very hard to then change the notation to make it clearer. Thus, time spent revisiting notation early on may be time well spent. This is similar to functionalising computer code-it can be hard to take a pause and rewrite code in a more user-friendly way, but such efforts tend to pay off in the future. A related point is the need for careful proofreading of equations, as equations may be reformatted during the publishing process and publishers may have their own minor typesetting rules that authors are not aware of and that differ between journals-these may or may not impact comprehension. Also, letters should have a unique definition in a single piece of work (though we violate that here because we are giving independent examples).

| An example of confusing notation
One example we have seen that highlights several of the problems outlined above concerns fish growth and is which relates the standard deviation of the length of a fish of age a and sex s (where s = 1 for females and s = 2 for males), sd S a , to the standard deviation of the distribution of log(length) at age a for sex s, s a , where L S a is the length at age a for sex s. The use of a superscript s to index sex requires another higher-level superscript in the term s 2 a to denote that the standard deviation term s a is being squared. The sd on the right-hand side stands for standard deviation (one letter would suffice, especially with s being used elsewhere), and the superscript S is capitalised on the right-hand side but not on the left. Equation (25) is simply scaling a standard deviation by a length value, but looks much more complicated than that due to the choice of notation.

| D ISCUSS I ON
We hope these guidelines will be helpful when writing your own equations and will improve the future comprehension and reproducibility of ecological models. We re-iterate that these are guidelines but not rules, and should be overlooked when appropriate.

ACK N OWLED G EM ENTS
We thank our colleagues Jaclyn Cleary, Brooke Davis, Wayne Hajas, James Robinson, Catarina Wor and Brianna Wright for encouragement and constructive feedback. We thank three anonymous reviewers, the Associate Editor and Robert O'Hara for their insightful comments and suggestions that also improved this work. MAM acknowledges an NSERC discovery grant.

AUTH O R S' CO NTR I B UTI O N S
A.E. conceived the idea for this work and then A.E. and M.A.M.
wrote it together.

DATA ACCE SS I B I LIT Y
This work uses no data.