# acos vs cos

This topic is 2785 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi @ all,

i would like to know what the acos function really does, i did some research, but couldn't find detailled information. Why is acos used and not cos for calculating the angle between two Points

thank you very much

##### Share on other sites
acos (mathematicaly normally written as cos^-1 x with the -1 as superscript) is the inverse map for cos. acos is a multivalued function technically, y = acos(x) has infinite solutions for y, but we normally take the principal branch restricting it's solutions to the range -pi to pi. therefore for angles 'x' (radians) in the range -pi to pi. acos(cos(x)) = x, and for values 'y' in the range -1 to 1. cos(acos(y)) = y.

the angle between two vectors (not points) can be easily found by the inner product <x,y> = |x||y|cos(t), rearranging to give t = acos(<x,y>/(|x||y|))

the choice of the branch cut for acos means that the value 't' found above for the angle between two vectors is the smallest such angle, it's easy to see that equally t + 2*n*pi for integer n are also solutions to the original equation <x,y> = |x||y|cos(t)

##### Share on other sites
Hi Luca,

thank you for your reply, i need now time to look at it, if i have for all that questions, i will be back here

again, thank you for the detailed explanation.

1. 1
2. 2
3. 3
Rutin
15
4. 4
khawk
13
5. 5
frob
12

• 9
• 9
• 11
• 11
• 23
• ### Forum Statistics

• Total Topics
633669
• Total Posts
3013255
×