# How does $\arctan(0)$ equal $\pi?$

I was recently doing a problem, and apparently got it wrong.

The question asked: what is the polar form of the sum: $(5+3i)$ + $(-10-3i)$.

From my understanding, the sum would equal: $-5+0i$

Now,

the magnitude would equal: $\sqrt{-5^2 + 0^2} = 5$

And,

the angle would equal: $\tan^{-1}(\frac{0}{-5}) = 0$

Instead, the answer is actually $5 (\pi)$, instead of $5 (0)$.

I check on this website: 2pif.com (under the "Complex Numbers" tool), and it also says that 5 (0) is the answer.

So I'm wondering, how in the world does $\tan^{-1}(\frac{0}{-5}) = \pi$

• theta = arctan 0 mean tan theta = 0 but tan theta = 0 does not mean theta = arctan 0. It means theta = arctan 0 + k*pi. We want to solve i) cos theta = -1 ii) sin theta = 0 and iii) 0 <= theta < 2 pi. The answer to that is not arctan 0. It is pi. and indeed tan pi = 0. Dec 27, 2016 at 0:46
• Of course, rather than use any formulas, it should be obvious, geometrically, that the polar angle of the number $-5+0i$ is $\pi$, since it corresponds to the point $(-5,0)$ in the Cartesian plane, and since we always measure polar angles from the positive $x$ axis. Dec 27, 2016 at 1:58
• And by the way, the "$-5^2$" part under the root is wrong -- it must be $(-5)^2$. Dec 27, 2016 at 2:01
• $\arctan$ like many other trigonometric inverse function, is multi-valued. You are just selecting a branch. Dec 27, 2016 at 6:40

This is a common error among new people into the complex numbers. The argument of a complex number $z = a + ib$ is not $\arctan (b/a).$ It is given by $$\arg z = \begin{cases} \arctan (b/a) &\mbox{if } a>0 &\\ \arctan (b/a)+\pi &\mbox{if } a<0,b\geq 0 \\ \arctan (b/a)-\pi &\mbox{if } a<0,b< 0 \\ \pi/2 &\mbox{if } a=0,b> 0 \\ -\pi/2 &\mbox{if } a=0,b< 0 \\ \mathrm{undefined} &\mbox{if } a=0,b= 0 \\ \end{cases}$$

• Also known as atan2
– 小太郎
Dec 27, 2016 at 3:46
• By the way, this is basically the same error as deducing that $2 = -2$ from the fact that $\sqrt{2^2} =^? \sqrt{(-2)^2}$. Dec 27, 2016 at 10:30
• Unfortunately, it seems to also be a mistake in some textbooks. :( Dec 27, 2016 at 10:48

It is an oversimplification to say the argument of $x+iy$ is given by $\theta =\arctan \dfrac yx$. Actually you have to solve the system \begin{cases}\cos\theta=\dfrac x{\sqrt{x^2+y^2}}\\ \sin\theta=\dfrac y{\sqrt{x^2+y^2}}\end{cases} which implies $\tan\theta=\dfrac yx$, but is not equivalent to $\theta=\arctan\dfrac yx$.

The general solution is $\theta\equiv\arctan\dfrac yx\mod \pi$, and you have to choose the value of $\theta$ (mod $2\pi$) in function of the signs of $\cos\theta$ and $\sin\theta$, i.e. of $x$ and $y$.

To add to the other answers here, the argument is the angle the corresponding vector on the Complex Plane would make with that of $1+0i$

In this particular case, the angle is $180^{\circ}$ or $\pi$ radians as in the picture.

• +1 for the only answer that points out the underlying geometry (with a picture). This is the one the OP should remember. Dec 27, 2016 at 19:04

$\tan(x)=0$ has the solutions $x=n\pi$, so $\pi$ is also a solution. Which solution you choose, depends on the signs of $\sin(x)$ and $\cos(x)$. This is why computers have a special function atan2, which calculates the solutions of $\tan(x)=\frac{u}{v}$ and returns the value in the proper quadrant, by accounting for the signs of $u$ and $v$ (as well as for the values where $\tan(x)=\frac{u}{v}$ might be ambiguous/undefined).

because the angle of a complex number is not given by the ordinary artan, is necessary make an adjust of Pi if the real part is negative, add pi and ist done

$\arctan(0)=0,$ not $\pi$, but $\tan(\pi)=\tan(0)=0$ As $x$ ranges from $-\frac \pi 2$ to $\frac \pi 2$, $\tan x$ ranges from $-\infty$ to $+\infty$. As we want $\arctan$ to be a function, we have to choose a range of output values. When you use the $\arctan$ to get the polar angle, there is an uncertainty of $\pi$ because $\tan (x+\pi)=\tan x$. You have to use the real and imaginary parts to decide the multiple of $\pi$ to add to the $\arctan$ output to get the proper polar angle you want. You might even need to add $2\pi$. For example, if you want the polar form of $1-i$, the $\arctan$ will give you $-\frac \pi 4$ but you probably want to report the polar angle as $\frac {7 \pi}4$