Every math character is given an identifying code number between 0 and
4095, obtained by adding 256 times the family number to the position
number. This is easily expressed in hexadecimal notation, using one
hexadecimal digit for the family and two for the character; for
example, `\hex{24A}`

stands for character `\hex{4A}`

in family 2. Each
character is also assigned to one of eight classes, numbered 0 to 7,
as follows:

Class 0: Ordinary (eg., `/`

)

Class 1: Large operator (eg., `\sum`

)

Class 2: Binary operation (eg., `+`

)

Class 3: Relation (eg., `=`

)

Class 4: Opening (eg., `(`

)

Class 5: Closing (eg., `)`

)

Class 6: Punctuation (eg., `,`

)

Class 7: Variable family (eg., `x`

)

Classes 0 to 6 tell what "part of speech" the character belongs to, in
math-printing language; class 7 is a special case [...]. The class
number is multiplied by 4096 and added to the character number, and
this is the same as making it the leading digit of a four-digit
hexadecimal number.

...

TeX associates classes with subformulas as well as with individual
characters. Thus, for example, you can treat a complex construction as
if it were a binary operation or a relation, etc., if you want to. The
commands `\mathord`

, `\mathop`

, `\mathbin`

, `\mathrel`

, `\mathopen`

,
`\mathclose`

, and `\mathpunct`

are used for this purpose; each of them
is followed either by a single character or by a subformula in braces.
For example, `\mathopen\mathchar"1234`

is equivalent to
`\mathchar"4234`

, because `\mathopen`

forces class 4 (opening). In the
formula `$G\mathbin:H$`

, the colon is treated as a binary operation.

...

There's also an eighth classification, `\mathinner`

, which is not
normally used for individual symbols; fractions and `\left...\right`

constructions are treated as "inner" subformulas, which means that
they will be surrounded by additional space in certain circumstances.
All other subformulas are generally treated as ordinary symbols,
whether they are formed by `\overline`

or `\hbox`

or `\vcenter`

or by
simply being enclosed in braces. Thus, `\mathord`

isn't really a
necessary part of the TeX language; instead of typing
`$1\mathord,234$`

you can get the same effect from `$1{,}234$`

.

## Best Answer

In math mode

`{}`

makes an empty math atom (not just an empty group as in text mode) so`\mathrel{}`

makes an empty atom that gets relation spacing.Compare

`$a {} b$`

to`$ a \mathrel{} b$`