loading tool…
The LaTeX command for square (□) is \square — square / modal necessity.
\squareWrite \square inside math mode — that is, between $…$ for inline math or in a \[ … \] / equation block for display math. This symbol needs the amssymb package, so add \usepackage{amssymb} to your preamble.
$p \square q$Prefer to see it live? Paste it into the LaTeX preview and it renders as you type — no compiler, no signup.
Search all 380+ LaTeX symbols →
Use \square in math mode after adding \usepackage{amssymb} to your preamble. For example, $p \square q$.
It comes from the amssymb package — add \usepackage{amssymb} to your preamble.