Displaying equations in text

When preparing your publication, take care with fractions and any complex mathematical equations. It can sometimes be useful to create a PDF from the original Word document that you are editing to show how the equations should be displayed, in case the equation formatting is lost during editing. Decide in advance whether to use an equation editing tool, and try to use the same approach throught.

This section covers:

Inline versus displayed equations

Mathematics may be incorporated into the lines of text (‘inline’) or set off on its own lines (‘displayed’).

We used Pythagoras’s theorem, \(a^2+b^2=c^2\), to find the long side of the triangle.

We used Pythagoras’s theorem,
to find the long side of the triangle.

A mathematics text will usually use both inline and displayed equations:

  • Use inline mathematics if the expression is simple and short, and does not need to be referred to later on.
  • Use displayed mathematics if the expression is likely to have a line break in it, looks cramped, forces the lines of text apart or must be referred to later in the text (in which case it should be numbered; see Numbering equations).

Use different layouts for inline and displayed equations. Note the positions of the limits on the integral sign, for example:

Inline Displayed
\( \int_0^1 f(x) dx = 3 \) \[ \int_0^1 f(x) dx = 3 \]
\(\sum_{i=0}^n a_i=1 \) \[\sum_{i=0}^n a_i=1 \]
\( \lim_{x \rightarrow \infty} f(x)=b \) \[ \lim_{x \rightarrow \infty} f(x)=b \]
\( \frac{x+y}{z} \) or (preferred if inline) \( (x+y)/z\) \[ \frac{x+y}{z} \]

The exact style of expression (eg whether the displayed equations are centred, left-aligned or indented) is determined by the publication you are writing for.

Caution! Microsoft Word has a bug that causes it to set any equation that shares a line with non-equation text as if it is inline rather than displayed. Putting the punctuation inside the equation environment may help, but only if the equations are not numbered (see Punctuating equations).

Consider other tools for layout, such as MathType (which works with Word) or LaTeX (which is a Word alternative). (See Using LaTeX.)

Return to top

Punctuating equations

Punctuate a sentence containing mathematics as if it were any other sentence, even if it includes displayed equations.

Punctuate according to the equation’s function in the sentence:

If \(x=1\), the model is a simple linear one.

The equation, \(x=1\), is acting as a verbal phrase, so add a comma after the introductory clause. Structurally, this sentence is the same as:
If Roger is tall, ask him to try out for the basketball team.

On the other hand:

If \(x=1\) is taken to hold for all \(y\) …

The equation is acting like a noun, so you do not add the comma. Structurally, it is the same as:
If Roger joins the basketball team …

Tip. Reading the sentence out loud may help show where to put the punctuation. Place commas and full stops where they would normally fall for text.

Do not introduce every equation with a colon:

Bragg’s law may be written as
                                                            \[ d=\frac{n\lambda}{2\sin\theta} ,\]
and can be used to help us find the atomic separations.

Ensure that the punctuation stands out from the other symbols and does not get lost:

For all \(X>W\), \(X^\prime\) is also …

The comma between \(W\) and \(X\) can easily be lost, making it look like:
For all \(X>WX^\prime\) is also …

Rewrite the sentence:
For all \(X>W\), we find that \(X^\prime\) is also …

Return to top

Spacing in equations

Equation editors automatically put correct spacing around symbols. If typing mathematics from the keyboard, use nonbreaking spaces, and consider using thin spaces to add clarity:

f(x,y) = x + y

But compare these with the result from using an equation editor:

\(f\left(x,y\right)=x+y \)

The equation editor makes many spacing adjustments, and even modifies the parentheses, and never makes them italic by accident. In general, use an equation editor.

Return to top

Line breaks in equations

If an equation breaks over the line, it is preferable to break before an operator (eg +, −, ×), and ideally not within a grouped expression (eg something surrounded by brackets). For a displayed equation, align the carried-over operator under the first symbol after the = sign in the top line:

\begin{aligned}f=&(a+b)-x^2(2e-cz) \\ &+4m+e+cz \end{aligned}


\begin{aligned}f=&(a+b)-x^2(2e \\ &-cz) +4m+e+cz \end{aligned}

If an equation must be broken more than once, align subsequent lines directly beneath the second line:

\begin{aligned} f=&(a+b)-x^2(2e-cz) \\ &+4m -n^2(2f-bz)\\ &+4n-m^2(2b-ac)+~\cdots{} \end{aligned}

If the equation must be broken inside fences, indicate this by keeping all lines right-aligned within the fences:

\begin{aligned} f=(a+b) \big[ x^2(2e-cz) &+4m -n^2(2f-bz)  \\ &  +4n-m^2(2b-ac) \big] \end{aligned}

If the left-hand side of the equation is long, indent the second line, with the carried-over operator aligned under the first operator in the top line:

\begin{aligned} (a&+b)-x^2(2e-cz)+4m \\ &= f \end{aligned}

but also consider swapping the sides:

Return to top

Grouping and listing equations

When presenting a series of displayed equations without intervening text, do not add commas to the end of each one if they form a sequence:

We find that
\begin{aligned} f(x)&=(x-1)^2+(x+2)^2 \\ &=(x-1)(x-1)+(x+2)(x+2) \\ &=x^2-2x+1+x^2+4x+4 \\ &= 2x^2+2x+5 \end{aligned}

Note that these are aligned on the ‘=’ sign.

When presenting a list of equations not derived from each other, use commas:

Earlier results include
\begin{aligned} \psi_1(\theta)&=\frac{(m-1)}{p}\psi(\theta),\\ \zeta(s)&=\sum_{n=1}^\infty\frac{1}{n^s}, \\ f(u)&=\sqrt{1-c^2\phi^2(u)}. \end{aligned}

There is no need for and before the last equation, but it can be included.

When presenting many definitions of symbols, consider presenting them as a series of equations, rather than a bulleted list:

As is conventional, we define:
\(y_{i,j}=\) the observed result of using treatment \(i\) on cohort \(j\),
\(T_{i\cdot}=\) the sum of the observations for the \(i\)th treatment,
\(T_{\cdot{}j}=\) the sum of the observations for the \(j\)th cohort.

Return to top

Numbering equations

Equations may be unnumbered, all numbered, or only numbered when cross-referenced. Always number sequentially. For long works, equations may be numbered by chapter. Usually, the numbers are in parentheses and right-aligned:

\begin{equation}\mathrm{~~~~~~~~~~~~~~~~} F_{hkl} = \sum_{j=1}^N f_j e^{-2\pi{}i\left(hx_i+ky_i+lz_i\right)}  \mathrm{~~~~~~~~~~~~~(2)}\end{equation}

 \begin{equation}\mathrm{~~~~~~~~~~~~~~~~~~~~~~~~}W = Fd\cos\theta \mathrm{~~~~~~~~~~~~~~~~~~(3.2)}\end{equation}

When presenting a sequence of equations as a block, the following options exist:

  • All equations have their own numbers.
  • The sequence is given a single number.
  • Only the final result is numbered.
  • The equations in the sequence have numbers of the form (2a), (2b) and so on.

Cite an equation in the text using a capital letter followed by the number; do not enclose the number in parentheses:

Equation 2     Equations 2–4

Refer to Equation 2.

Check the style guide of the publication you are writing for, and think about your own cross-referencing needs.

Return to top

User login

... or purchase now

An individual subscription is only A$60 per year

Group and student discounts may apply

Australian manual of scientific style Start communicating effectively