3

Say you have a curve y = f(x). I am looking at a tangent line at point A (line A) and a tangent line at point B (line B). Now let’s also define angle A as the angle between line A and, say, the x axis, and likewise angle B as the angle between line B and the x axis. If the only information you have is the absolute difference in the slopes of lines A and B, can you calculate the difference between angles A and B?

For some reason my first answer was yes, but after thinking through some examples I’m not so sure. For example, say the difference in slopes between lines A and B is 1. Wouldn’t the difference between angles A and B be quite different if:

  • slope of line A is 3 and slope of line B is 2
  • vs slope of line A is 2 and slope of line B is 1?

Am I right that you need more information to calculate the difference between angles A and B? Would this answer be different if the difference between slopes of lines A and B was expressed as a percentage instead of an absolute difference?

nenli
  • 31
  • The formula arctan($a$) - arctan($b$) = arctan$((a-b)/(1+ab))$ gives you the angle between lines of slopes $a$ and $b$, so the quantity from which you can get the angle between the lines is $(a-b)/(1+ab)$ – Ned Mar 10 '22 at 17:12
  • This is the answer I needed. Couldn’t remember if there was a property/identity for inverse tan subtraction. Thank you! – nenli Mar 10 '22 at 17:21
  • @Ned Does the restriction $ab>-1$ apply? – ryang Mar 10 '22 at 17:36
  • @ryang I wouldn't think there is any such restriction -- of course if $ab = -1$ the lines are perpendicular. I suppose you could conventionally take arctan(infinity) to be 90 degrees. – Ned Mar 10 '22 at 19:11
  • @Ned I mean, $\arctan(a) - \arctan(b)=\arctan\dfrac{a−b}{1+ab}+k\pi$ for some $k\in{-1,0,1}.$ – ryang Mar 11 '22 at 05:07
  • Changed the tag from [linear-algebra] to [analytic-geometry] – Jose Arnaldo Bebita Dris Mar 11 '22 at 06:20

1 Answers1

3

Let $\theta\in\left[0,\dfrac\pi2\right]$ be the angle between two lines with gradients $a$ and $b$ such that $ab\ne-1.$

Then \begin{align}\theta&=\Bigg|\arctan\bigg(\tan\Big(\arctan (a) - \arctan (b)\Big)\bigg)\Bigg|\\&= \arctan\left|\frac{a−b}{1+ab}\right|,\end{align} since $$\arctan (a) - \arctan (b)= \begin{cases}\arctan\left(\dfrac{a−b}{1+ab}\right)+\pi\:\operatorname{sgn}(a) &\text{if }ab<-1; \\ \arctan\left(\dfrac{a−b}{1+ab}\right) &\text{if }ab>-1.\end{cases}$$

Hence, to determine the angle between two non-vertical, non-perpendicular lines, their gradient difference is insufficient (for example, the angles between $y=2x$ and $y=x,$ and between $y=2x$ and $y=3x,$ are $18^\circ$ and $8^\circ,$ respectively), but their absolute gradient difference together with their gradient product is sufficient.

P.S. $$-\pi<\arctan(a) - \arctan(b)<\pi.$$

ryang
  • 38,879
  • 14
  • 81
  • 179
  • "but absolute gradient difference together with their gradient product is sufficient". Well, that is not really surprising, because if you know any two things about the gradients, then you have two variables with two equations and hence know the gradients themselves. – Jaap Scherphuis Mar 11 '22 at 08:54
  • 1
    @JaapScherphuis Not necessaily; $(2,3)$ and $(-2,-3)$ are both solutions of $|a-b|{=}1,:ab{=}6.$ – ryang Mar 11 '22 at 11:01
  • Fair enough. I had overlooked that the absolute value still has some ambiguity. – Jaap Scherphuis Mar 11 '22 at 11:30