Contains in LaTeX (\ni)
- LaTeX command
\ni- Package
- No package needed: built into LaTeX
- Mode
- Math mode only
- Copy the Unicode character
- ∋
U+220B
Where it is used
Reversed element-of relation: the set on the left contains the element on the right.
A \ni x says the same as x \in A, with the set first, which reads naturally in phrases like a neighborhood U \ni x. Older texts and some logicians also used \ni for such that, though \mid or a colon is now standard. \owns is an alias of \ni. Negate it with \not\ni. Do not confuse it with the letter epsilon or with \in turned around by hand; \ni is a proper relation with matching spacing.
Also listed under: 量化子
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Contains: $\ni$
\[ U \ni x \implies f(U) \ni f(x) \]
\end{document}Related symbols
- Subset
\subset - Not Element Of
\notin - Subset or Equal
\subseteq - Element Of
\in - Not Subset
\not\subset - Empty Set (Variant)
\varnothing
Frequently asked questions
- How do I write Contains in LaTeX?
- Type \ni in math mode, for example $U \ni x \implies f(U) \ni f(x)$. It works in plain LaTeX without loading any package.
- Which package do I need for \ni?
- None. \ni is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
- Can I use \ni in text mode, or only in math mode?
- Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\ni$ 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).