Math Mode Symbols – How to Write the Box Symbol for End of Proof on Overleaf

amsmathmath-modeoverleafsymbols

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

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amssymb}

Best Answer

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.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}

\begin{document}

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

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

\end{document} 

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.

Related Question