# Formula to find the Angle between two slopes

I have given two slopes $m_1 = \frac{1}{2}$ and $m_2 = 1$

While finding the angle I made use of the formula $\tan(\theta) = \frac{m_1-m_2}{1+m_1m_2}$

answer is : $\theta = \arctan(\frac{-1}{3})$

But in book the answer is $\theta = \arctan(\frac{1}{3})$.

what would be the right answer?

• Note that there are two angles between the lines, an acute one and an obtuse one. Using $\tan \theta = \left|\dfrac{ m_1 - m_2}{1+m_1m_2} \right|$ gives you the acute angle. – Ragib Zaman May 21 '14 at 13:43
• It depends on which angle you are looking at. It's a simple matter of "angle of slope 1 to slope 2" versus "angle of slope 2 to slope 1". If you look at it graphically, you probably want a positive angle. – orion May 21 '14 at 13:43
• So in above question what would be the right answer..? as i found these slopes from two curves. – zonnie May 21 '14 at 13:46
• Look at the two lines (tangent lines) and the point where they intersect. You want an acute angle measure -- going counterclockwise around the point of intersection, which line do you get to first before the acute angle? That slope needs to be $m_1$. If you go clockwise, you get the other angle measure, still "acute" but negative measure because clockwise, or equivalently (as far as arctan can tell) the obtuse angle counterclockwise. – user128390 May 21 '14 at 20:29
• Its not clear yet.. Can you guide me. If the point of intersection of two curves is (1,1) and I have found the slope m1 = 1/2 and m2 = 1. Now what would be the angle? – zonnie May 22 '14 at 14:06

$$\frac{1-\frac12}{1+1\cdot\frac 12} = \frac 1 3, \qquad \frac{\frac12-1}{1+\frac12\cdot1} =-\frac13.$$ Either of these is the angle between those two lines. Where two lines intersect they form angles with measures adding up to $180^\circ$. If $\alpha+\beta=180^\circ$ then $\tan\alpha = - \tan\beta$.
Correct formula with sign convention positive for $\theta$ counter-clockwise rotation from direction of radius vector $1$ to $2$ is
$$\tan(\theta) = \dfrac{m_2-m_1}{1+m_1m_2}.$$