We talk about $\tan^{-1}(x)$ in $(-\frac{\pi}{2} \ \ \frac{\pi}{2})$ interval because it's one-to-one. But we can also consider other intervals like $(\frac{\pi}{2},\pi)$ , $(\pi,\frac{3\pi}{2}),\dots$. When we want to find value of $\tan^{-1}(\tan(\frac{4\pi}{3}))$ , the $\frac{4\pi}{3}$ is wrong answer because it's not in $(-\frac{\pi}{2},\frac{\pi}{2})$ interval. But I think we can say $\tan^{-1}(\tan(x)) = x $ or $\tan(\tan^{-1}(x)) = x $ in any intervals (that is pointed out) What's my mistake ?

  • $\begingroup$ There is no generally accepted answer. The definition is malleable so that different problems can be considered. It is typically obvious what $\tan^{-1}$ should be doing based on the context of the question. $\endgroup$
    – Kaynex
    Commented Feb 12, 2017 at 20:37
  • $\begingroup$ The function $\tan^{-1}$ can only be used when you restrict the domain of $\tan$ to the classic interval $[-\pi/2,\pi/2)$, as you stated. $\endgroup$
    – Tim Thayer
    Commented Feb 12, 2017 at 20:38
  • $\begingroup$ @Kaynex Okay , but how we can say $\tan^{-1}(\tan(\frac{\pi}{3})) = \frac{\pi}{3} $ and $\tan^{-1}(\tan(\frac{4\pi}{3})) = \frac{4\pi}{3} $ is wrong. $\endgroup$
    – S.H.W
    Commented Feb 12, 2017 at 20:41
  • $\begingroup$ @TimThayer Consider $\tan^{-1}(x)$ in $(\pi , 3\pi/2)$ interval . What we can say about $\tan^{-1}(\tan(x))$ ? $\endgroup$
    – S.H.W
    Commented Feb 12, 2017 at 20:48
  • 1
    $\begingroup$ You only can say $\arctan(\tan x)\equiv x\mod\pi$ in general. $\endgroup$
    – Bernard
    Commented Feb 12, 2017 at 20:48

3 Answers 3


The maps $(-\frac\pi2,\frac\pi2)\to\mathbb{R},x\mapsto\tan(x)$ and $\mathbb{R}\to(-\frac\pi2,\frac\pi2),x\mapsto\arctan(x)$ are bijections and each one is the inverse of the other one.

Hence we have :

$$\forall x\in\mathbb{R},\,\tan(\arctan(x))=x$$


$$\forall x\in(-\frac\pi2,\frac\pi2),\,\arctan(\tan(x))=x$$

Now consider any $\displaystyle{x\in\mathbb{R}-\{\frac\pi2+k\pi;\,k\in\mathbb{Z}\}}$.

There exists a unique integer $k$ such that $x-k\pi\in(-\frac\pi2,\frac\pi2)$; so :


but $\tan(x-k\pi)=(-1)^k\tan(x)$ and $\arctan(-t)=-\arctan(t)$ for every $t\in\mathbb{R}$.

Hence :


If you prefer an even more explicit formula, you can observe that the condition $$-\frac\pi2<x-k\pi<\frac\pi2$$ is equivalent to $$k<\frac x\pi+\frac12<k+1$$ so that :

$$\boxed{\forall x\in\mathbb{R}-\{\frac\pi2+k\pi;\,k\in\mathbb{Z}\},\;\arctan(\tan(x))=(-1)^{\lfloor\frac x\pi+\frac12\rfloor}\left(x-\left\lfloor\frac x\pi+\frac12\right\rfloor\pi\right)}$$

  • $\begingroup$ Fantastic Answer!! Thanks! $\endgroup$
    – S.H.W
    Commented Feb 12, 2017 at 21:12
  • $\begingroup$ @S.H.W: You are welcome :) $\endgroup$
    – Adren
    Commented Feb 12, 2017 at 21:25

The tangent function reports a number between $(-\infty, \infty)$ in accordance with the angle input from the domain. So the formula $\tan(\tan^{-1}(x))$ reports the tangent of the angle between $(\frac{-\pi}{2},\frac{\pi}{2})$ whose tangent is $x,$ and hence will always return $x.$

On the other hand, $\tan^{-1}(\tan(x))$ is the angle between $(\frac{-\pi}{2},\frac{\pi}{2})$ that shares the same value as the tangent of the angle $x.$ Hence, $\tan^{-1}(\tan(x))=x$ if and only if $x \in (-\frac{\pi}{2}, \frac{\pi}{2}).$ However, the above description does imply $\tan^{-1}(\tan(x))=x+k\pi$ where $k \in \mathbb{Z}.$

  • $\begingroup$ For example in $(\pi , 3\pi/2)$ interval , how we can understand the proper value for $k$ ? $\endgroup$
    – S.H.W
    Commented Feb 12, 2017 at 20:54
  • $\begingroup$ We know $\tan^{-1}(\tan(\frac{4\pi}{3})) = \frac{\pi}{3}$. So , It seems that proper $k$ is $-1$. $\endgroup$
    – S.H.W
    Commented Feb 12, 2017 at 20:58
  • $\begingroup$ @Bernard Can you help about finding proper $k$ ? $\endgroup$
    – S.H.W
    Commented Feb 12, 2017 at 21:05
  • $\begingroup$ SHW, take your result and keep adding (or subtracting) multiples of $\pi$ until your original input is obtained. $\endgroup$ Commented Feb 12, 2017 at 21:35

This is an object lesson in why $\tan^{-1}$ is a misleading and hence poor notation!

We know that the restriction of the function $\tan$ to the interval $\left(-\frac{\pi}{2}, \frac{\pi}{2}\right)$ is bijective, so it is invertible. We denote this inverse, which we often called the arctangent by $$\arctan := \left(\tan\vert_{\left(-\frac{\pi}{2}, \frac{\pi}{2}\right)}\right)^{-1} .$$ Concretely, this is the function that takes as its argument the slope $m$ of a line $L$ in the plane and returns the (signed) angle $\arctan m$ in $\left(-\frac{\pi}{2}, \frac{\pi}{2}\right)$ formed by the $x$-axis and $L$.

Since $\tan\vert_{\left(-\frac{\pi}{2}, \frac{\pi}{2}\right)}$ and $\arctan$ are inverses, we have $$\left(\tan\vert_{\left(-\frac{\pi}{2}, \frac{\pi}{2}\right)} \circ \arctan\right)(y) = y \qquad \textrm{and} \qquad \left(\arctan \circ \left(\tan\vert_{\left(-\frac{\pi}{2}, \frac{\pi}{2}\right)}\right)\right)(x) = x.$$

The first equation tells us that $\tan \arctan y = y$ for any real $y$. The second equation, however, guarantees that $\arctan \tan x$ only for $x \in \left(-\frac{\pi}{2}, \frac{\pi}{2}\right)$---of course, this equation can't hold for any other $x$, for the simple reason that the image of $\arctan$ is $\left(-\frac{\pi}{2}, \frac{\pi}{2}\right)$! On the other hand, since we know that $\tan (x + \pi k) = \tan x$ precisely for integers $k$, we can conclude a slightly weaker statement for general $x$, namely that $$\arctan \tan x = x \pmod \pi .$$


You must log in to answer this question.

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