That’s why document processors like LaTeX provide simple means to write a subset symbol in a document. In this tutorial, we will explain various ways to write and use the subset symbol in LaTeX.
How to Write and Use a Subset Symbol in LaTeX?
We’ll start with the basic subset symbol, i.e., a proper subset, and you can write it using \subset code in LaTeX. Here is a simple source code example:
\begin{document}
$X \subset Y$
\end{document}
Output
Similarly, you can write a subset using the following source code:
\begin{document}
$X \subseteq Y$
\end{document}
Output
You can also create the not subset symbol using the source code given below, but it will require the amssymb \usepackage:
\usepackage{amssymb}
\begin{document}
$X \nsubseteq Y$
\end{document}
Output
You can also create the proper subset through the following source code:
\usepackage{amssymb}
\begin{document}
$X \not\subset Y$
\end{document}
Output
There are some situations when you require the “subset not equal” symbol, but luckily LaTeX also contains the source code to write this symbol:
\usepackage{amssymb}
\begin{document}
$X \subsetneqq Y$ ;
$A \subsetneq B$
\end{document}
Output
Now let’s take an example that includes a subset symbol in a mathematical expression:
\usepackage{amssymb}
\begin{document}
Set X =$\{$1,3,5$\}$ so the subsets of X are;\\
$\{$$\}$, $\{$1$\}$, $\{$2$\}$, $\{$5$\}$, $\{$1,3$\}$, $\{$3,5$\}$, $\{$1,5$\}$ and $\{$1,3,5$\}$.\\
Where, $\{$$\}$, $\{$1$\}$, $\{$3$\}$, $\{$5$\}$, $\{$1,3$\}$, $\{$3,5$\}$, $\{$1,5$\}$ $\textrm{are the proper subsets}$ ($\subset$) and $\{$1,3,5$\}$ $\textrm{is the not the proper subset. Hence, we can write}$ $\{$1,3,5$\}$ $\subseteq$ X.
\end{document}
Output
Conclusion
That was a quick rundown of the source code you can use to create and use a subset symbol in LaTeX. We have used different examples by which you can understand everything easily. A subset is an important symbol that you can try to explain the relationship between the quantities.