Complement in LaTeX (A')

A′A'
LaTeX command
A'
Package
No package needed: built into LaTeX
Mode
Text and math mode

Where it is used

A prime after a variable or set, a compact notation for the complement or Boolean negation of A.

Set theory courses often write A' for the complement U \setminus A, and some logic design books write A' instead of \overline{A} because it fits on one line and is easy to type. In math mode the apostrophe becomes a superscript \prime automatically, so A'' gives a double prime with correct spacing. The danger is ambiguity: A' also denotes derivatives, derived sets in topology, and dual spaces. Alternatives include A^c and A^{\complement}. Whichever you pick, define it once near the start of the document.

Minimal compilable example

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

(A∪B)′=A′∩B′(A \cup B)' = A' \cap B'
\documentclass{article}
\begin{document}
Complement: $A'$

\[ (A \cup B)' = A' \cap B' \]
\end{document}

Related symbols

All ブール代数 →

Frequently asked questions

How do I write Complement in LaTeX?
Type A' in math mode, for example $(A \cup B)' = A' \cap B'$. It works in plain LaTeX without loading any package.
Which package do I need for A'?
None. A' is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
Can I use A' in text mode, or only in math mode?
Both. A' compiles in running text as well as inside $...$; in a formula keep it in math mode so it gets math fonts and spacing.
Math poweredAIでLaTeXを書く

最高のAI LaTeXエディタ、Overleaf代替

Octreeは15以上の大学の研究者がAIを使って論文をより速く書くのを支援

  • AIで美しいTikZダイアグラムを生成
  • 画像をアップロードしてシームレスにLaTeXに変換
  • 論文の執筆とフォーマットに即座にサポートを取得