Fractional Part in LaTeX (\{x\})

{x}\{x\}
LaTeX command
\{x\}
Package
No package needed: built into LaTeX
Mode
Text and math mode

Where it is used

Fractional part of x, defined as x minus its floor, written with escaped braces.

Since bare braces only group in LaTeX, the visible ones must be escaped as \{ and \}. The fractional part satisfies x = \lfloor x \rfloor + \{x\} with 0 \le \{x\} < 1, and it appears in equidistribution results such as Weyl's theorem that \{n\alpha\} is uniformly distributed for irrational \alpha. The same braces also denote sets, so \{x\} could be read as the singleton containing x; define the notation or write \operatorname{frac}(x). For taller contents, use \left\{ ... \right\}.

Minimal compilable example

Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.

x=⌊x⌋+{x}x = \lfloor x \rfloor + \{x\}
\documentclass{article}
\begin{document}
Fractional Part: $\{x\}$

\[ x = \lfloor x \rfloor + \{x\} \]
\end{document}

Related symbols

All Teori Nombor →

Frequently asked questions

How do I write Fractional Part in LaTeX?
Type \{x\} in math mode, for example $x = \lfloor x \rfloor + \{x\}$. It works in plain LaTeX without loading any package.
Which package do I need for \{x\}?
None. \{x\} is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
Can I use \{x\} in text mode, or only in math mode?
Both. \{x\} compiles in running text as well as inside $...$; in a formula keep it in math mode so it gets math fonts and spacing.
Math poweredTulis LaTeX menggunakan AI

Editor LaTeX AI Terbaik, Alternatif Overleaf

Octree membantu penyelidik dari 15+ universiti menulis kertas penyelidikan dengan lebih cepat menggunakan AI

  • Jana diagram TikZ yang cantik menggunakan AI
  • Muat naik imej dan tukar ke LaTeX dengan lancar
  • Dapatkan bantuan segera untuk menulis dan memformat kertas penyelidikan