I am just starting to learn calculus and the concepts of radians. Something that is confusing me is how my textbook is getting the principal argument ($\arg z$) from the complex plane. i.e. for the complex number $-2 + 2i$, how does it get $\frac{3\pi}{4}$? (I get $\frac{\pi}{4}$).

The formula is $\tan^{-1}(\frac{b}{a})$, and I am getting $\frac{\pi}{4}$ when I calculate $\tan^{-1}(\frac{2}{-2})$. When I draw it I see that the point is in quadrant 2.

So how do you compute the correct value of the principal argument?

  • $\begingroup$ But $\tan\frac{\pi}4=1$, not $-1$, so how are you getting $\tan^{-1}(-1)=\frac{\pi}4$? You should be getting $-\frac{\pi}4$. And since that’s in the fourth quadrant, and you know that you need an angle with the same tangent in the second quadrant, you add $\pi$ to get $\frac34\pi$. $\endgroup$ Jul 23 '12 at 9:25
  • 1
    $\begingroup$ Just so you know, it's the principal argument. $\endgroup$
    – Potato
    Jul 23 '12 at 9:27
  • $\begingroup$ Oh.. I didn't know you have to add pi. So if the angle is in the 3rd quadrant do I have to add 2pi? I can see these are silly questions, but small things like this are making it difficult for me to learn. I really want to understand this stuff. Thanks so much. $\endgroup$
    – tb747
    Jul 23 '12 at 9:36
  • 1
    $\begingroup$ The period of $\tan$ is $\pi$ so that you must verify if $\pi$ has to be added (depending of the quadrant). That's why many programming languages include a 'atan2' function. $\endgroup$ Jul 23 '12 at 9:39

The principal value of $\tan^{-1}\theta$ is always between $-\frac{\pi}2$ and $\frac{\pi}2$. The principal value of $\arg z$, on the other hand, is always in the interval $(-\pi,\pi]$. Thus, for $z$ in the first quadrant it’s between $0$ and $\frac{\pi}2$; for $z$ in the second quadrant it’s between $\frac{\pi}2$ and $\pi$; for $z$ in the third quadrant it’s between $-\frac{\pi}2$ and $-\pi$; and for $z$ in the fourth quadrant it’s between $0$ and $-\frac{\pi}2$. This means that the $\tan^{-1}$ function gives you the correct angle only when $z$ is in the first and fourth quadrants.

When $z$ is in the second quadrant, you have to find an angle between $\frac{\pi}2$ and $\pi$ that has the same tangent as the angle $\theta$ returned by the $\tan^{-1}$ function, which satisfies $-\frac{\pi}2<\theta\le 0$. The tangent function is periodic with period $\pi$, so $\tan(\theta+\pi)=\tan\theta$, and $$\frac{\pi}2=-\frac{\pi}2+\pi<\theta+\pi\le0+\pi=\pi\;,$$ so $\theta+\pi$ is indeed in the second quadrant.

When $z$ is in the third quadrant, you have to find an angle between $-\pi$ and $-\frac{\pi}2$ that has the same tangent as the angle $\theta$ returned by the $\tan^{-1}$ function, which satisfies $0\le\theta<\frac{\pi}2$. This time subtracting $\pi$ does the trick: $\tan(\theta-\pi)=\tan\theta$, and


There’s just one slightly tricky bit. If $z$ is a negative real number, should you consider it to be in the second or in the third quadrant? The tangent is $0$, so the $\tan^{-1}$ function will return $0$. If you treat $z$ as being in the second quadrant, you’ll add $\pi$ and get a principal argument of $\pi$. If instead you treat $z$ as being in the third quadrant, you’ll subtract $\pi$ and get a principal argument of $-\pi$. But by definition the principal argument is in the half-open interval $(-\pi,\pi]$, which does not include $-\pi$; thus, you must take $z$ to be in the second quadrant and assign it the principal argument $\pi$.

  • $\begingroup$ I tried to correct the two (very) small typos in your solution above, but edits must be at least 6 characters, and I couldn't find anything else to edit (this solution is very informative). Last sentence (before the semicolon), " ...the principal argument is in the interval $(-\pi,\pi]$, which does not include $-\pi$; ... ," and, at the very end of the same sentence, " ...assign it the principal argument $\pi$ ." $\endgroup$
    – Procore
    Jan 21 '17 at 21:08
  • $\begingroup$ I realize this post is from 2012, yet it was immensely helpful to me as it was the clearest explanation I could find! Thank you! $\endgroup$
    – cemsicles
    Sep 10 '18 at 3:13

One of the most important functions in analysis is the argument function $${\rm arg}:\quad \dot{\mathbb R}^2\to {\mathbb R}/(2\pi{\mathbb Z}),\qquad (x,y)\mapsto {\rm arg}(x,y)\ ,$$ resp. $${\rm arg}:\quad \dot{\mathbb C}\to {\mathbb R}/(2\pi{\mathbb Z}),\qquad z\mapsto {\rm arg}z\ ,$$ where the dot indicates that the origin is removed.

Intuitively ${\rm arg}(x,y)$ denotes the polar angle of $(x,y)$ "up to multiples of $2\pi$". For "local" considerations there are continuous real-valued ("numerical") representants of ${\rm arg}$; but these are defined only in a suitable part of $\dot{\mathbb R}^2$. In particular the principal value $${\rm Arg}:\quad {\mathbb R}^2\setminus\{(x,0)|x\leq0\}\ \to {\mathbb R},\qquad (x,y)\mapsto {\rm Arg}(x,y)$$ is defined on the $(x,y)$-plane slit up along the negative $x$-axis. It has the simple symmetry property ${\rm Arg}\bar z=-{\rm Arg}z$, and for $x>0$ it is given by $${\rm Arg}(x,y)=\arctan{y\over x}\qquad(x>0)\ .$$ Note that the ${\rm arg}$ function has a well defined gradient given by $$\nabla{\rm arg}(x,y)=\Bigl({-y\over x^2+y^2},{x\over x^2+y^2}\Bigr)\qquad\bigl((x,y)\ne(0,0)\bigr)\ .$$


I've come up with this recipe for principal argument. It saves messing around adding or subtracting $\pi$.

$$\text{Arg} (z) = n\ \text{cos}^{-1} \left(\frac{x}{z}\right)$$

in which n = 1 if y ≥ 0 but n = -1 if y < 0.

I've tried to 'automate' the value of n, but the best I can do is

$$\text{Arg} (z) = \frac{y}{|y|}\ \text{cos}^{-1} \left(\frac{x}{z}\right).$$

Unfortunately this fails for y = 0 (real z), so the y = 0 case would still have to be catered for separately.

Edit: A very ugly self-contained recipe would be

$$\text{Arg} (z) = \text{sgn}\left(\text{sgn}(y) + \frac{1}{2}\right)\ \text{cos}^{-1} \left(\frac{x}{z}\right).$$

  • $\begingroup$ $|z|,$ not $z$? Otherwise, you might be trying to take $\operatorname{cos}^{-1}$ of a non-real number. Also, n.b. for other readers: I think you can derive the formula from the formula for the angle between two nonzero vectors in $\mathbb R^2$ -- consider the angle between $z$ and an arbitrary point $w$ on the strictly-positive $x$ axis (e.g. $w=1$): $\theta=\operatorname{arccos}(\langle z,w\rangle\|w\|^{-1}\|z\|^{-1}),$ where we view $z$ and $w$ as elements of $\mathbb R^2.$ $\endgroup$ Jul 7 at 20:36

Not the answer you're looking for? Browse other questions tagged or ask your own question.