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: 논리 및 증명, 기하학

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 고급 연산자 →

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 poweredAI로 LaTeX 작성

최고의 AI LaTeX 편집기, Overleaf 대안

Octree는 15개 이상의 대학의 연구자들이 AI를 사용하여 논문을 더 빠르게 작성하도록 도움

  • AI로 아름다운 TikZ 다이어그램 생성
  • 이미지를 업로드하고 LaTeX로 원활하게 변환
  • 논문 작성 및 서식에 대한 즉각적인 지원 받기