The tombstone marks the end of a proof. In a full LaTeX document amsthm's proof environment places it automatically, and \qedhere moves it into a final equation. In KaTeX, MathJax and Confluence there is no proof environment, so write \blacksquare or \square at the end.
All ways to write it
\blacksquarefilled square ∎Package: amssymb\squareopen square □Package: amssymb\qedright-aligned tombstone, in a proof environmentPackage: amsthmNot in KaTeX\qedhereput the tombstone on the current linePackage: amsthmNot in KaTeX
Commands marked with a package need that \usepackage line in a LaTeX document. “Not in KaTeX” means the command will not render in KaTeX- or MathJax-based tools such as Markdown previews, Jupyter and Confluence math apps; use one of the other forms there.
Example
\text{Hence } a^2 + b^2 = c^2. \quad \blacksquareA concluding line with a filled tombstone.
Questions
My \qed appears on its own line after a displayed equation. How do I fix it?
Put \qedhere inside the last line of the equation environment so amsthm places the box there.
What do I use in Confluence or Markdown?
\blacksquare (filled) or \square (open). The amsthm commands are not available in KaTeX-based renderers.
Using end of proof in Confluence
Confluence Cloud has no built-in LaTeX. With LaTeX Math for Confluence you add a math macro to any page, type \blacksquare and it renders inline or as a block, with a live preview while you edit. The app uses KaTeX, so pick one of the commands above that is not marked “not in KaTeX”.