Tilde in LaTeX
Three ways to use the tilde in LaTeX: \sim (∼), \tilde{x} (x̃), and \widetilde{xyz} (x͂yz).
Quick Answer
$\sim$ % standalone tilde: ∼
$\tilde{x}$ % tilde accent over one letter
$\widetilde{xyz}$ % wide tilde over multiple lettersStandalone Tilde: \sim
Use \sim (short for "similar") to render a standalone tilde symbol. It must be inside a math environment.
\documentclass{article}
\begin{document}
This text contains a tilde $\sim$ as a standalone symbol.
In math: $\pi \sim 3$, meaning pi is approximately 3.
\end{document}Why not just type ~? In LaTeX, a bare tilde is a non-breaking space — it connects words without allowing a line break there. It will not produce the tilde symbol.
Writing your thesis in LaTeX?
MonsterWriter's LaTeX Workspace gives you real-time PDF preview with no compile limits — at a fraction of Overleaf's price. Works just like Overleaf, costs 11× less.
Try MonsterWriter freeTilde Accent: \tilde{}
\tilde{} places a tilde accent over a single character. This is commonly used in mathematics for estimated or transformed variables.
$\tilde{x}$ % x with tilde: x̃
$\tilde{\mu}$ % mu with tilde
$\tilde{X}$ % capital X with tildeWide Tilde: \widetilde{}
\widetilde{} stretches the tilde to span multiple characters — useful for indicating the approximation of a whole expression.
$\widetilde{xyz}$ % tilde over xyz
$\widetilde{f(x)}$ % tilde over f(x)
$\widetilde{A + B}$ % tilde over A+BApproximately Equal: \approx
When you mean "approximately equal to" (≈), use \approx rather than \sim. The two are related but distinct in mathematical writing.
$a \sim b$ % a is distributed like b (statistics)
$a \approx b$ % a is approximately equal to bNon-Breaking Space
A bare tilde ~ in LaTeX source is a non-breaking space. This is useful for keeping a number and its unit together, or a name and its title.
Dr.~Smith will present the results on page~42.
% Prevents line breaks between "Dr." and "Smith", and between "page" and "42".Related Topics
More LaTeX Topics