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 B
    A ⊂ B

    Subset ⊂ (proper or not, depending on the author).

  • A \subseteq B
    A ⊆ B

    Subset or equal ⊆.

  • A \subsetneq B
    A ⊊ B

    Proper subset, explicitly not equal ⊊ (amssymb).

  • A \supset B
    A ⊃ B

    Superset ⊃.

  • A \supseteq B
    A ⊇ B

    Superset or equal ⊇.

  • A \supsetneq B
    A ⊋ B

    Proper superset ⊋ (amssymb).

  • A \not\subset B
    A ⊄ B

    Not a subset ⊄.

  • A \nsubseteq B
    A ⊈ B

    Not a subset or equal ⊈ (amssymb).

  • A \subseteqq B
    A ⫅ B

    Subset with double bar ⫅ (amssymb).

  • A \sqsubset B
    A ⊏ B

    Square 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.

Templates

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

    N ⊂ Z ⊂ Q ⊂ R
    LaTeX
    \mathbb{N} \subset \mathbb{Z} \subset \mathbb{Q} \subset \mathbb{R}
  • Definition of subset

    A ⊆ B ⟺ ∀ x ( x ∈ A ⟹ x ∈ B )
    LaTeX
    A \subseteq B \iff \forall x \, (x \in A \implies x \in B)
  • Finite sets

    { 1 , 2 } ⊆ { 1 , 2 , 3 }
    LaTeX
    \{1, 2\} \subseteq \{1, 2, 3\}
  • Proper subset

    { 1 , 2 } ⊊ { 1 , 2 , 3 }
    LaTeX
    \{1, 2\} \subsetneq \{1, 2, 3\}
  • Not a subset

    { 4 } ⊄ { 1 , 2 , 3 }
    LaTeX
    \{4\} \not\subset \{1, 2, 3\}
  • Power set

    P ( A ) = { B : B ⊆ A }
    LaTeX
    \mathcal{P}(A) = \{ B : B \subseteq A \}
  • Text under the symbol

    A ⊂ open X
    LaTeX
    A \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.

LaTeX
\usepackage{amssymb}  % \subsetneq, \supsetneq, \nsubseteq, \subseteqq

Subset 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

  • \nsubset is not defined in LaTeX or amssymb ("Undefined control sequence").

    Instead of
    A \nsubset B
    Write
    A \not\subset B
  • \subsetneq, \supsetneq and \nsubseteq come from amssymb; \subset and \subseteq do not need it.

    Instead of
    A \subsetneq B  (no amssymb)
    Write
    \usepackage{amssymb}
  • An element belongs to a set; only sets are subsets.

    Instead of
    1 \subseteq \{1, 2\}
    Write
    1 \in \{1, 2\}
  • \sub is not a LaTeX command.

    Instead of
    A \sub B
    Write
    A \subset B

In Overleaf, MathJax and Word

  • Overleaf and pdfLaTeX

    \subset, \subseteq, \supset, \supseteq and \not are 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 \subseteq for ⊆. The superset version is \supseteq ⊇.
How do I write a proper subset?
Use \subsetneq (⊊) from amssymb, or \subset if your text defines ⊂ as proper.
How do I write "not a subset"?
Use \not\subset for ⊄ or \nsubseteq for ⊈ (amssymb).
How do I put text below the subset symbol?
Use \underset{text}{\subset} from amsmath, for example A \underset{\text{open}}{\subset} X.

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