Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In dealing with the complex logarithm function, I read that the imaginary part of $\log w$, is also called the argument of $w$, $\operatorname{arg }w$, and it is interpreted geometrically as the angle between the positive real axis and the half line from the origin through the point $w$.

Using the interpretation, is there a standard way to define angles in triangles in the plane? I tried to draw a crude little picture.

enter image description here

So something like $\Im(\log b)-\Im(\log a)$ would give the angle between the two dashed lines emanating out to $b$ and $a$, but how would one define the angle between the legs $ab$ and $ac$? I would like to avoid angles greater than $\pi$, so I'm hoping there's a definition that returns angles in $[0,\pi]$. Thanks.

share|cite|improve this question
What if you look at $c - a$ and $b - a$? – Dylan Moreland Feb 1 '12 at 23:17
@DylanMoreland Ok, so a good formula is $\Im(\log(c-a))-\Im(\log(b-a))$? Is there a good way to mod out by $\pi$ to get values in $[0,\pi]$? I don't want to accidentally mod out and get $\pi=0$. – Dedede Feb 1 '12 at 23:23
up vote 3 down vote accepted

Try $\text{Im} \log \left(\frac{c-a}{b-a}\right)$, using the principal branch of the logarithm (the one with the imaginary part in $(-\pi, \pi]$). The result is positive if leg $ac$ is counterclockwise from leg $ab$ and negative if it is clockwise. If you don't care whether it's clockwise or counterclockwise, take $\left|\text{Im} \log \left(\frac{c-a}{b-a}\right)\right|$.

share|cite|improve this answer
This is related to this formula. – J. M. Feb 2 '12 at 0:41
Thank you Robert. – Dedede Feb 3 '12 at 7:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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