Big Theta notation () gives an asymptotic tight bound on a function’s growth. Writing means that grows at the same rate as — bounded both above and below by constant multiples of for large .

Formally:

Two constants — a lower constant and an upper constant — sandwich between and from some threshold onwards.

Equivalently: if and only if AND . Big Theta is exactly the conjunction of Big O (upper bound) and Big Omega (lower bound).

When to use Big Theta vs Big O

When people informally say “this algorithm is ,” they usually mean it’s tightly — both and . Big O has become the colloquial default, with Theta reserved for situations where the tightness needs to be made explicit.

The distinction matters in formal writing:

  • says “no worse than quadratic.” A linear algorithm satisfies this trivially.
  • says “exactly quadratic.” Linear algorithms do not satisfy this.

For a textbook claim like “merge sort runs in in all cases (best, average, worst),” Theta is the precise statement: the number of comparisons grows exactly proportionally to , never less, never more.

Worked example

Show that is .

Need and such that for all .

Upper bound (). Pick . Need , i.e. . The roots of are and , so the inequality holds for .

Lower bound (). Pick . Need , i.e. , holds for all .

So work. Therefore .

When you can’t use Theta

Some functions don’t have a Theta classification because they oscillate between growth rates. The classic example:

This is (true upper bound, achieved on even ) and (true lower bound, achieved on odd ). But because there’s no such that for all large — odd inputs violate this. Similarly .

So has a Big O bound and a Big Omega bound, but no tight Big Theta bound. Real algorithms rarely behave this way, but the example shows why all three notations exist.

Properties

  • Reflexive: always.
  • Symmetric: iff . Same growth rate is a symmetric relation.
  • Transitive: and implies .
  • Polynomial leading term: when . Drop all but the leading term.

These properties make an equivalence relation on functions — it partitions them into classes that grow at the same rate.

Common asymptotic classes via Theta

ClassExamples
Hash table lookup, array indexing
Binary search, balanced BST operations
Linear search, single array traversal
Merge sort, heap sort
Bubble sort, naïve all-pairs operations
Naïve matrix multiplication
Brute-force subset enumeration

These are the “natural complexity classes” — algorithms typically land in one of these, and the practical implications jump dramatically between adjacent classes.

In context

Big Theta is the third of the asymptotic-bound notations:

  • Big O notation () — upper bound. Default in casual discussion.
  • Big Omega notation () — lower bound. Used for problem-complexity arguments.
  • Big Theta () — tight bound. The precise statement when both upper and lower bounds match.

For the running-time-of-specific-algorithm analysis context, see Algorithm analysis.