How to Write the Not Equal To Symbol (≠) in LaTeX

In LaTeX, you can write the not equal to symbol (≠) using the \neq command.

The following examples show how to write the not equal to symbol in LaTeX.

How to Write the Not Equal To Symbol in Text

We can use the \neq command to write the not equal to symbol in LaTeX document for text.

Suppose we want to write the not equal to symbol in the text.

We can use the following LaTeX code to do so:

\documentclass{article}
\begin{document}

This is an example of using the not equal to symbol \( a \neq b \) in a sentence.

\end{document}

Output: 👇️

This is an example of using the not equal to symbol a ≠ b in a sentence.

In this example, we use the \neq command to display the not equal to symbol in the text.

How to Write the Not Equal To Symbol in Mathematical Expressions

For mathematical expressions, We can use the \neq command to ensure proper formatting.

Suppose we would like to write mathematical expressions that contain the not equal to symbol.

We can use the following LaTeX code to do so:

\documentclass{article}
\begin{document}

An inline mathematical expression: \( a \neq b \).

A displayed mathematical expression:
\[
a \neq b
\]

\end{document}

Output: 👇️

Not Equal To Symbol

In this example, we use the \neq command to denote the not equal to symbol in both inline and displayed mathematical expressions.

Conclusion

We can use the \neq command for both text and mathematical expressions.

This ensures that the not equal to symbol is properly formatted and displayed in LaTeX document.