You finish a proof, and the textbook ends with three mysterious letters: QED. Your teacher uses a small black square \blacksquare. A friend draws \square. Everyone seems to agree the proof is over — but what do the marks actually mean, and is any of them required?

The short answer: QED means "which was to be shown," it has been the standard end-of-proof mark in Western mathematics for about four centuries, and it is no longer mandatory. What is mandatory is some clear signal to your reader that the proof has ended and the claim is established. The symbol is the signal, whatever form you pick.

What QED stands for

QED is the abbreviation of the Latin phrase quod erat demonstrandum — literally "that which was to be demonstrated." It is the translation of a Greek phrase, hoper edei deixai, that Euclid used at the end of his geometric proofs in the Elements around 300 BCE. European mathematicians adopted the Latin version when translating and extending Greek mathematics in the Renaissance, and for centuries "QED" was the standard way to announce that a proof was complete.

The phrase has two halves worth noticing:

So when you write QED, you are saying: "The thing I promised you I would prove, I have just proved. This proof is now complete."

What symbols are in use today

The tradition has several close relatives, all doing the same job — this proof ends here:

All of these are legitimate. The one you pick is a stylistic choice, not a mathematical one.

Why the mark matters at all: a reader who is following a proof carefully needs to know when the argument has ended. Without an end-mark, the reader might keep looking for one more step that confirms the conclusion — and a proof that leaves the reader wondering "is it done?" has failed part of its job. A clear end-mark tells the reader: the argument is complete; you may now stop verifying and accept the conclusion.

A concrete example

Claim. For every integer n, the number n^2 + n is even.

Proof. Consider two cases.

Case 1: n is even. Then n = 2k for some integer k, and

n^2 + n = 4k^2 + 2k = 2(2k^2 + k),

which is even because 2k^2 + k is an integer.

Case 2: n is odd. Then n = 2k + 1 for some integer k, and

n^2 + n = (2k+1)^2 + (2k+1) = (2k+1)(2k+2) = 2(2k+1)(k+1),

which is even because (2k+1)(k+1) is an integer.

In either case, n^2 + n is even. \blacksquare

The black square at the end is the QED. The reader now knows the proof has ended and the claim is established for every integer n.

How the mark changes depending on context

Four ways to mark the end of a proofFour equivalent end-of-proof markings shown side by side: the traditional QED, the solid square tombstone, the hollow square, and a plain blank-line convention. A draggable dot selects which marking to highlight and shows how each reads at the end of a proof. ...continuing the proof... $n^2 + n = 2(2k^2 + k)$, which is even because $2k^2 + k$ is an integer. In either case, $n^2 + n$ is even. drag to see four equivalent end-of-proof markings
Four equivalent ways to signal the end of a proof. The mathematics is identical in each case; the choice is purely a stylistic one based on the audience and the typography.

Practical guidance

When the mark is missing

If a proof ends with no mark at all, it is not automatically invalid. Some mathematicians — especially in informal writing — rely on context: the next paragraph's first sentence ("From this it follows that..." or "We have therefore established...") serves as the implicit end-of-proof signal. Others use a section break, a horizontal rule, or simply a paragraph of blank space.

The only real failure is a proof that ends mid-thought — where the reader cannot tell whether there were more steps to come. That happens when the final line does not match the stated conclusion and no end-mark resolves the ambiguity. The mark, or a clear alternative signal, is the fix.

The short summary

A good proof ends with confidence: the last line matches the claim, the end-mark sits neatly on the right, and the reader can now move on without wondering whether more was supposed to come.

Related: Mathematical Proof — Direct Proof · Because vs If Inside a Proof · Do I Need to State Every Definition? · Colour-Coded Direct Proof Template