Square in LaTeX (\square)

□\square
LaTeX command
\square
Package
Add to your preamble:\usepackage{amssymb}
Mode
Math mode only
Copy the Unicode character
□U+25A1

Where it is used

Open square symbol, used for the d'Alembertian, modal necessity and end-of-proof marks.

Physicists write \square for the d'Alembert wave operator, \square = \partial_t^2/c^2 - \nabla^2, modal logic uses \square p for necessarily p (often as \Box), and the hollow square serves as the QED tombstone at the end of proofs. In amsthm proofs the tombstone is placed automatically via \qedsymbol, so you rarely type it yourself. \square is an ordinary symbol; \blacksquare gives the filled version. Many logic texts write \Box for necessity; the two glyphs look nearly identical. When used as an operator before a field, no extra spacing is needed.

Also listed under: Logik & Bukti, Geometri

Minimal compilable example

Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.

□ϕ=1c2∂t2ϕ−∇2ϕ\square \phi = \frac{1}{c^2} \partial_t^2 \phi - \nabla^2 \phi
\documentclass{article}
\usepackage{amssymb}
\begin{document}
Square: $\square$

\[ \square \phi = \frac{1}{c^2} \partial_t^2 \phi - \nabla^2 \phi \]
\end{document}

Related symbols

All Pengendali Lanjutan →

Frequently asked questions

How do I write Square in LaTeX?
Type \square in math mode, for example $\square \phi = \frac{1}{c^2} \partial_t^2 \phi - \nabla^2 \phi$. Load amssymb first with \usepackage{amssymb}.
Which package do I need for \square?
\square needs amssymb: add \usepackage{amssymb} to your preamble before the document starts.
Can I use \square in text mode, or only in math mode?
Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\square$ in running text. If you only need the glyph in text, paste the Unicode character □ instead (with XeLaTeX or LuaLaTeX and a font that has it).
Math poweredTulis LaTeX menggunakan AI

Editor LaTeX AI Terbaik, Alternatif Overleaf

Octree membantu penyelidik dari 15+ universiti menulis kertas penyelidikan dengan lebih cepat menggunakan AI

  • Jana diagram TikZ yang cantik menggunakan AI
  • Muat naik imej dan tukar ke LaTeX dengan lancar
  • Dapatkan bantuan segera untuk menulis dan memformat kertas penyelidikan