Skip to content
FoundationSource checked

Bisection Method

Finds a root by repeatedly halving an interval that contains it.

Quick Facts

Compact metadata for implementation and discovery.

Category
Numerical Methods
Difficulty
Beginner
Family
Root Finding
Tier
Foundation
Status
Verified
Review
Source Checked
Sources
1
Formulas
1
Relationships
5
Code example
Not ready
Visualization
Ready

Overview

The Bisection Method keeps an interval whose endpoints have opposite signs and shrinks it around a root.

Core Concepts

numeric approximationroot estimateiterative updateroot findingconvergence checkerror control

Quick facts

Complexity

Runtime and memory behavior at a glance.

Best

O(1)

Average

O(log((b-a)/e))

Worst

O(log((b-a)/e))

Space

O(1)

When to Use

  • Use it when a continuous function changes sign over a known interval.
  • Use it when reliability matters more than fast local convergence.
  • Use it to bracket roots before switching to a faster method.

When Not to Use

  • Avoid it when no sign-changing bracket is available.
  • Avoid it when the function is discontinuous over the interval.
  • Avoid it when a derivative-based method is safe and much faster.

What It Does

  • Maintains a bracketing interval
  • Cuts the interval in half each step

Use Cases

  • Reliable root finding
  • Solving monotonic equations
  • Finding numeric thresholds

Inputs

  • Continuous function
  • Interval with opposite signs at endpoints

Outputs

  • Approximate root

Key Formulas (1)

Midpoint

mid = (low + high) / 2
mid = (low + high) / 2

Splits the bracketing interval into two halves.

Pseudocode

  1. 1.Check that the interval brackets a root
  2. 2.Compute the midpoint
  3. 3.Evaluate the function at the midpoint
  4. 4.Keep the half that still brackets the root
  5. 5.Repeat until the interval is small enough

Canonical Example

Input
f(x) = x^2 - 9, interval = [0, 5]
Output
root near 3
Explanation
The interval brackets a sign change, and repeated halving narrows it around x = 3.

Implementation Notes

  • Check f(left) and f(right) before the loop.
  • Replace the endpoint whose sign matches the midpoint sign.
  • Stop when the interval width, residual, or both meet the chosen tolerance.

Common Pitfalls

  • Starting without verifying that endpoint signs differ.
  • Stopping only on iteration count instead of interval width or residual.
  • Losing the bracketing invariant after updating the wrong endpoint.

Interactive Mechanism Walkthrough

Iterative Convergence & State Trajectory

Show an interval closing in on a root on a curve.

Bisection Method mechanism walkthrough step 1 of 5x₀x₁x₂x*
Step 1 of 5: Check that the interval brackets a root
interval-halving

Notes

Bisection is slower than Newton's method but preserves a root bracket when its assumptions hold.

Sources (1)

What each reference supports for this entry.

Numerical Recipes

Book

Reference text and implementation-oriented treatment for root finding, interpolation, integration, and ODE methods.

Open source

Explore Next

Good next jumps from the relationship graph, ranked for useful discovery.

Alternative toNewton's Method

Bisection is slower but more robust when a sign bracket is available.

Alternative toSecant Method

Both find roots, but bisection requires bracketing and is more conservative.

Tags

Numerical MethodsRoot FindingIterativeClassic