Introduction
When you compute the direction of a vector or the argument of a complex number, you run into this formula.
$$ \theta = \tan^{-1}\!\left(\frac{b}{a}\right) $$I got stuck here for a long time. I understood that \(b/a\) is the slope, but why does arctangent (\(\tan^{-1}\)) have to sit in front of it? If it's a slope, it's a slope — I couldn't grasp why we wrap another layer around it. The "just memorize it that way" kind of explanation didn't satisfy me at all.
This post is the process of understanding that one line without memorizing it. To state the core up front — we need the inverse function because the direction we're asking about is the opposite of the usual one.
First, what tan originally does
The tangent is a function that takes an angle and gives back a ratio.
$$ \tan\theta = \frac{\text{height}}{\text{base}} = \frac{b}{a} $$So the input-output direction of \(\tan\) is this.
- What goes in: the angle \(\theta\)
- What comes out: the ratio \(b/a\) (the slope of the line extending at that angle)
If you know the angle, the slope comes out — nothing to get stuck on so far.
But the information we have is the reverse
Let's look at the problem again. We know the point \(P(a, b)\). That is, we already hold the slope \(b/a\) in hand, and conversely we don't know the angle \(\theta\).
\(\tan\) goes "angle → ratio," but right now we're asking "ratio → angle."
The direction is exactly opposite. We're asking about the same relationship in reverse. Translated into an everyday example, it's like this.
- 60 km/h for 2 hours → distance of 120 km (multiplication, forward direction)
- Traveled 120 km at 60 km/h → 2 hours (division, reverse direction)
It's the same relationship, but when the direction of the question is reversed, you need the inverse operation. Just as the opposite of multiplication is division, the opposite of tangent is arctangent. That's why, to go back from a ratio to an angle, we wrap \(\tan^{-1}\) around it.
$$ \tan\theta = \frac{b}{a} \quad\Longleftrightarrow\quad \theta = \tan^{-1}\!\left(\frac{b}{a}\right) $$arctan isn't some new magic — it's just a button that asks back, "what angle produces this slope?"
But the calculator answers only half
Here's a second pitfall. The angle that \(\tan^{-1}\) returns is always only in the following range.
$$ -90^\circ < \tan^{-1}(x) < 90^\circ $$This means it only answers for the right half (the \(a > 0\) direction). Why? Because the point \((a, b)\) and the point directly opposite it, \((-a, -b)\), have exactly the same slope.
$$ \frac{-b}{-a} = \frac{b}{a} $$From the calculator's point of view, there's no way to tell them apart. Looking at the ratio alone, you can't know "whether it extends to the right or to the left." So by convention it's set to always answer with the side where \(a > 0\).
In conclusion, if the point is in the 2nd or 3rd quadrant (that is, \(a < 0\)), the calculator's answer points in the exact opposite direction. In that case you have to add \(180^\circ\) to correct it.
$$ \theta = \tan^{-1}\!\left(\frac{b}{a}\right) + 180^\circ \quad (a < 0) $$The key is that the deciding criterion is not \(b\) but the sign of \(a\) — because what divides left from right (right half / left half) is \(a\).
Try it yourself
If you only hear it described in words, you tend to nod along with "I guess so" and move on. Move the sliders for \(a\) and \(b\) yourself, and watch with your own eyes when the calculator's result (the pink arrow) diverges from the actual direction of the point (teal), and how the \(+180^\circ\) correction turns the arrow back around.
When you see the pink arrow in the 2nd-quadrant preset pointing into the 4th quadrant (the exact opposite), the "ah, so that's why the correction is needed" clicks in an instant.
Key takeaways
- \(\tan\) goes angle → ratio, while we ask ratio → angle → that's why the inverse function \(\tan^{-1}\) shows up.
- \(\tan^{-1}\) answers only \(-90^\circ \sim 90^\circ\) (the right half).
- \((a,b)\) and \((-a,-b)\) have the same slope and can't be told apart, so when \(a < 0\), correct by \(+180^\circ\).
Studying this with AI
I never managed to grasp this concept from text and formulas alone. What was decisive was seeing for myself, in a rotating picture, why the correction is needed. The interactive above is the result of asking an AI to "skip the formula and draw it so I can manipulate the correction process" — exactly to break through the spot where I'd gotten stuck.
One thing to add — don't take the AI's explanation at face value. AI often gets angle calculations or signs confidently wrong. So it's good to cross-check with a tool that actually computes the numbers and shows them, like this interactive. The picture above computes and draws each slider value on the spot, so it also serves as a device for checking the explanation for yourself.
Wrapping up
Even a one-line formula loses everything you'd have to memorize once you trace "why it looks this way." \(\tan^{-1}\) was just a button that asks the direction back in reverse, and \(+180^\circ\) was just a correction that fills in the left half the calculator can't see. In the next post, I'll unravel another "why?" in the same way.
Related reading — formula computation and verification: Desmos Graphing Calculator · Wolfram Alpha