Skip to content
latexci
PreviewDiffWord → LaTeXBibTeXSymbolsTableTemplatesAcademics
Sign inFree
PreviewDiffWord → LaTeXBibTeXSymbolsTableTemplatesAcademicsFree
Discord community ↗GitHub ↗
Sign in
LaTeX symbols›Logic›Square

Square in LaTeX

The LaTeX command for square (□) is \square (square / modal necessity).

□\square□
\square
Logic · Unicode □ (U+25A1) · needs amssymb

Writing a paper? The table generator and the BibTeX cleaner are one click away, no account.

How to type Square

Write \square inside math mode, that is between $…$ for inline math or in a \[ … \] or equation block for display math. This symbol needs the amssymb package, so add \usepackage{amssymb} to your preamble.

\square keeps its spacing inside a formula; for a word such as "and" in the middle of one, use \text{ and } from amsmath. With unicode-math under XeLaTeX or LuaLaTeX, typing □ in a formula gives the same symbol.

Example
$p \square q$p□qp \square qp□q

Open this example in the live preview: it renders as you type, with no compiler and no signup.

Related Logic symbols

∀\forall∃\exists∄\nexists¬\neg∧\land∨\lor⊤\top⊥\bot∴\therefore∵\because◊\lozenge⫤\Dashv⊨\vDash⊩\Vdash

Logic symbols in LaTeX: the full table or search all 350+ LaTeX symbols.

FAQ

How do you write square (□) in LaTeX?

Use \square in math mode after adding \usepackage{amssymb} to your preamble. For example, $p \square q$.

Which package provides \square?

It comes from the amssymb package: add \usepackage{amssymb} to your preamble.

latexci

Free LaTeX tools for researchers and students, in any browser. No paid plan, no advertising.

Star on GitHubBuy me a coffee

Tools

Live PreviewBibTeX ToolsDOI → BibTeXarXiv → BibTeXPubMed → BibTeXISBN → BibTeXLaTeX DiffWord → LaTeXSymbol SearchTable GeneratorTemplatesCV Generator

Learn

Academics hubLife after OverleafFreeGitHub

Community

DiscordGitHub IssuesFeature Requests

© 2026 latexci. By Sitraka Forler, sitraka.lu

PrivacyTerms