Negation in LaTeX (\neg)

¬\neg
LaTeX command
\neg
Package
No package needed: built into LaTeX
Mode
Math mode only
Copy the Unicode character
¬U+00AC

Where it is used

Logical negation sign, an L-shaped hook placed before a formula to mean not.

Logic writes \neg p for not p and \neg\neg p \equiv p in classical logic; \lnot is an exact alias. Some texts use \sim p, an overline \bar{p}, or p' instead, especially in Boolean algebra and digital circuits. \neg is an ordinary symbol, so no space appears between it and its operand, which is the desired look. De Morgan's laws, \neg(p \land q) \equiv \neg p \lor \neg q, are a typical display. In programming contexts ! or \lnot are both seen.

Also listed under: Aljabar Boolean, Ilmu Komputer

Minimal compilable example

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

¬(p∧q)≡¬p∨¬q\neg (p \land q) \equiv \neg p \lor \neg q
\documentclass{article}
\begin{document}
Negation: $\neg$

\[ \neg (p \land q) \equiv \neg p \lor \neg q \]
\end{document}

Related symbols

All Logika & Pembuktian →

Frequently asked questions

How do I write Negation in LaTeX?
Type \neg in math mode, for example $\neg (p \land q) \equiv \neg p \lor \neg q$. It works in plain LaTeX without loading any package.
Which package do I need for \neg?
None. \neg is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
Can I use \neg in text mode, or only in math mode?
Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\neg$ 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 peneliti dari 15+ universitas menulis makalah penelitian lebih cepat menggunakan AI

  • Hasilkan diagram TikZ yang indah menggunakan AI
  • Unggah gambar dan konversi ke LaTeX dengan mulus
  • Dapatkan bantuan instan untuk menulis dan memformat makalah penelitian