Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript JavaScript Basics (Retired) Working With Numbers The Math Object

Michael McKenna
Michael McKenna
3,451 Points

Fun fact

For those who are not yet math literate, arccos is (1/cos) or the equivalent secant. That is all =)

Adam Nettel
Adam Nettel
460 Points

Not correct. arccos may be written as cos^-1, but confusingly that is not intended to mean 1/cos or sec. Arccos, arcsin, etc are only used to find the angle from a trigonometric ratio, which is the "inverse" of using cos, sin, etc to find the trigonometric ratio from an angle.

1 Answer

Balazs Peak
Balazs Peak
46,089 Points

Adam Nettel has the point :D arccos is the inverse function of cos. Sometimes, you want to calculate the cosine of an angle, right? But maybe even more frequently, you want to tell about a number, which angle's cosine it is. Now, THAT is exactly what arccos is used for.

IF the following equation is true: cos( X ) = Y

THEN cos ( Y ) = X

Example: cos ( X ) = 0.5 What is X? Solution: arccos(0.5) = Pi / 3 = 3.14 / 3 (approximately) You can also give the solution in degrees, then it would be 60