A guide to writing mathematics

1. Writing mathematics

3. Whitespace

2. Typesetting text

4. Typesetting mathematics

1 Writing mathematics

A good mathematical text is able to convey a logical argument with as few technicalities as possible. Thus, a well-written text contains more text than mathematical symbols. But what should you write? Here are some tips on what to write, and how to write it.

1.1 Know your audience

One of the questions that students ask most often is “how much background material should I provide in my thesis?”, or variants like “should I include this theorem?” or “should I include this proof?”. What the student is really asking is: Who am I writing for?

When writing a bachelor or master thesis, you can decide who your target audience is. (Writing a scientific paper follows an entirely different logic, and is not covered here.) A common choice is to pretend you are writing for one of your fellow students – perhaps someone who has taken many of the same courses as you have, but who does not necessarily know about your thesis subject. Thinking about your target audience every now and then will help you decide what background material to include, and what you can safely assume is common knowledge.

That being said, the only person you can really be sure will read your thesis is your thesis examiner. While your examiner will know much more about the subject than your fellow student does, it is probably not so easy to predict exactly what they know, and what they don’t. Therefore, it's a good idea to choose a fellow student as your target audience.

1.2 Explain what you have done

Don’t let your results speak for themselves! While it might be obvious to you why your theorem is important, it might not be so obvious to everyone else – even to a professor working in your field. You need to explain what you have done and why you have done it. Use phrases like “We will show …”, “We have proved …”, “We implemented …”, both in the introduction and in the main text. (It is common to use the first-person plural we, even when you have done everything yourself.)

You should consider ending your thesis with a Summary or Conclusions section where you list your main findings. This is also the place to mention what you haven’t done, but would have liked to – your thesis examiner will appreciate that you are able to think a little bit further.

When explaining your findings, you shouldn’t be afraid that you are over-explaining or bragging about your results. Your thesis examiner is experienced in reading text, and will simply skip a sentence or paragraph they already understand. On the other hand, if your examiner doesn’t understand the significance of your result because you haven’t explained it well enough, then you risk getting a worse grade than you deserve.

1.3 Structure your text

Like any other scientific text, your thesis will be structured into \sections and \subsections (as well as \part and \chapter, if you are using the book or report document classes). Mathematical texts require more structure, however, which is where definitions, theorems, proofs and so on come in.

1.3.1 Structure your text into sections

The article document class provides three levels of headings: \section, \subsection and \subsubsection. With the book and report document classes you get two additional levels: \part and \chapter.

Before you start writing, work out a tentative framework of your thesis with chapter and section titles, as well as a short description of each part. Start with only one or two levels of heading (e.g., chapters+sections, or sections+subsections). Only use higher levels of heading (i.e., \subsection and \subsubsection) if you really need them; as Robert Bringhurst writes in his book The Elements of Typographic Style,

use as many levels of headings as you need: no more, and no fewer.

The structure of any level of heading, be it a chapter, a section or a subsection, follows a simple logic, summarized here:

1. Topic X
Write a short introduction to topic X, including an overview of the rest of this section. Try to keep the introduction non-technical; it may include mathematical results, but only if they serve as an introduction to the topic. If you see your introduction becoming too technical, consider moving parts of it into a sublevel.
1.1 Some aspect of topic X
A level must contain at least two headings (say, 1.1 and 1.2). If a level contains only one heading, merge it with its “parent”.
1.2 Some other aspect of topic X
Each sublevel may contain further sub-sublevels, if needed (say, 1.2.1, 1.2.2, …). If so, remember to write an introduction before the first sub-sublevel (as described above).
1.3 Another aspect of topic X
The theory developed under one subheader may depend on that from another subheader, but keep in mind that your sectioning should reflect the logical structure of your work. If, say, the work under heading 1.2 relates entirely to that under heading 1.1, consider making it part of 1.1 instead.
2. Topic Y

1.3.2 Structure your text around definitions, theorems, etc.

Definitions, theorems, examples and its siblings are all defined in theorem environments such as

\begin{definition}
A \emph{prime number} is a natural number greater than $1$ which is only divisible by itself and $1$.
\end{definition}

Structuring your text around definitions, theorems, lemmas, remarks, examples, etc. will make it more easy to read, and will help you structure your thoughts. It makes it much more clear to the reader what are hard facts, and what is more informal discussion. Your text should include a healthy dose of both.

In order to increase readability, don’t let definition or theorem environments (or their siblings) “touch”; try to write at least one sentence before such environments as an informal introduction.

1.4 Write complete sentences

We all learnt it in school: Write complete sentences! Many of us still break this rule, particularly when we are writing mathematical texts. To understand the issue better, it helps to know some basic ideas from syntax.

A sentence is usually composed of an independent clause (e.g. Bob sings) and zero or more dependent clauses (e.g., because he is happy). An independent clause consists of a subject and a predicate:

Bob sings
The noun Bob is the subject and the verb sings is the predicate
x = 5
The noun x is the subject and = 5 (consisting of the verb = and the object 5) is the predicate

Dependent clauses usually begin with a dependent word (e.g., because) and continues with a subject and a predicate (e.g., he is happy).

An incomplete sentence is any sentence which does not adhere to this simple pattern. Some examples:

The world-famous juggler who has won several prizes for her performances.
This sentence lacks a predicate. (The sentence does have a verb, but it belongs to the dependent clause who has won….)
Will be back in a few hours.
This sentence lacks a subject. (Although it's usually clear from the context who the subject is, it is inappropriate to drop the subject in formal writing.)
Because he was late for the bus.
This sentence is a dependent clause.

Mathematical expressions can themselves act as both subject and predicate (as in the example x = 5), but you should be very careful about sentences in which mathematical formulae constitute the entire subject or predicate:

This sentence might be interpreted in two ways: The entire sentence could be the subject and the predicate is lacking; or is the subject and is the predicate.
This sentence starts with a mathematical symbol (the subject ), which is bad practice.

Both examples are harder to decipher than they could have been. As far as possible, avoid subjects or predicates consisting entirely of mathematical symbols. Instead, use both words and symbols in both subject and predicate, or push the formula into a dependent clause:

Here there is no ambiguity: is the subject and is the predicate.
This alternative solution – moving the formula into a dependent clause – also solves the problem.
This subject consists both of words and symbols

1.5 Make the most out of feedback

It can be disheartening to receive negative feedback on a manuscript. But try to make the best of it, and take it for what it is: Someone is helping you to do better.

If your supervisor returns your manuscript full of strange symbols, they might be copy editing marks. These are a standardised set of symbols employed by copy editors to correct manuscripts (or, at least they used to, before the advent of Microsoft Word). The NY Book Editors has a nice overview of copy editing marks.

1.6 Use a good editor

There are plenty of good TeX editors available. In my own opinion, Texstudio is by far the best; others include Texniccenter, Texmaker and Texworks. Although the choice of editor is mostly a question of preference, a good editor should at least have the following features:

Do yourself a favour and use a good editor. Your TeX document will benefit from it.

1.7 Cross referencing

When referring to a particular theorem, definition, chapter, section or similar, you should capitalize the first letter: Theorem 5, Chapter 8, Section 3, etc. Remember to insert a non-breaking space between the label and the preceding word: Theorem~5, Lemma~\ref{mylemma} (see §3.5 Learn when to use a tie).

If you use the cleverref package then the command \Cref{somelabel} will print the type of environment (say, “Theorem” or “Chapter”) as well as the label.

1.8 Citing others’ work

To cite, or not to cite? Before citing a book, paper, website or whatever, make sure that you have read it, that you have understood it (at least partly), and that it's relevant.

If you need a theorem which is not common knowledge then it's certainly appropriate to include it in your manuscript, as long as you cite the original author:

\begin{theorem}[Brouwer fixed point theorem {\cite{Brouwer1910}}]
Every continuous function from a compact, convex subset of $\mathbb{R}^n$ to itself has a fixed point.
\end{theorem}

If you need to point to a specific part of a reference, such as a theorem or chapter, then write either, say, Theorem 3 of [1], or use the alternative argument to the \cite command: \cite[Theorem~3]{SomePaper}.

See e.g. the LaTeX Wikibook for more on bibliographies.