
The Newton-Raphson method, named after Isaac Newton and Joseph Raphson, is a root finder algorithm by design, meaning that its goal is to find the value x for which a function f(x)=0. Geometrically we can think of this as the value of x where the function of interest crosses the x-axis.
However, the use cases don’t end there and, in fact, this algorithm is quite versatile with wide-ranging use cases that span many domains. For example, by reframing the function of interest you can search for the value of x that yields a value of your choice rather than being restricted to 0.
One complex use case in practice is to backsolve for the implied volatility of a financial option contract using the Black-Scholes formula. However, the Newton-Raphson algorithm could also be used for something as simple as backsolving to find what score you need on a final exam to get an A given your prior continuous assessment grades. In fact, if you have ever used the solver functionality in Microsoft Excel then you may have used a root finder algorithm like the Newton-Raphson.
Breaking Down the Formula

Though the formula itself is quite simple, it can be somewhat tricky to visualise what it is actually doing at first glance.
Firstly, let’s recap the overall methodology:
- Make an initial guess of where the root could be

- Apply the Newton-Raphson formula to get an updated guess which will be closer to the root than the initial guess
- Repeat step 2 until the new guess is close enough.
Wait, close enough? Yes, unfortunately, the Newton-Raphson method gives an approximation to the root, though usually it gets close enough for any reasonable application! You might then ask how do we define close enough? When do we stop iterating?
Generally, an implementation of the Newton-Raphson method will have two ways of handling when to stop. Firstly, if your guess from one step to the next does not change by more than a threshold value, say 0.00001 for example, then the algorithm will stop and say that the latest guess is close enough. The second way is less desirable and simply says that if we reach a certain number of guesses and still haven’t reached the threshold then we just give up.

From the formula, we can see that each new guess is simply our previous guess adjusted by some mysterious quantity 🔮 . However, if we visualise the process through an example it quickly becomes clear what is happening!


As an example let’s consider the function above and make an initial guess of _x=_10 (note here that the actual root is at _x=_4). The first few guesses of the Newton-Raphson algorithm are visualised in the GIF below 👇

Our initial guess is at _x=_10. Now, remember that to compute our next guess we need to evaluate the function itself and its derivative at _x=_10. However, the derivative of the function evaluated at 10 simply gives us the slope of the tangent curve at that point. This tangent is plotted as Tangent 0 in the GIF.
Now, look at where the next guess appears relative to the previous tangent, do you notice anything? The next guess appears where the previous tangent crosses the _x-_axis. This is the brilliance of the Newton-Raphson method!


In fact, the quotient f(x)/f'(x) simply gives us the distance (in the x direction) between our current guess and the point where the tangent line crosses the x-axis. It is this distance that tells us how much to update our guess by each time and, as we can see by the GIF, the update gets smaller and smaller as we approach the root itself, which stops us from overshooting.
What if the function is hard to differentiate by hand?
In the example above, we had a function that was easily differentiable by hand, which meant that we could evaluate f'(x) without any trouble. However, this may not be the case in reality and there are some useful tricks to approximate derivatives without needing to know their analytical solution.
These derivative approximation methods are beyond the scope of this article but if you are interested you can read more about Finite Difference Methods here.
Problems
One problem that the keen reader may have already identified from the example above is that the Newton-Raphson method only identifies a single root even though our example function had two (x=-2 and _x=_4). This is certainly an issue and is not the only drawback to this method. For more useful information on the Newton-Raphson method, such as the conditions necessary for convergence, you can consult the Wikipedia page here.
🙋 ♂️ Thanks for reading! Feel free to respond with any questions 🙋 ♀️