Little o in LaTeX (o(n))

o(n)o(n)
LaTeX command
o(n)
Package
No package needed: built into LaTeX
Mode
Text and math mode

Where it is used

Strict asymptotic upper bound: f(n) = o(n) means f(n)/n tends to 0 as n grows.

Little o expresses that one function is negligible against another, as in \log n = o(n) or n = o(n^2). It is strictly stronger than big O: every o(g) function is O(g), but n is O(n) without being o(n). Analysts use it constantly in Taylor expansions, such as \sin x = x + o(x) as x \to 0, so always state the limit point when it is not infinity. Since it is just an italic letter o, there is no special command; make sure readers do not mistake it for a zero, and keep it lowercase to avoid colliding with big O.

Minimal compilable example

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

log⁡n=o(n)sincelim⁡n→∞log⁡nn=0\log n = o(n) \quad \text{since} \quad \lim_{n\to\infty} \frac{\log n}{n} = 0
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Little o: $o(n)$

\[ \log n = o(n) \quad \text{since} \quad \lim_{n\to\infty} \frac{\log n}{n} = 0 \]
\end{document}

Related symbols

All Computer Science →

Frequently asked questions

How do I write Little o in LaTeX?
Type o(n) in math mode, for example $\log n = o(n) \quad \text{since} \quad \lim_{n\to\infty} \frac{\log n}{n} = 0$. It works in plain LaTeX without loading any package.
Which package do I need for o(n)?
None. o(n) is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
Can I use o(n) in text mode, or only in math mode?
Both. o(n) compiles in running text as well as inside $...$; in a formula keep it in math mode so it gets math fonts and spacing.
Math poweredSumulat ng LaTeX gamit ang AI

Pinakamahusay na AI LaTeX Editor, Alternatibo sa Overleaf

Tinutulungan ng Octree ang mga researcher mula sa 15+ na unibersidad na sumulat ng research papers nang mas mabilis gamit ang AI

  • Gumawa ng magagandang TikZ diagrams gamit ang AI
  • Mag-upload ng larawan at i-convert ito sa LaTeX nang walang problema
  • Makakuha ng instant na tulong sa pagsulat at pag-format ng research papers