This is probably just me misunderstanding trig properties. I remember from my trig days that $\tan(\arctan(x)) = x$ But I can't remember if that holds the other way. Can someone help me out? Is this valid:

$$\arctan(\tan(\theta)) = \theta$$

  • 1
    $\begingroup$ Just saying, the arctan of an angle is meaningless. $\endgroup$
    – zzz
    Jan 27, 2017 at 16:04
  • 2
    $\begingroup$ $\theta$ is a variable not exclusively reserved for angles. $\endgroup$
    – Umberto P.
    Jan 27, 2017 at 16:05
  • $\begingroup$ @Zxu You're right that was just laziness on my part. I've edited, to make it clear that I'm not talking about an angle. $\endgroup$ Jan 27, 2017 at 16:16
  • $\begingroup$ simple solution... draw a graph of the tangent function. Then draw the arctan function on both an x-y graph and a y-x graph. $\endgroup$
    – John Joy
    Jan 29, 2017 at 10:25
  • $\begingroup$ @JohnJoy Yeah Rohan demonstrates that in his answer: math.stackexchange.com/a/2116642/194115http://… $\endgroup$ Jan 30, 2017 at 3:04

4 Answers 4


It is true that $\tan\arctan x=x$, for every $x$. The converse is not true and it cannot be, because the tangent is not an injective function.

Recall that $\arctan x$ returns a number (an angle if you prefer) in the interval $(-\pi/2,\pi/2)$. So we have the equality $$ \arctan(\tan\theta)=\theta $$ if and only if $\theta\in(-\pi/2,\pi/2)$.

A formula can be given for any $\theta$: you just need to “reduce” the angle to the right interval by subtracting an integral multiple of $\pi$ so that $$ -\frac{\pi}{2}<\theta-k\pi<\frac{\pi}{2} $$ which is equivalent to $$ -\frac{1}{2}<\frac{\theta}{\pi}-k<\frac{1}{2} $$ or $$ 0<\frac{\theta}{\pi}+\frac{1}{2}-k<1 $$ or $$ k<\frac{\theta}{\pi}+\frac{1}{2}<k+1 $$ which means $$ k=\left\lfloor\frac{\theta}{\pi}+\frac{1}{2}\right\rfloor $$ Thus $$ \arctan(\tan\theta)=\theta-\pi\left\lfloor\frac{\theta}{\pi}+\frac{1}{2}\right\rfloor $$ (of course when $\tan\theta$ is defined to begin with).

For instance, if $\theta=15\pi/4$, we have $$ \left\lfloor\frac{\theta}{\pi}+\frac{1}{2}\right\rfloor= \left\lfloor\frac{15}{4}+\frac{1}{2}\right\rfloor=4 $$ and $$ \arctan\tan\frac{15\pi}{4}=\frac{15\pi}{4}-4\pi=-\frac{\pi}{4} $$

  • $\begingroup$ I think that I understand everything here, except for why you're taking the floor. What's that about? $\endgroup$ Jan 27, 2017 at 18:10
  • $\begingroup$ @JonathanMee If $k<x<k+1$, then $k=\lfloor x\rfloor$, we need to find $k$. $\endgroup$
    – egreg
    Jan 27, 2017 at 18:29
  • $\begingroup$ Arctan(Tan( is a Beautiful way of representing Floor function $\endgroup$ Jan 29, 2018 at 0:50
  • $\begingroup$ @egreg: if theta = 2.5*pi, then arctan(tan(2.5pi))=pi/2. The equality provided yields -pi/2. Check use of ceiling vs. floor function. $\endgroup$
    – 926reals
    Jun 21, 2018 at 1:22
  • $\begingroup$ @926reals If $\theta=5\pi/2$, then $\tan\theta$ is not defined. $\endgroup$
    – egreg
    Jun 21, 2018 at 6:41

Yes, if $-\pi/2 < \theta < \pi/2$.

No, otherwise.


It only equals $\theta $ if $$-\frac {\pi}{2}<\theta < \frac {\pi}{2} $$ as the range of $\arctan$ is only from $-\frac {\pi}{2} $ to $\frac {\pi}{2} $. If $\theta $ is outside this interval, then you would need to add or subtract $\pi $ from $\theta $ until you get to the angle in this interval that has the same value of $\tan$.

For instance, $\arctan (\tan \frac {\pi}{6}) = \frac {\pi}{6} $, but $\arctan (\tan \frac {3\pi }{4}) = -\frac {\pi}{4} $.

This can also been seen here:

enter image description here Hope it helps.


All you can say a priori is $$\arctan(\tan\theta)\equiv \theta\mod\pi.$$

  • $\begingroup$ Just checking here, you meant mod π/2 right? $\endgroup$ Jan 27, 2017 at 16:22
  • $\begingroup$ Not at all. The tangent function has period π. $\endgroup$
    – Bernard
    Jan 27, 2017 at 16:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .