MATH-499 · Lesson 9 of 12 · 23 min

Mathematical writing: structure, definitions and proofs

The thesis is the main product of an honours project, and most of the marks depend on it. Its examiners will judge the mathematics through the writing: a correct argument written confusingly reads as a weak argument, and a modest result written with clarity and insight reads as a strong one. Good mathematical writing is not a matter of talent or ornament. It is a craft with learnable principles, refined over generations and set out by mathematicians such as Paul Halmos, whose essay How to Write Mathematics appeared in 1970, and Donald Knuth, whose Stanford course notes Mathematical Writing were published in 1989. This lesson distils those principles and applies them to the thesis.

Write for a reader

Everything follows from one question: who is the reader, and what do they need? For an honours thesis the natural reader is a capable student who has completed the same core courses as you but has not worked on your topic, a reader very like the second examiner. That reader knows what a group, a metric space and a bijection are. They do not know your notation, your examples, or why your question is interesting. Write for that person and both examiners will be well served: your supervisor will appreciate the clarity, and the second reader will be able to follow.

Halmos's first advice was to have something to say and to know what it is before you start writing. That sounds obvious but it is the root of most bad writing: an author who is still working out what the main result is will produce a document that wanders. His second advice was to write in spirals: draft the whole thing roughly, then revise everything, then revise again, each pass improving every part rather than perfecting chapter 1 before starting chapter 2.

The structure of a thesis

A mathematics thesis typically has the structure shown below. The proportions vary, but the logic does not: the reader is first told what the thesis is about and what it achieves, then given the background needed, then shown the results with proofs, then given computations and examples, and finally told what remains open.

A stacked bar representing a 35-page thesis divided into title page and abstract, introduction of about 4 pages, background of about 6 pages, main results of about 12 pages, computations of about 5 pages, further questions of about 2 pages, references and an appendix. Labels note that abstract, introduction and theorem statements are read by everyone, and proofs line by line by examiners.
The anatomy of a typical honours thesis

The abstract, of about 150 to 250 words, states the problem and the main results precisely. It is not an introduction to the introduction; a reader of the abstract alone should know what you proved.

The introduction is the most important chapter and the one most often written badly. It should state the question in plain terms, explain why it is interesting, give the main results, ideally in precise form, set them in the context of earlier work with citations, sketch the ideas of the proofs, and describe the organization of the thesis. Many readers will read only the abstract and the introduction, so they must be self-sufficient. Write the introduction last, or at least rewrite it last, because only then do you know exactly what the thesis contains.

The background chapter collects definitions and known results the reader needs, with references for results that are quoted without proof. Keep it focused: include what is used later and nothing else. Long reviews of material the reader does not need for your results dilute the thesis.

The main chapters present your results. Order them so that each builds on the previous ones, and lead the reader through them with motivation: why this lemma, why this case first, what would fail without this hypothesis. The computational chapter or sections describe experiments and their outcomes, with enough detail that they could be reproduced. A final chapter on further questions shows that you understand where the work leads.

Definitions

State definitions precisely, and mark the term being defined, conventionally in italics or bold. Use the word if in definitions, even though it means if and only if, which is a long-standing convention. Follow every important definition with an example and, where helpful, a non-example. Define each term once, before it is used, and never redefine a term with a different meaning.

Definitions rewritten for precision and with examples
Weak versionBetter version
A representation is when n is written as consecutive numbers added up.A representation of a positive integer n is a finite sequence of one or more consecutive positive integers whose sum is n.
r(n) is the number of these.Let r(n) denote the number of representations of n. For example, r(15) = 4, since 15, 7 + 8, 4 + 5 + 6 and 1 + 2 + 3 + 4 + 5 are the representations of 15.
A number is polite if it can be done in a non-trivial way.We call n polite if it has a representation with at least two terms. Thus 15 is polite and 16 is not.

Theorems and proofs

State theorems completely, with all hypotheses, so that the statement can be understood without reading the surrounding text. A reader who looks up Theorem 2 should not have to search backward for the meaning of \(n\) or the standing assumptions. Number theorems, lemmas, propositions, corollaries, definitions and examples, either in one sequence or separately, and refer to them by number.

A proof should begin by indicating its strategy when it is not obvious: we construct a bijection, we argue by induction on \(k\), we suppose the contrary. It should be divided into steps or cases with signposts. It should end clearly, with a symbol such as \(\blacksquare\) or the words this completes the proof. Within a proof, say why each nontrivial step holds, by citing a lemma, an earlier equation or a definition.

The right level of detail depends on the reader. Steps that a competent reader can verify in a few seconds can be stated without justification; steps that require a calculation should include it, or at least its key line; steps that use an idea should explain the idea. Words such as clearly, obviously and trivially should be used sparingly: they are harmless when the step really is immediate, but they are infuriating, and suspicious to an examiner, when the step is not. A useful test is to imagine your reader asking why at each sentence. If they would, answer in the text.

Words and symbols

Mathematics is written in sentences, and formulas are parts of sentences, with punctuation. Displayed equations end with a comma or period when they end a clause. Several conventions make text easier to read.

Do not begin a sentence with a symbol: write the integer \(n\) is odd rather than starting with \(n\). Separate adjacent formulas with words: for every \(x \in S\), the element \(x^2\) is... rather than for \(x \in S\) \(x^2\) is.... Avoid logical symbols such as \(\forall\), \(\exists\), \(\Rightarrow\) and \(\therefore\) in running text; they belong in formulas, and in prose the words for all, there exists and implies read better. Use notation consistently, choose it to be suggestive, with \(k\) for numbers of terms and \(a\) for starting values for example, and avoid introducing a symbol that is used only once. Display important formulas and number those that are referred to later.

Mathematical writing traditionally uses we, meaning the author and reader together: we now show, we obtain. It is acceptable to use I for genuine personal statements, such as I computed these values in SageMath, and many style guides now accept I generally; follow your supervisor's preference. Use the present tense for mathematics, which is timeless: Theorem 2 shows, not Theorem 2 showed.

Revision

First drafts of mathematical writing are always poor, even for experienced authors. Quality comes from revision. A good process is to draft quickly and completely, then revise for structure, then for proofs and correctness, then for sentences and style, then for consistency of notation and references. Leave time between passes so that you read with fresh eyes. Read the text aloud: awkward sentences and missing words become obvious. Make a reverse outline, a list of what each paragraph actually says, and check that the sequence makes sense. Give drafts to your supervisor early, and also to a fellow student, who is closer to the target reader than your supervisor is.

Some problems are easy to detect mechanically: very long sentences, sentences beginning with a symbol, overused words of reassurance, and repeated words. The program below is a small checker of this kind. It is no substitute for reading, but it catches things that tired eyes miss.

A simple style checker for drafts of mathematical prose
import re

draft = """Clearly the map is a bijection. n = 2^e m with m odd. We now show that r(n) depends only on m.
It is obvious that the representation with k terms starting at a satisfies the equation, and it is also
trivially true that the factors have opposite parity because their difference is odd and therefore one
of them is odd and the other is even and so the odd one divides n which is what we wanted to show.
Theorem 2 shows that r(15) = 4. The the proof is complete."""

sentences = [s.strip() for s in re.split(r'(?<=[.!?])\s+', draft.replace('\n', ' ')) if s.strip()]
reassurance = re.compile(r'\b(clearly|obviously|obvious|trivially|easy to see)\b', re.I)
for i, s in enumerate(sentences, 1):
    notes = []
    words = s.split()
    if len(words) > 30:
        notes.append(f"long sentence ({len(words)} words)")
    if re.match(r'^[a-z]\b|^[a-z]\s*[=<>(]', s):
        notes.append("starts with a symbol")
    for m in reassurance.finditer(s):
        notes.append(f"check '{m.group(0)}'")
    for a, b in zip(words, words[1:]):
        if a.lower() == b.lower():
            notes.append(f"repeated word '{a}'")
    if notes:
        print(f"sentence {i}: " + "; ".join(notes))
Output
sentence 1: check 'Clearly'
sentence 2: starts with a symbol
sentence 4: long sentence (58 words); check 'obvious'; check 'trivially'
sentence 6: repeated word 'The'

Rewriting a proof

The best way to learn mathematical writing is to see a passage improved. Here is a first draft of the proof of Theorem 1, direction one, as a student might write it.

Draft: Suppose n is a sum. Then 2n = k(2a+k-1) and one is odd so n has an odd factor so it isn't a power of 2. Obviously k has to be at least 2.

The draft has the right idea but several faults. It does not say what kind of sum, or what \(k\) and \(a\) are. It does not say why one factor is odd, or why the odd factor is greater than 1, which is the whole point, since every number has the odd factor 1. The word obviously points at a hypothesis rather than a deduction. The revised version reads as follows.

Revised: Suppose that \(n\) is the sum of \(k \ge 2\) consecutive positive integers, the smallest of which is \(a \ge 1\). Summing the arithmetic progression gives \(2n = k(2a + k - 1)\). The two factors on the right differ by \(2a - 1\), which is odd, so exactly one of them is odd. Both factors exceed 1, since \(k \ge 2\) and \(2a + k - 1 \ge k + 1 \ge 3\). Hence \(2n\), and therefore \(n\), has an odd divisor greater than 1, so \(n\) is not a power of 2.

The revision is longer, but every sentence does work, the reader never has to guess, and the crucial point, that the odd factor exceeds 1, is stated and justified.

Figures, tables and code

Figures and tables should be numbered, captioned and referred to in the text; a figure that the text never mentions should usually be removed. Captions should be informative enough that the figure can be understood on its own. Code belongs in an appendix or a repository, with only short illustrative excerpts in the main text; describe in words what each program does and what its output shows. Tables of computed values should state how they were computed and with what software.

Citing and attributing

Cite the source of every result you did not prove yourself, every proof you adapted and every idea you borrowed, at the point where you use it. Attribute results to their discoverers when known, and cite the source you actually used: if you learned a theorem from a 2007 expository paper, cite that paper, and also the original if you have checked it. Make it clear which results are new. A sentence such as the results of Section 4 are, to the best of my knowledge, new; the remaining results are known, with references given at each point, helps examiners enormously.

Worked problem

Planning the length of each chapter

Amara's thesis should be about 35 pages. She estimates 400 words per page of text, with displayed equations and figures taking space. How should she allocate words across chapters?

Show solution
  1. Fix proportions from the structure: the introduction gets about an eighth of the page budget, the background about a sixth, the main results about a third, the computations about a seventh and further questions about a twentieth, with the remainder for front matter, references and appendix.
  2. Convert to pages: about 4, 6, 12, 5 and 2 pages respectively.
  3. Adjust for density: proof-heavy chapters have more displays, so use fewer words per page there, about 300; prose chapters about 450.
  4. Track progress weekly with a word count per chapter against the plan.

Answer: A plan of roughly 1,800 words for the introduction, 2,500 for background, 3,600 for main results, 2,000 for computations and 900 for further questions gives a balanced 35-page thesis. The plan is a guide: if the main results grow, shorten the background, not the proofs.

Common mistakes

  • MistakeWriting the introduction first and never revising it.

    InsteadDraft it early to orient yourself, but rewrite it last when you know what the thesis contains.

  • MistakeStating theorems that depend on unstated standing assumptions.

    InsteadMake every theorem statement self-contained.

  • MistakeUsing clearly or obviously for steps that require thought.

    InsteadJustify every step a competent reader could not verify at once.

  • MistakeBeginning sentences with symbols and using logical symbols in prose.

    InsteadBegin with words and write for all, there exists and implies in running text.

  • MistakePadding the background chapter with material not used later.

    InsteadInclude only what the reader needs for your results.

Summary and key terms

  • Write for a capable reader who has not worked on your topic, essentially the second examiner.
  • A thesis has an abstract, an introduction that states results and context, focused background, main results, computations and further questions.
  • Definitions are precise and followed by examples; theorems are self-contained; proofs announce strategy, give reasons and end clearly.
  • Formulas are parts of sentences: punctuate them, separate them with words and avoid logical symbols in prose.
  • Quality comes from repeated revision: draft fully, then revise for structure, correctness, style and consistency.
  • Cite every borrowed result and idea where it is used, and make clear which results are new.
abstract
A short summary stating the problem and main results precisely.
signposting
Phrases that tell the reader the structure of an argument, such as we argue by induction.
reverse outline
A list of what each paragraph of a draft actually says, used to check structure.
self-contained statement
A theorem statement that includes all its hypotheses and notation.
standing assumption
A hypothesis assumed throughout a section; it must be stated clearly.
attribution
Crediting a result or idea to its originator and source.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. Rewrite: \(\forall n \in \mathbb{N}\) not a power of 2 \(\exists\) a rep with \(\ge 2\) terms.

    Show answer

    Every positive integer that is not a power of 2 has a representation with at least two terms.

  2. What is wrong with this abstract opening: In this thesis we will look at some interesting questions about numbers?

    Show answer

    It says nothing specific. The abstract should state the problem and results, for example: We prove that the number of representations of n as a sum of consecutive positive integers equals the number of odd divisors of n, and determine the possible numbers of terms.

  3. Run the style checker. Which issues does it report in the sample draft?

    Show answer

    A reassurance word in sentence 1 (clearly), a symbol at the start of sentence 2, a 58-word sentence 4 that also contains obvious and trivially, and the repeated word in the final sentence, The the.

  4. Give three things the introduction of a thesis should contain.

    Show answer

    The question in plain terms and why it matters; the main results stated precisely; context with citations to earlier work. Also a sketch of the methods and the organization of the thesis.

  5. Why should a theorem statement not rely on a standing assumption mentioned three pages earlier?

    Show answer

    Readers often look up a theorem directly; a self-contained statement can be understood and quoted correctly without searching.

  6. Revise: The proof is trivial by the lemma.

    Show answer

    For example: Applying Lemma 3 with \(d = n/k\) gives the required factorization, which proves the theorem.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz