How to write latex symbol different : \neq

How to write latex symbol different : \neq

Different symbol in Latex is the command: \neq

$$x \neq y$$

which gives:

\[x \neq y\]

Examples

Here are few examples:

$$A \neq B$$
\[A \neq B\]
$$\{a_1\} \neq \{b_1,b_2\}$$
\[\{a_1\} \neq \{b_1,b_2\}\]