Subset in LaTeX
Write subset symbols in math mode: A \subset B gives A ⊂ B and A \subseteq B gives A ⊆ B. For a proper subset that rules out equality use \subsetneq ⊊ (amssymb); for "not a subset" use \not\subset ⊄ or \nsubseteq ⊈. Superset versions swap sub for sup: \supset, \supseteq.
Subset and superset symbols
A \subset BSubset ⊂ (proper or not, depending on the author).
A \subseteq BSubset or equal ⊆.
A \subsetneq BProper subset, explicitly not equal ⊊ (amssymb).
A \supset BSuperset ⊃.
A \supseteq BSuperset or equal ⊇.
A \supsetneq BProper superset ⊋ (amssymb).
A \not\subset BNot a subset ⊄.
A \nsubseteq BNot a subset or equal ⊈ (amssymb).
A \subseteqq BSubset with double bar ⫅ (amssymb).
A \sqsubset BSquare subset ⊏, used for orders (amssymb).
Try it live
Change the formula and the preview redraws as you type. Copy the LaTeX, download a PNG or SVG, copy it for Word, or use Edit here on any example below to load it.
Subset ⊂ ⊆ examples
Each result below is drawn from the LaTeX under it. Copy the code, edit it on this page, or open it in the full editor.
Number sets
LaTeX\mathbb{N} \subset \mathbb{Z} \subset \mathbb{Q} \subset \mathbb{R}Definition of subset
LaTeXA \subseteq B \iff \forall x \, (x \in A \implies x \in B)Finite sets
LaTeX\{1, 2\} \subseteq \{1, 2, 3\}Proper subset
LaTeX\{1, 2\} \subsetneq \{1, 2, 3\}Not a subset
LaTeX\{4\} \not\subset \{1, 2, 3\}Power set
LaTeX\mathcal{P}(A) = \{ B : B \subseteq A \}Text under the symbol
LaTeXA \underset{\text{open}}{\subset} X\underset(amsmath) puts a label under any relation.
⊂ or ⊆?
Authors disagree about ⊂. Some use it for any subset (equality allowed), others only for a proper subset. To be unambiguous, write \subseteq when equality is allowed and \subsetneq when it is not, or state your convention once.
Negated subsets
\not\subset puts a slash through ⊂ and works everywhere. amssymb adds purpose-drawn glyphs \nsubseteq ⊈ and \nsupseteq ⊉. There is no \nsubset in amssymb, so for ⊄ keep \not\subset.
\usepackage{amssymb} % \subsetneq, \supsetneq, \nsubseteq, \subseteqqSubset versus element of
A subset relation compares two sets; membership compares an element with a set. 1 \in \{1, 2\} is correct, \{1\} \subseteq \{1, 2\} is correct, but 1 \subseteq \{1, 2\} mixes the two.
Common mistakes
\nsubsetis not defined in LaTeX or amssymb ("Undefined control sequence").Instead ofA \nsubset BWriteA \not\subset B\subsetneq,\supsetneqand\nsubseteqcome from amssymb;\subsetand\subseteqdo not need it.Instead ofA \subsetneq B (no amssymb)Write\usepackage{amssymb}An element belongs to a set; only sets are subsets.
Instead of1 \subseteq \{1, 2\}Write1 \in \{1, 2\}\subis not a LaTeX command.Instead ofA \sub BWriteA \subset B
In Overleaf, MathJax and Word
Overleaf and pdfLaTeX
\subset,\subseteq,\supset,\supseteqand\notare built in; the ⊊, ⊋, ⊈ and ⫅ forms need amssymb.MathJax and KaTeX
MathJax and KaTeX include the amssymb symbols, so every command in the table renders without setup.
Microsoft Word
Write the relation here and use Copy for Word to paste it into Word as an editable equation.
Subset ⊂ ⊆ in LaTeX: questions
- How do I write "subset or equal to" in LaTeX?
- Use
\subseteqfor ⊆. The superset version is\supseteq⊇. - How do I write a proper subset?
- Use
\subsetneq(⊊) from amssymb, or\subsetif your text defines ⊂ as proper. - How do I write "not a subset"?
- Use
\not\subsetfor ⊄ or\nsubseteqfor ⊈ (amssymb). - How do I put text below the subset symbol?
- Use
\underset{text}{\subset}from amsmath, for exampleA \underset{\text{open}}{\subset} X.
Related LaTeX reference
- Element of Symbol (∈) in LaTeX\in for ∈, \notin for ∉, \ni for ∋, and how ∈ differs from the Greek letter epsilon.
- Union in LaTeXThe ∪ symbol with \cup, indexed unions with \bigcup_{i=1}^{n}, and disjoint unions (\sqcup, \uplus).
- Empty Set in LaTeXThe empty set with \emptyset or the rounder \varnothing (amssymb), plus \{\} and common set statements.
- LaTeX equation editorSymbol panel, live preview, and PNG, SVG, MathML or Word export.
- All LaTeX reference pagesSymbols, math structures and text formatting in one list.
Have the formula as a picture?
Paste a screenshot or photo of the equation and get its LaTeX, ready to copy or open in the editor.
Convert an image to LaTeX