# How does $\arccos$ actually work? [duplicate]

$$\arccos\left(\frac{\text{adjacent}}{\text{hypotenuse}}\right)=θ$$

I regard the above as witchcraft. How would I work this out if I didn't have a calculator? Once I know how to workout arcos without a calculator, will I know how to work out arcsine and arctangent? Is it simply a case of swapping around the the adjacent, opposite and hypotenuse?

-

## marked as duplicate by DonAntonio, David H, drhab, mau, heropupMay 31 '14 at 19:44

Same question again?! – DonAntonio May 31 '14 at 18:19
The function $\arccos(x)$ answers the question: My cosine is $x$, who am I? More precisely, $\arccos(x)$ is the number ("angle") between $0$ and $\pi$ whose cosine is $x$. For example, you know that $\cos(\pi/3)=1/2$. (The cosine of the $60$ degree angle is $1/2$.) Therefore $\arccos(1/2)=\pi/3$. – André Nicolas May 31 '14 at 18:27
@DonAntonio - one question is about the function, one is on how to calculate. – nbubis May 31 '14 at 18:31
@nbubis It is practically the same, in particular with the comments/answers already written in the other question. – DonAntonio May 31 '14 at 18:32
Yeah it's about how to calculate – Starkers May 31 '14 at 21:07

It would be better to learn $$\arccos(\cos(\theta)) = \theta,\;\;\text{when } 0 \leq \theta \leq \pi$$

$\arccos(x)$ is the function that gives you the measure of the angle $\theta$, $0 \lt \theta \leq \pi$, for which $\cos \theta = x$

$$\cos\left(\frac\pi4\right) = \sqrt 2/2 \implies \arccos\left(\sqrt 2/2\right)= \frac\pi4$$

You can evaluate $\arccos x$ when $x$ is "nice" (as in my example above where $x=\sqrt 2/2)$, once you get the hang of it and become more familiar with $\cos \theta$ for important-to-know angles. But for most real valued $x$, we can at best obtain an approximate value for $\arccos x$, using a calculator, or some other means of approximating the resultant value. For an exact evaluation when given most real-valued input $x$, $\arccos x$ is the best we can do.

-

You can draw a right-angled triangle with the given adjacent and hypotenuse and then measure the angle with a protractor. Effectively this is what your calculator does.

-
I don't realy think that a calculator "draw" anything... There are plenty of methods to do that effeciently. I think CORDIC do can the staff (at least: use CORDIC to compute cos and then a Newton method to compute the inverse). – Sebastien May 31 '14 at 19:23
@Sebastien: Yep. CORDIC is a smart method to do what would otherwise be done geometrically. – I like Serena May 31 '14 at 19:29

$\arccos(x)$, sometimes written as $\cos^{-1}(x)$ (that is how I like writing it), is the inverse function of $\cos(x)$. All functions and their inverses have this property: $$f^{-1}(f(x))=x$$ Which means: $$\cos^{-1}(\cos(x))=x$$ Provided that the domain is restricted to $0\le x \le\pi$.

It is important to know that $\cos^{-1}(x)\ne \frac 1{\cos(x)}$. The latter is equal to $\sec(x)$. This means that $\cos^{-1}(x)$ is not $\frac{\text{hypotenuse}}{\text{adjacent}}$. In general, $f^{-1}(x)\ne \frac{1}{f(x)}$

If you need to find out what $x$ is when $\cos(x)=\frac 12$, then you would plug in $\cos^{-1}\left(\frac 12\right)$ in your calculator, which would give you $\frac{\pi}{3}$. To check, $\cos\left(\frac{\pi}3\right)$ does indeed equal $\frac 12$.

Most of the time, you will get some messy numbers. This is expected, and is the closest approximation to the exact value of $x$ that will make $\cos(x)$ equal the desired value.

-