The idea: replace the curve by its tangent

We want a root of f: a number r with f(r) = 0. Solving f(x) = 0 exactly is often impossible, but solving it for a straight line is easy. Newton's method (also called Newton–Raphson) takes a guess xn, draws the tangent line to f at that point, and uses the place where the tangent crosses the x-axis as the next guess xn+1. Then it repeats.

The parabola y = x squared minus 2. At x0 = 1 the point (1, -1) is on the curve; the tangent there has slope 2 and crosses the x-axis at x1 = 1.5, close to the root square root of 2, about 1.414
One Newton step on x² − 2: the tangent at x₀ = 1 meets the axis at x₁ = 1.5, already close to √2 ≈ 1.414.

The update rule

The tangent at xn is y = f(xn) + f'(xn)·(x − xn). Setting y = 0 and solving for x gives

xn+1 = xn − f(xn) / f'(xn)

So each step needs the value f(xn) and the slope f'(xn), the derivative. On the canvas each step has three parts: go up from xn to the curve, draw the tangent, follow it down to the axis. (Demo: √2 from x₀ = 1)

For f(x) = x² − 2 the rule becomes xn+1 = (xn + 2/xn) / 2: average the guess with 2 divided by the guess. This is the Babylonian method for square roots, about 3500 years older than Newton.

Quadratic convergence: the digits double

Near a simple root (f(r) = 0 but f'(r) ≠ 0) the new error is about the old error squared, times a constant: en+1 ≈ C·en², with C = f''(r) / (2f'(r)). If the error is 10−3, the next one is near 10−6, then 10−12. The number of correct digits roughly doubles every step. The table on the canvas colours the correct digits of each xn green:

nxn for x² − 2, x₀ = 1error |xn − √2|correct digits
014.1e−11
11.58.6e−21
21.416666666666672.5e−33
31.414215686274512.1e−66
41.414213562374691.6e−1212
51.41421356237310015 (all a double holds)

The cube root works the same way: x³ − 2 from x₀ = 2 reaches ∛2 = 1.25992104989487 in 6 steps, with digits 0, 1, 2, 2, 7, 12, 15: not an exact doubling every step, but the trend is clear. (Demo: cube root)

Compared with bisection

Bisection needs no derivative. It starts from a bracket [a, b] where f(a) and f(b) have opposite signs, so a root lies between them. Each step evaluates f at the midpoint m and keeps the half where the sign changes. The bracket halves every step, so the error shrinks by a constant factor of 2: linear convergence, about log102 ≈ 0.3 digits per step.

NewtonBisection
needsf and f', one start x₀f only, a bracket with a sign change
error per stepsquared (near the root)halved
steps to error < 1e−10 for √2433 (when (b − a)/2 < 1e−10)
can fail?yes: flat tangent, cycles, divergenceno, once the bracket is valid

On the canvas's log-scale chart Newton's blue errors fall faster and faster, while bisection's orange dots (the bound (b − a)/2) fall along a straight line. (Demo: Newton vs bisection)

Log-scale chart of the error per step for square root of 2. Newton's error drops from 0.4 to 1.6e-12 in 4 steps along a curve that gets steeper; bisection's error bound falls along a straight line and needs 33 steps to get below 1e-10
Newton's error curve bends down ever more steeply; bisection's is a straight line on a log scale.

When Newton fails

Quadratic convergence is only promised near the root. From a poor start, the method can misbehave:

  • A nearly flat tangent shoots off. For x² − 2 at x₀ = 0.1 the slope is only 0.2, so the tangent crosses the axis at x₁ = 10.05. Far from the root each step only halves x, and it takes 9 steps to come back. At x₀ = 0 the slope is exactly 0 and the method stops: the tangent never meets the axis. (Demo: bad start)
  • A cycle. For x³ − 2x + 2 from x₀ = 0: the tangent leads to x₁ = 1, and the tangent there leads straight back to x₂ = 0. Newton bounces forever and never reaches the real root r ≈ −1.769, which bisection on [−2, −1] finds without trouble. (Demo: 2-cycle)
  • Slower at a multiple root. Where f'(r) = 0 too (for example x² at 0), the error only halves each step, like bisection.
Two panels. Left: x squared minus 2 with a nearly flat tangent at x0 = 0.1 that crosses the axis far away at x1 = 10.05. Right: x cubed minus 2x plus 2 with the tangent at 0 leading to 1 and the tangent at 1 leading back to 0, a 2-cycle, while the root is near -1.77
Two ways Newton goes wrong: a flat tangent throws x₁ far away, and two tangents can send it back and forth forever.

In practice

Real root finders combine both ideas. Safeguarded methods such as Brent's method keep a bracket like bisection but take a fast step (secant or inverse quadratic) whenever it stays inside the bracket. The secant method replaces f'(xn) by the slope through the last two points, so it needs no derivative and converges with order about 1.618. Libraries compute square roots with a hardware instruction or a few Newton steps from a table-based first guess; each step doubles the digits, so two or three steps reach full double precision.

The same tangent idea works for optimization: applying Newton's method to f'(x) = 0 finds a minimum, using the second derivative. Gradient descent uses only the first derivative and a learning rate instead. See also the derivative as a limit for where the tangent's slope comes from, and Taylor series: Newton's step is the root of the first-order Taylor polynomial.

See also Euler's method, which follows the tangent line forward in time to solve a differential equation. For degree 2 there is an exact answer: the quadratic formula comes from completing the square.

Newton's method relies on local linearity: near a point, f is almost its tangent line, as Local Linearity: Zoom In shows.

Critical points are the zeros of f′; see Reading Derivative Graphs for why they mark the peaks and valleys of f.

See Root Finding: Bisection vs Newton vs Secant for all three methods racing on the same function, with steps and evaluations counted.

Newton's method is a map iterated to its fixed point; the same slope test decides whether the logistic map settles or goes into cycles and chaos: see The Logistic Map: from a Fixed Point to Chaos.

What the page leaves out

Only real functions of one variable are shown. Newton's method in several variables solves a linear system with the Jacobian matrix at every step; in the complex plane the starting points that reach each root form fractals. The error estimate is exact here because the page knows the root; a real solver only sees |xn+1 − xn| and |f(xn)|. Secant and Brent's methods are only described.