Visual walkthrough — Newton-Raphson method for root finding
Step 1 — What does "" even ask?
WHAT. We have a curve. Its height above the flat ground is called : feed it a horizontal position , it returns a height. Some heights are positive (curve above the ground), some negative (curve below). A root is a place where the height is exactly zero — where the curve touches the ground.
WHY. "Solving " is nothing more mysterious than "find where the curve crosses the flat line". For a straight line you can see it instantly. For a wiggly curve like , algebra can't isolate that crossing — so we need a trick.
PICTURE. The ground is the horizontal -axis. The curve dips below it and rises above it; the red dot marks the true crossing (the "" is just a name for the root).
Step 2 — Pick a guess, and measure two things there
WHAT. We plant a first guess and call it (the little just means "guess number zero"). At that spot we stand on the -axis, look straight up, and measure the height of the curve above us: that number is .
WHY. We can't jump to the root because we can't see it. But we can feel the ground under one foot: at our guess we can measure the local height and (next step) the local steepness. Those two local facts are all Newton-Raphson ever uses.
PICTURE. A vertical plum segment from the axis at up to the point on the curve — that segment's length is the height .
Step 3 — The slope: how steeply the curve tilts here
WHAT. The slope at our point is a single number telling us how tilted the curve is right there: "for one step right, how many steps up?" We write it (read "f-prime at "). This is exactly the derivative.
WHY THIS TOOL. Why do we want slope and not, say, the height again? Because a slope lets us predict: if the curve kept going at this exact tilt, it would trace a straight line — and a straight line hits the ground at one obvious, computable spot. Height alone tells us where we are; slope tells us which way and how fast to walk. We need the second question answered, so we bring in the derivative.
PICTURE. A tiny right triangle riding on the curve at our point: a short "run" (horizontal, teal) and the matching "rise" (vertical, orange). Slope .
Step 4 — Replace the curve by its tangent line
WHAT. We now draw the one straight line that touches the curve at our point and shares its slope there. That is the tangent line. Right around it hugs the curve so closely you can barely tell them apart.
WHY. This is the whole engine (Tangent line and linear approximation): near a point, a smooth curve looks like its tangent. The curve is hard (can't solve). The tangent is easy (a straight line — we can find its ground-crossing by hand). So we solve the easy stand-in and hope its crossing is near the real one.
PICTURE. Same curve, same point, now with a long straight orange tangent laid through it. Notice how it kisses the curve at and drifts away only far off.
Step 5 — Ask the easy question: where does the tangent hit the ground?
WHAT. We want the tangent's own root — the where its height equals . Call that landing spot (guess number one). So we set in the tangent equation and read off .
WHY. We can't set the curve to zero and solve — that was the whole problem. But the tangent is a line, and a line hits zero in exactly one place we can compute. That crossing is our next, better guess.
PICTURE. The tangent slicing through the axis; the crossing point is marked , sitting noticeably closer to the true root than was.
Step 6 — Solve for the jump, and read the formula off the triangle
WHAT. Divide both sides by the slope to isolate the horizontal jump, then add to both sides to get alone.
WHY. We want the recipe: "given where I am, where do I step next?" Solving for delivers exactly that, with no new assumption — except one silent requirement: dividing by is only legal if (Step 8 handles the flat case).
PICTURE. A big right triangle whose vertical leg is the height and whose horizontal leg is the jump . The tangent is its hypotenuse.
Step 7 — All four sign-combinations: which way does point?
WHAT. Step 6 drew one picture: curve above the ground () with an uphill tangent (), giving a leftward step (). But the height can be positive or negative, and the slope can be uphill or downhill — four combinations in all, like four "quadrants" of the formula's behaviour. The single formula handles them all automatically because the signs of and live inside the ratio.
WHY. If we only ever saw one panel, we might wrongly believe "Newton always steps left" or "the height leg always points up". Neither is true. The direction of the step is decided entirely by the sign of so let us read off all four:
PICTURE. Four panels, one per row of the table, each with its own tangent and its own arrow showing pointing left or right toward the axis. Confirm each arrow against the table.
Step 8 — Repeat, and name the step counter
WHAT. Rename as your new standing spot and do Steps 2–6 again. To talk about "the general guess" we introduce a counting label .
WHY. One tangent-jump lands close, not exact — the tangent left the curve as we moved away. So we re-measure height and slope at the new spot and take a fresh, shorter jump.
PICTURE. Two tangent jumps in one frame: a long first hop , then a much shorter second hop that almost lands on . The dwindling gap is the point.
Step 9 — When do we stop? The tolerance
WHAT. The picture never exactly lands on ; each jump only shrinks the gap. So in practice we halt once the guess is "good enough". We pick a tiny positive number (the Greek letter "epsilon", the standard name for a small allowed error) and stop when either the guess stops moving or the height is essentially zero.
WHY. Without a stopping rule, a computer would loop forever chasing digits it cannot even store, and a hand computation would never know when to quit. The two rules below match the two things we measure at every step (position and height).
Step 10 — The degenerate cases: when the picture breaks
Newton-Raphson is local. Four ways the geometry misfires — each is a real drawing, not an abstraction.
(a) Flat spot, . The tangent is horizontal. A horizontal line never hits the ground (unless it is the ground). Dividing by zero-slope is the algebra screaming that the jump is infinite: flies off to nowhere.
(b) Near-flat, . Not exactly zero, but tiny. Then is huge — a small height over a tiny slope — and we get catapulted far from the root. Always guard against small slopes.
(c) Cycling. Sometimes the jumps land in a loop. For with : the tangent sends , and the tangent at sends — forever. A good formula, a bad starting point outside the basin of attraction.
(d) Double root. If the curve merely grazes the ground ( and at the root), the slope shrinks to zero exactly as height does. Convergence sags from quadratic to merely linear — errors halve instead of square.
PICTURE. Four mini-panels: horizontal tangent shooting off (orange), near-flat catapult (teal), the cycle (plum arrows), and a grazing double root.
The one-picture summary
Everything at once: the curve, one guess , its height (vertical), its tangent (the straight stand-in), the right triangle whose legs are height and jump , and the landing closer to the root . Read the triangle and the formula falls out: horizontal leg height slope, and we step against it — left or right as Step 7's sign table dictates, until Step 9's tolerance says stop.
Recall Feynman retelling of the whole walk
You're standing on flat ground and somewhere off to the side the ground meets a hill you can't see the base of. You want that meeting point. You only know two things where you stand: how high the hill is straight above you, and how steeply it tilts under your foot. So you pretend the hill keeps going in a perfectly straight ramp at that exact tilt, and you walk to where that imaginary ramp would touch the ground. That walk is "height divided by steepness," and you go toward the hill, not away — that's the minus sign, which pops right out of the triangle because the height dropped to zero. Whether you step left or right depends only on which side of the ground you're on and which way the ramp tilts; the formula's minus sorts it out for you. You're not there yet, because the real hill curved away from your ramp. Fine: stand at the new spot (call it step ), feel the new height and tilt, draw a new ramp, walk again. Each walk cuts what's left roughly to its square — three good digits become six — provided you started close enough and the hill is smooth. You quit when the walk gets shorter than a hair you chose in advance (). The only ways to trip: your foot lands on a flat patch (no ramp reaches the ground), or you started so badly you keep hopping in a loop.
Connections
- Tangent line and linear approximation — Steps 3–6 are linear approximation, reused.
- Taylor series — why the leftover error squares (Step 8).
- Derivatives — definition and rules — supplies the slope of Step 3.
- Fixed-point iteration — the repeat loop of Step 8 in disguise.
- Bisection method — the safe fallback when Step 10 misfires.
- Roots of polynomials — where all this gets used.