[Tex/LaTex] Can’t use some AMS binary operators

amsmath

I'm using the amsmath package, and I want to put in a sentence, the not similar binary operator. I tried this:

... bla bla $ a \nsim b $ bla bla ...

I get the error:

"Undefined control sequence".

By the way, if I put \sim it works, but I want negate it.

Best Answer

The command \nsim is listed in table 69 of the Comprehensive LaTeX Symbol List, under the caption

AMS Negated Binary Relations

In section 1.1 of the document, we find

“AMS” means to use the AMS packages, viz. amssymb and/or amsmath.

Actually most of the symbols with that tag require amssymb and this is the case for \nsim.

enter image description here

Note that the result of \not\sim is rather different, so the final answer is

\documentclass{article}
\usepackage{amssymb}

\begin{document}
... bla bla bla $a \nsim b$ bla bls ...

\end{document}
Related Question