3
$\begingroup$

As the title says, I'm confused on what tan and atan are. I'm writing a program in Java and I came across these two mathematical functions. I know tan stands for tangent but if possible could someone please explain this to me. I have not taken triginomotry yet (I've taken up to Algebra 1) so I don't really need a very in depth explanation since i wouldnt understand but just a simple one so i could move on with my program would be great! Thanks in advanced. Also if possible could someone possibly give me a link to an image/example of a tangent and atan.

$\endgroup$
  • $\begingroup$ Why not simply youtube "tan"? $\endgroup$ – goblin May 4 '15 at 16:17
  • $\begingroup$ did that, went to the website khanaccademy.com which usually has some very helpful videos but I needed further information still so I asked here. $\endgroup$ – Bob Mc Muffins. May 4 '15 at 16:50
  • 2
    $\begingroup$ I will preserve this piece of information from my deleted answer; when programming you should be careful to check the precise conventions. Especially as regards the range of atan and the usage of radians vs. degrees. $\endgroup$ – quid May 4 '15 at 16:51
  • $\begingroup$ see also atan2 w3schools.com/jsref/jsref_atan2.asp $\endgroup$ – John Joy May 5 '15 at 0:22
  • 1
    $\begingroup$ @quid, I don't get why your answer was downvoted. $\endgroup$ – goblin May 5 '15 at 6:39
4
$\begingroup$

A quick google search of "java atan" would tell you that it stands for "arctangent", which is the inverse of tangent. Tangent is first understood as a ratio of non-hypotenuse sides of a right triangle. Given a non-right angle $x$ of a right triangle, $\tan(x)$ is the ratio $\frac{o}{a}$ where $o$ is the length of the leg of the triangle opposite $x$ and $a$ is the length of the leg adjacent to $x$. Arctangent takes the ratio as an input and returns the angle.

I don't think any single answer to your post will give you a complete understanding of tangent and arctangent. To get that, I recommend spending some time with sine, cosine, tangent and the unit circle. Here is a link to an image http://www.emanueleferonato.com/images/trigo.png that uses an angle $A$ and triangle sides $a,o,h$. In the context of that photo, $\arctan\left(\frac{\text{opposite}}{\text{adjacent}}\right) = A$

$\endgroup$
  • $\begingroup$ Okay thank you, and thanks to everyone else who answered,this is basically what i needed to see, I will do further research at this point! $\endgroup$ – Bob Mc Muffins. May 4 '15 at 16:42
  • $\begingroup$ @AshwinGupta good luck to you! I am happy to answer any other questions should you have any. A solid understanding of trigonometry will take you far in mathematics. $\endgroup$ – graydad May 4 '15 at 16:44
1
$\begingroup$

I think the following picture is useful [from Wikipedia]:

enter image description here

The tangent of a number $0<\theta<\pi/2$ is constructed by

  • taking a circle of radius 1, centered at the origin
  • drawing the tangent at the point on positive $x$-axis
  • drawing the line (ray) at an angle of $\theta$ from the origin
  • constructing the intersection of these two lines
  • measuring the distance between the intersection and the positive $x$-axis.

The final distance is the tangent of $\theta$, denoted $\tan\theta$.

As others have mentioned, the arctangent of a number $0<d<\infty$ is the number $\theta$ for which $\tan\theta=d$. In other words, it is the angle for which, after performing the described procedure above, you get a distance of $d$. It is denoted in many ways, including atan $\theta$, arctan $\theta$, and $\tan^{-1}\theta$.

Note that I've only defined $\tan\theta$ for a limited collection of $\theta$: to get other values, you can use the identities $\tan(-\theta)=-\tan(\theta)$ and $\tan(\pi+\theta)=\tan\theta$. So for instance, if you knew that $\tan(\pi/4)=1$, then you would also know that

$$\tan\left(-\frac{7\pi}{4}\right) =-\tan\left(\frac{7\pi}{4}\right) =-\tan\left(\frac{3\pi}{4}\right) =-\tan\left(-\frac{\pi}{4}\right) =\tan\left(\frac{\pi}{4}\right) =1$$

From these facts you can also derive the rest of the arctangent values: it turns out that atan $-d$ = $-$atan $d$.

(This is not entirely true: the arctangent is technically a multivalued function, so you have to make some arbitrary choice of how to extend it to negative numbers. But the choice above is the most common one.)

$\endgroup$
  • $\begingroup$ thanks for such a through answer! Im going to do some research on sin, cosine, ect like the answer above told me to than come back to this one. $\endgroup$ – Bob Mc Muffins. May 4 '15 at 16:46
  • $\begingroup$ Also nice picture this helped $\endgroup$ – Bob Mc Muffins. May 6 '15 at 13:50
-1
$\begingroup$

atan stands for "arc tangent." It is the inverse function of tangent - this means it undoes the tangent function. So atan(tan(30)) = 30.

$\endgroup$
  • $\begingroup$ But the OP doesn't know what tangent is. $\endgroup$ – Eff May 4 '15 at 16:05
  • $\begingroup$ @Eff yes thanks. Although, with the knowledge from the other answers, this does have some use. (It should just be a comment though..) $\endgroup$ – Bob Mc Muffins. Nov 23 '15 at 22:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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