latex

How to Write a Less Than Or Equal To Symbol in LaTeX

In mathematical expressions, we can use the different symbols to represent them efficiently. You can use the less than and greater than signs to show the inequality between two numbers or variables. The less than or equal to symbol can be represented as ≤.

It is an important symbol that shows the relation of two quantities and you can use them in the document processor. However, you must use the correct source code to write a less than or equal to symbol in LaTeX. Let’s see how to write and use this symbol easily.

How to Write a Less Than Or Equal To Symbol in LaTeX

First, start with the primary source code, \leq, to write a less than and equal to symbol in the document processor. Here is an example to use this symbol:

\documentclass{article}

\begin{document}

$X\leq 4$

\end{document}

Output:

Let’s use another example to represent the relation between A and B variables with a number. Here is the following source code that shows the relation:

\documentclass{article}

\begin{document}

$$A\leq B$$

$$A \leq B \leq 7$$

\textbf{Explanation:}

\\ In the above expression, the value of A and B is less than or equal to 7.

\end{document}

Output:

If you want to use the less than but not equal to symbol, use the mathabx \usepackage and \nleq source code. You can use the following source code for the symbol:

\documentclass{article}

\usepackage{mathabx}

\begin{document}

$$A\nleq B$$

$$A \nleq B \leq 5$$

\end{document}

Output:

Conclusion

In this tutorial, we explained how to use the less than or equal to symbol in LaTeX. We also used the different examples to explain everything about the symbol. This tutorial will help you learn about the less than but not equal to symbol and the source code to use in a LaTeX document. If you want to know more about the LaTeX-related stuff, 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.