I am using Overleaf to type up a paper involving proof of different results and I would like to write the box at the end of a proof that means QED ie end of proof. How can I do that? Thanks.

I am using

  • 8
    Do \usepackage{amsthm} and use \begin{proof}...\end{proof} for the proofs. The QED symbol will magically appear.
    – egreg
    Sep 29, 2020 at 21:09
  • @egreg thanks for that, it works brilliantly :) Sep 29, 2020 at 21:14
  • 2
    Just make sure to load amsmath before amsthm. Otherwise the QED symbol can appear out of place in some environments. See this question for example.
    – Sandy G
    Sep 29, 2020 at 21:53
  • @SandyG thanka a lot, your answer to that question is extremely helpful! Sep 30, 2020 at 11:03

1 Answer 1


As @egreg said in the comments, you can use the proof environment from amsthm, which will automatically place a QED symbol at the end of the proof. You can also use the command \qedsymbol, also from amsthm, to place a QED symbol anywhere. Here's an example of both options, with the preamble you provided.



A proof written in the \verb|proof| environment. The QED symbol will appear at the end. 

A \qedsymbol{} outside of a \verb|proof| environment. 


In fact, amsthm uses the command \qedsymbol to place the symbol at the end of the proof environment, so if you want to use something else as a QED symbol (for example a black square), you can simply redefine \qedsymbol, and the proof environment will use it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .