Introduction

Suppose you want to find a number whose square is 2. There is no neat formula you can plug into — the answer, √2, has digits that never end and never repeat. So how does your calculator spit out 1.41421356… in a blink?

The trick is over three centuries old. Newton's method (worked out by Isaac Newton around 1669 and refined by Joseph Raphson in 1690, so it is also called Newton–Raphson) replaces the hard curved problem with an easy straight-line one. Stand on the curve at your current guess, slide down the tangent line to where it crosses zero, and use that crossing as your next guess.

What makes it magical is the speed. Once you are reasonably close, every step roughly doubles the number of correct digits. Three or four steps can take you from "about right" to more decimals than you will ever need.

Try It: Chase the Root

Below is the curve f(x) = x2x^{2} − 2, whose positive root is √2 ≈ 1.41421356. Drag the slider to choose a starting guess, then press Step to take one tangent jump at a time, or Run to watch it converge.

<p class="hint">{{hint}}</p>
<canvas id="cv" width="460" height="260"></canvas>
<div class="row">
  <label>{{start_guess}} <b id="x0lbl">3.00</b></label>
  <input id="x0" type="range" min="0.4" max="4" step="0.05" value="3">
</div>
<div class="btns">
  <button id="step" type="button">{{btn_step}}</button>
  <button id="run" type="button">{{btn_run}}</button>
  <button id="reset" type="button" class="ghost">{{btn_reset}}</button>
</div>
<table id="log"><thead><tr><th>n</th><th>x&#8345;</th><th>{{col_correct_digits}}</th></tr></thead><tbody></tbody></table>
* { box-sizing: border-box; }
body { font-family: system-ui, sans-serif; color: #222; margin: 0; }
.hint { font-size: .9rem; color: #444; margin: 0 0 .6rem; line-height: 1.45; }
canvas { width: 100%; max-width: 460px; height: auto; background: #f5f8fb;
         border: 1px solid #cdd9e3; border-radius: 8px; display: block; }
.row { display: flex; align-items: center; gap: .6rem; margin: .7rem 0 .3rem; font-size: .9rem; }
.row input { flex: 1; }
.btns { display: flex; gap: .5rem; flex-wrap: wrap; margin: .4rem 0; }
button { font: 600 14px system-ui, sans-serif; padding: .45rem .9rem; border: 1px solid #1d3557;
         background: #1d3557; color: #fff; border-radius: 8px; cursor: pointer; }
button.ghost { background: #fff; color: #1d3557; }
button:disabled { opacity: .5; cursor: default; }
table { border-collapse: collapse; width: 100%; max-width: 460px; margin-top: .6rem; font-size: .85rem; }
th, td { border: 1px solid #cdd9e3; padding: .3rem .5rem; text-align: right; font-variant-numeric: tabular-nums; }
th { background: #e8eef3; color: #1d3557; }
td:first-child, th:first-child { text-align: center; }
// Code not found

Watch the error column. After the first couple of steps the number of correct digits roughly doubles every time — 1 digit, then 2, then 4, then 8. That explosive accuracy is called quadratic convergence, and it is why a handful of steps is enough to nail almost any decimal you want.

The Real Complexity

Newton's method is not an open problem or an impossible one — it is a solved, classical algorithm with a precise convergence theory. The surprise is how good it is, and how easily it can misbehave.

  • Quadratic convergence (when it works). Near a simple root, the error after a step is roughly proportional to the square of the previous error. If you are accurate to one digit, the next step gives about two, then four, then eight. The number of correct digits doubles each iteration.
  • It needs a derivative. Each step is xn+1=xnf(xn)/f(xn)x_{n+1} = x_n - f(x_n) / f'(x_n). You divide by the slope, so a flat spot (f′ ≈ 0) can fling the next guess far away.
  • The start matters. A poor initial guess can overshoot, oscillate, or run off to a different root entirely. There is no global guarantee.
  • Fractal boundaries. For functions with several roots, the map "which root does this starting point land on?" can have an infinitely intricate, fractal boundary — the famous Newton fractal. Tiny changes in the start can flip the outcome.

So the algorithm itself is cheap and well understood, but choosing a starting point that guarantees fast convergence is the genuinely subtle part — a recurring theme in non-convex optimization, where local steepest moves can stall far from the answer.

Where It Matters

"Use the slope to take a confident step toward the answer" is one of the most useful ideas in all of computing, and Newton's method is its purest form:

  • Calculators and CPUs: square roots, divisions and reciprocals are often computed with a couple of Newton steps under the hood.
  • Optimization: setting a derivative to zero turns "find the minimum" into "find a root," so Newton-style steps power many optimizers.
  • Machine learning: second-order methods and the curvature tricks behind training large models are descendants of the same tangent idea, a cousin of neural-network training.
  • Engineering and graphics: solving the nonlinear equations behind circuits, physics simulations and ray-surface intersections leans on Newton iterations.

Learn why Newton's method is fast and you have met the core instinct of numerical computing: linearize the hard thing, jump, and repeat.

Conclusion

Newton's method is a small marvel: take your best guess, slide down the tangent to where it meets zero, and repeat. Close to a simple root the error squares itself away — each step roughly doubling your correct digits — which is why the answer appears almost instantly.

But the same sharpness that makes it fast makes it temperamental: a flat slope or a careless start can send it spinning, and the boundary between "lands here" and "lands there" can be a fractal. The lesson is one the whole field of computation keeps relearning — see non-convex optimization: a brilliant local step is only as good as the place you start from.

Share this article

Pick a channel — or use your device's native share sheet.

Comments

Loading comments...

https://www.kipuhub.com/en/article/newtons-method/Content licensed under CC BY-NC 4.0.