I would like to use the symbol $\sim$ as "approximately". e.g:

There are $\sim 10^{80}$ atoms in the universe.

I think that I need to declare $\sim$ as some sort of unary math operator, to make the spacing correct! How?


Here: http://en.wikipedia.org/wiki/Tilde it can be read, that $\sim$ can be used both as a binary relation operator, and an unary operator meaning "approximately".

Common use

This symbol (in English) sometimes means "approximately", such as: "~30 minutes ago" meaning "approximately 30 minutes ago".[2] It can mean "similar to",[3] including "of the same order of magnitude as",[4] such as: x ~ y" meaning that x and y are of the same order of magnitude. Another approximation symbol is ≈, meaning "approximately equal to."

  • related: tex.stackexchange.com/questions/48/… May 13, 2012 at 19:42
  • 3
    \sim is a relation symbol, and usually one wants some space between it and the following object. If you want no space (but I would avoid it), then ${\sim}10^{80}$ will do.
    – egreg
    May 13, 2012 at 19:44
  • 2
    For a symbol that indicates approximate equality, you may want to consider using $\approx$ instead of `$\sim$.
    – Mico
    May 13, 2012 at 19:56
  • 1
    @Mico: Yes - I would use $\approx$ for "approximate equal". e.g $\pi \approx 3.14. -but it looks wrong(ugly) for "approximately" as in my example. May 13, 2012 at 20:21
  • 1
    @egreg: Yes for a relation, I would definitely want the space, but not for the unary operator. Your solution looks good, but I am looking for the correct way to make $\sim$ behave nicely. (minus ,- can also be both unary and binary e.g. $2-5=-3$ May 13, 2012 at 20:28

2 Answers 2


The \sim symbol is classified as a relation symbol. By the rules of TeX, the combination Rel Ord (relation followed by an ordinary symbol) results in a thick space between them.

The case of binary operations (Bin) is different: they are treated as binary operations only if preceded and followed by math atoms compatible with binary operations, for instance

Ord Bin Ord
Ord Bin Op

and others (Op stands for "operator"). [This is not the full truth, but a good approximation to it.] When a binary operation is "out of place", it's treated as an Ord atom. This is why no space is inserted in $-1$.

Every math symbol can be turned into an ordinary atom by enclosing it in braces. TeX inserts no space between ordinary symbols, so

$\sim 10^{80}$

will result in

~ 1080



will give


I'm afraid that no automatic way exists that allows using only \sim. You can define


(the \mathord is just for clarity, the additional braces would do the same) and use \unsim when the "unary" symbol is needed.


I had the same problem, wanting to use \sim for the (unary) logical negation operator. Building on egreg's answer from above, another option is to simply redefine the \sim command so that it produces the tilde without the space:


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .