latex

How to Write and Use Union Symbol in LaTeX

In mathematics, the union symbol (∪) shows the union of two sets. In other words, in a union of two sets, an element occurs both in the first collection and the second collection or set. Similarly, the intersection of sets (∩) represents that all elements of one set are available in another.

Therefore, document processors like LaTeX provide easy-to-use source codes to create a union symbol. In this tutorial, we will briefly describe how to write and use a union symbol in LaTeX.

How to Write and Use Union Symbols in LaTeX?

In LaTeX, you only require \cup code to write a union symbol, and here is the example source code:

\documentclass{article}

\begin{document}

$$ A \cup B $$

\end{document}


Output

Similarly, you can write different types of union symbols in LaTeX through the following source codes:

\documentclass{article}

\begin{document}

Big union symbol with subscript and superscript:

$$ \cup_{x=1}^{m}A_{x}+B_{m} $$

Dot over the union symbol:

$$ A_{x} \dot\cup B_{x} $$

Combination of plus and the union symbol:

$$ B_{xyz} \uplus C_{xyz} $$

Square union symbol:

$$ K_{n} \sqcup K_{m} $$

\end{document}

Output

For example, if we have an A and B set, and we need to find out n(A U B), let’s create a source code to write this question in LaTeX:

\documentclass{article}

\usepackage{graphicx}

\begin{document}

\begin{figure}

  \centering

  \includegraphics[width=0.5 \textwidth]{Image/union.png}
 
  \caption{Union}

  \label{fig:my_label}

\end{figure}

n(A $\cup$ B) = n(A) + n(B) - n(A $\cap$ B) \\

Where\\

n(A) = 13\\

n(B) = 8\\

So please find out: n(A $\cup$ B)

\end{document}

Output

Conclusion

It was all about the source codes you can use to write a union symbol in LaTeX. This tutorial has different source codes to create various types of union symbols available in mathematics. If you are looking for more LaTeX-related stuff, then visit our official website.

About the author

Prateek Jangid

A passionate Linux user for personal and professional reasons, always exploring what is new in the world of Linux and sharing with my readers.