The LaTeX command for neq (≠) is \neq (not equal).
\neqWriting a paper? The table generator and the BibTeX cleaner are one click away, no account.
| Command | Package | Use it when |
|---|---|---|
\neq recommended | none | Not equal. |
\ne | none | Short name for the same command. |
\not\equiv | none | Not congruent: \not puts a slash through the next symbol. |
\nleq | amssymb | A ready-made negation, better drawn than \not\leq. |
Write \neq inside math mode, that is between $…$ for inline math or in a \[ … \] or equation block for display math. It is part of core LaTeX math, so no extra package is required.
$x \neq 0$Open this example in the live preview: it renders as you type, with no compiler and no signup.
Relation symbols in LaTeX: the full table or search all 350+ LaTeX symbols.
Use \neq in math mode; it needs no extra package. For example, $x \neq 0$.
None: \neq is built into LaTeX, so no extra package is required.
!= typed in a formula prints an exclamation mark and an equals sign, and a pasted ≠ fails under pdfLaTeX. Type \neq.