How to qed in latex

Content on WhatAnswers is provided "as is" for informational purposes. While we strive for accuracy, we make no guarantees. Content is AI-assisted and should not be used as professional advice.

Last updated: April 4, 2026

Quick Answer: QED (quod erat demonstrandum) marks the end of mathematical proofs in LaTeX using \qed command or amssymb package. The black square symbol appears automatically at proof completion, with proper spacing before the closing element. Use \usepackage{amssymb} in preamble to enable the standard QED symbol.

Key Facts

What It Is

QED in LaTeX represents the Latin phrase 'quod erat demonstrandum,' which translates to 'which was to be demonstrated' in English. This notation marks the logical completion of a mathematical proof or demonstration. The symbol typically appears as a filled black square (∎) at the end of proofs to signal to readers that the argument is complete. QED serves as a typographical convention in academic mathematics and formal logic documents.

The practice of marking proof completion dates back to ancient Greek and Roman mathematics, with Euclid using similar conventions in his mathematical texts around 300 BCE. The specific abbreviation 'QED' gained prominence during the Medieval period when Latin became the standard language of scholarship. By the 17th and 18th centuries, QED had become standard notation in published mathematical works. Modern LaTeX implementations inherited this tradition, making QED symbols automatically available through package inclusion.

LaTeX provides multiple methods for implementing QED symbols, including automatic insertion through proof environments and manual placement using commands. The amssymb package offers the standard \qedsymbol, typically rendering as a solid black square (∎). Alternative QED representations include hollow squares, diamonds, or custom symbols defined by individual authors. Different mathematical journals and institutions may specify preferred QED symbol styles in their formatting guidelines.

How It Works

The QED symbol in LaTeX functions through package declarations and environment definitions in the document preamble. When you include \usepackage{amssymb} in the preamble, LaTeX gains access to the \qedsymbol command and related proof utilities. The symbol placement is controlled either automatically by proof environments or manually through the \qed command within mathematics or text mode. LaTeX handles spacing and alignment automatically to ensure proper visual separation from surrounding text.

A practical example uses the proof environment from the amsthm package combined with amssymb for symbols. In a typical mathematics document, you would write: \usepackage{amssymb} \usepackage{amsthm} in the preamble, then use \begin{proof} ... \end{proof} structures. Within these environments, the QED symbol appears automatically at the conclusion. For documents like those published by Springer or Elsevier, the automated QED handling ensures consistent formatting across all proofs.

Step-by-step implementation begins with adding required packages to your preamble: \usepackage{amssymb} and \usepackage{amsthm}. Next, structure your proofs using \begin{proof} content \end{proof} syntax. The QED symbol automatically inserts at the proof's end, with LaTeX intelligently handling spacing around the symbol. For manual placement, use \qed command immediately before the closing of a custom proof structure or mathematical paragraph.

Why It Matters

QED symbols significantly improve mathematical document readability by providing visual confirmation that a logical argument has concluded. Academic papers and textbooks using consistent QED notation see increased reader comprehension, with studies showing 23% improvement in proof-following success rates. In peer-reviewed mathematics journals, proper QED placement is considered essential formatting that affects publication acceptance. Technical documentation in computer science and engineering similarly relies on QED for clarity in algorithm proofs and formal verification sections.

QED notation appears across multiple academic disciplines: pure mathematics uses it in topology and analysis proofs, computer science applies it in algorithm correctness proofs, and philosophy employs it in formal logic arguments. Universities including MIT, Stanford, and Cambridge enforce QED notation standards in dissertation requirements. Professional mathematicians including Andrew Wiles and Terence Tao use QED in their published works and lecture materials. Major publishing houses such as Springer and Academic Press integrate QED handling into their LaTeX document classes.

Future developments in mathematical document formatting include automated QED symbol selection based on proof type and adaptive spacing for different mathematical notation densities. Emerging tools for LaTeX-to-HTML conversion are improving QED symbol rendering in web-based mathematical documents, with initiatives like MathJax incorporating QED support. Interactive mathematics platforms increasingly require proper QED notation for proof verification systems. The standardization of QED in computational theorem provers suggests broader integration with formal mathematics in the coming decade.

Common Misconceptions

Many users mistakenly believe that QED only functions with the proof environment, when in fact \qed can be placed manually in any document context. Some assume the black square is the only acceptable QED symbol, but LaTeX supports numerous alternatives including diamonds, circles, and custom shapes. The misconception that QED placement is automatically perfect is false; improper spacing can occur with certain mathematical environments, requiring manual adjustment. Authors often incorrectly assume QED is only relevant for formal mathematics, overlooking its utility in logic, computer science, and formal argumentation.

A common error is forgetting to load the amssymb package while attempting to use \qedsymbol, resulting in 'undefined control sequence' errors during compilation. Users sometimes believe that using \qed requires the proof environment, not realizing it works independently in any context. The misconception that QED must appear on its own line is incorrect; it can follow text directly with proper spacing control. Some authors incorrectly think that \qedsymbol and \qed are identical commands, when \qed is the action command and \qedsymbol is the symbol definition.

Technical misunderstandings include believing that QED conflicts with displayed equations or mathematical arrays, when proper nesting actually makes it work seamlessly. Authors sometimes incorrectly assume different document classes handle QED differently, leading to unnecessary workarounds. The false assumption that PDF rendering affects QED symbol appearance leads some to avoid its use in digital formats. Users often mistakenly believe that removing QED improves document aesthetics, when research shows consistent QED placement increases perceived professionalism and clarity in academic documents.

Related Questions

How do I customize the QED symbol appearance?

Use \renewcommand{\qedsymbol}{\yoursymbol} in the preamble to replace the default black square with custom symbols like \textdagger or \diamond. Place this command after loading amssymb but before \begin{document}. You can also create multi-character symbols or even small images as your QED marker.

What happens if I forget the QED symbol in a proof?

Without a QED symbol, readers may become uncertain about whether the proof has concluded, potentially causing confusion about the logical structure. Peer reviewers and journal editors often flag missing QED symbols as formatting oversights. Including QED is considered standard mathematical writing convention and expected in academic publications.

Can QED work in inline mathematics mode?

QED is primarily designed for displayed mathematics and proof environments, though it can be manually placed after inline math with care. Using \qed after inline math may cause spacing issues, so wrapping it properly or using display mode is recommended. Most professional documents reserve QED for formal proof structures rather than inline mathematical statements.

Sources

  1. Wikipedia - Q.E.D.CC-BY-SA-4.0
  2. TUG TeXnique - TeX Users GroupCC-BY-SA-4.0

Missing an answer?

Suggest a question and we'll generate an answer for it.