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に変換
  • 論文の執筆とフォーマットに即座にサポートを取得