Complement in LaTeX (\complement)
- LaTeX command
\complement- Package
- Add to your preamble:
\usepackage{amssymb} - Mode
- Math mode only
- Copy the Unicode character
- ∁
U+2201
Where it is used
Complement symbol, usually a superscript on a set to denote all elements outside it.
A^\complement denotes the complement of A relative to a universe, so A \cup A^\complement = U. It is an ordinary symbol that looks like a stylized C. Common alternatives are A^c, A', and \overline{A}, but the bar can be confused with topological closure and the prime with derivatives, so \complement is unambiguous. Write it as a superscript; on its own it rarely appears. De Morgan's law, (A \cup B)^\complement = A^\complement \cap B^\complement, is a classic use.
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\usepackage{amssymb}
\begin{document}
Complement: $\complement$
\[ (A \cup B)^{\complement} = A^{\complement} \cap B^{\complement} \]
\end{document}Related symbols
- Natural Numbers
\mathbb{N} - Set Minus
\setminus - Integers
\mathbb{Z} - Big Intersection
\bigcap - Rational Numbers
\mathbb{Q} - Big Union
\bigcup
Frequently asked questions
- How do I write Complement in LaTeX?
- Type \complement in math mode, for example $(A \cup B)^{\complement} = A^{\complement} \cap B^{\complement}$. Load amssymb first with \usepackage{amssymb}.
- Which package do I need for \complement?
- \complement needs amssymb: add \usepackage{amssymb} to your preamble before the document starts.
- Can I use \complement in text mode, or only in math mode?
- Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\complement$ 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 poweredاكتب LaTeX باستخدام الذكاء الاصطناعي
أفضل محرر LaTeX بالذكاء الاصطناعي، بديل Overleaf
يساعد Octree الباحثين من أكثر من 15 جامعة على كتابة أوراق البحث بشكل أسرع باستخدام الذكاء الاصطناعي
- أنشئ رسوم TikZ جميلة باستخدام الذكاء الاصطناعي
- ارفع صورة وحولها إلى LaTeX بسلاسة
- احصل على مساعدة فورية في كتابة وتنسيق أوراق البحث