How to write equal(=) and not equal(≠) symbol in LaTeX?

In mathematics, the equal (=) and not equal (≠) symbols are used frequently to express relationships between numbers, expressions, and sets.

This symbol is represented by two parallel horizontal bars (=), indicating that two values or expressions are the same.

Since the equal symbol is available on standard keyboards, it can be used directly in LaTeX without requiring any special commands.

\[ p = q \] 

Output :

Equal symbol

However, you can use \neq and \ne commands in the case of not equal symbol. Both commands produce the same result and can be used interchangeably in mathematical expressions.

\[ p \neq q \] 
 \[ a \ne b \] 

Output :

Not equal symbol

Using Dots, Triangles, and Circles on Equal Symbols

In LaTeX, equal symbols can be modified with dots, triangles, and circles to indicate specific mathematical relationships. These symbols require the amssymb package.

\documentclass{article}
\usepackage{amssymb}
\begin{document}
   \[ p \doteq q \] 
   \[ p \doteqdot q \]
   \[ p \circeq q \]
   \[ p \triangleq q \]
\end{document}

Output :

dot, triangle, and circle are used on equal symbol

Using Greater Than, Less Than, Subset, and Superset Symbols

Mathematical comparisons such as greater than, less than, subset, and superset can be combined with equal and not equal symbols. These symbols require the amsmath and amssymb packages for proper formatting.

\documentclass{article}
\usepackage{amsmath,amssymb}
\begin{document}
\[ \begin{matrix}
  \leqq & \geqq & \subseteqq & \supseteqq \\ 
  \lneqq & \gneqq & \subsetneqq & \subsetneqq \\
  \nleqq & \ngeqq & \nsubseteqq & \nsubseteqq
\end{matrix} \]
\end{document}

Output :

Greater than, less than, subset, and super subset

Share tutorial

Leave a Comment

Your email address will not be published. Required fields are marked *