I have two lines of slope m1 and m2 respectively. What is the slope of the line bisecting these two lines? Clearly there are 2 different lines which can be constructed, one perpendicular to the other. I am looking for the one which bisects the acute angle between the 2 lines.
What is the slope of a line half way between two lines of slope m1 and m2?
-
0Which "halfway"? There are two bisectors to choose from. – 2017-01-17
-
0the line which bisects the acute angle between the lines. – 2017-01-17
-
0But for $y = 2x$ and $y = -2x$, the bisector for the acute angle has no slope. – 2017-01-17
-
0yes it does, it is 0 – 2017-01-17
-
1No, it's vertical. – 2017-01-17
-
0no it's horizontal – 2017-01-17
-
1In my example, the horizontal line bisects an angle of about $127^\circ$, while the vertical line bisects an angle of about $53^\circ$. Which one of those is acute again? – 2017-01-17
-
0I'm not sure which example you are referring to, but the angle for the line y=2x is atn(2) = 63 deg. The angle for the line y=-2x is -63 deg. The bisector therefore is along the x axis with angle=0, and therefore slope=0 – 2017-01-17
-
0But the angle _between the lines_ in that direction is $127^\circ$, which is _not_ acute. – 2017-01-17
-
0ah yes you are correct, the bisector of the acute angle has an infinite slope – 2017-01-17
-
0so the formula below in this case gives the obtuse bisector, not what I need – 2017-01-17
2 Answers
We have:
$$m_1=\frac{y_2-y_1}{x_2-x_1}=\tan{(\alpha)}$$
And:
$$m_2=\frac{y_3-y_1}{x_3-x_1}=\tan{(\beta)}$$
Therefore,
$$m_3=\tan\left(\beta+\frac{\alpha-\beta}{2}\right)=\tan\left(\frac{\alpha+\beta}{2}\right)$$
Where $m_3$ is the slope of the bisector.
Now, we will use this result to find an expression in terms of $m_1$ and $m_2$.
One may show that:
$$\tan\left(\frac{\alpha+\beta}{2}\right)\equiv \frac{1-\cos(\alpha+\beta)}{\sin(\alpha+\beta)}$$
Now, you can use the double angle formulas for $\sin(\alpha+\beta)$ and $\cos(\alpha+\beta)$, then apply the substitutions $\sin(x)=\frac{m}{\sqrt{1+m^2}}$ and $\cos(x)=\frac{1}{\sqrt{1+m^2}}$ to obtain an expression for $m_3=f(m_1,m_2)$.
-
0Thanks - I've done this too but get caught up with multicasing as atan can be of different signs so it gets a bit messy. I'm looking for an equation m3=f(m1,m2) for the acute bisector without having to calculate the angle. – 2017-01-17
-
0Oh, I see, i'll update my answer. – 2017-01-17
-
0ok thanks that works, except for the case where m1 = -m2, this gives 0/0 – 2017-01-17
-
0Yes, indeed that is true. That seems to be one limitation of it. – 2017-01-17
-
0@dacfer Did you get: $$m_3 = \frac{\sqrt{(1+m_1^2)(1+m_2^2)} + m_1m_2 - 1}{m_1 + m_2}$$ – 2017-01-17
-
0yes that is what I got – 2017-01-17
-
0thanks, I wonder if this always gives the acute bisector? – 2017-01-17
-
0I'm quite sure it does as long as $m_1 \neq -m_2$, in that case if you are considering $|m_1|<1$ and the bisector with the shortest angle, you should get $m_3=0$ and if $|m_2|>1$ then $m_3\to \infty$ (vertical line). If $m_1=\pm 1$, then it can be both, since both bisectors have equal angles. – 2017-01-17
-
0Please take a look at the last comment from Arthur regarding y=2x and y=-2x - the formula above gives slope=0 for the bisector, however this indeed for the obtuse not acute angle. I wonder what the general formula is for the acute angle. – 2017-01-17
-
0I have read Arthur's comment. However, note that the equation above gives $\frac{0}{0}$, which is indeterminate. Therefore, the formula should still work given that $m_1 \neq -m_2$, which is why on the last comment, i mentioned the cases when $|m_1|<1$, $|m_1|>1$ and $|m_1|=1$, just in case $m_1=-m_2$. – 2017-01-17
-
0no try m1=1.9999 and m2=-2.0001, it still gives m3 approx=0.0, so it is giving the obtuse bisector – 2017-01-17
-
0@dacfer Oh yes, I apologize, you're right. This seems to only be giving the acute angle for certain angles and giving the obtuse for some. – 2017-01-17
-
0@dacfer Note that the acute bisector is perpendicular to the obtuse one, so if it turns out to be obtuse, you can transform it with $-\frac{1}{m_3}$ – 2017-01-17
-
0I wonder what the general formula is for giving the acute angle. Perhaps you have to calculate the angle between m1 and m3 and if it is greater than 45 deg then use -1/m3 to get the slope of the other one. A bit tedious. – 2017-01-17
-
0yes just writing the same at the same time as you! – 2017-01-17
-
0There **may not** be a general formula without separating them case-by-case... – 2017-01-17
First of all, there are two angle bisectors, so you’ll somehow have to decide which one you wanted.
You might use formulas for sums and half-angles of tangents to calculate this, but it’s pretty easy to find the slope of the bisector directly. In an isosceles triangle, the angle bisector between the two same-length sides passes through the midpoint of the opposite side. So, we move the same distance along each line, find the midpoint, and compute the resulting slope.
Specifically, we can take unit vectors parallel to the lines: $$\begin{align}u_1&=\left({1\over\sqrt{1+m_1^2}},{m_1\over\sqrt{1+m_1^2}}\right) \\ u_2&=\left({1\over\sqrt{1+m_2^2}},{m_2\over\sqrt{1+m_2^2}}\right)\end{align}$$ which you can derive from the identity $\tan^2\theta + 1=\sec^2\theta$, find their midpoint $(u_1+u_2)/2$, divide the $y$-coordinate by the $x$-coordinate and simplify: $$m_3={{\frac12\left({m_1\over\sqrt{1+m_1^2}}+{m_2\over\sqrt{1+m_2^2}}\right)}\over\frac12\left({1\over\sqrt{1+m_1^2}}+{1\over\sqrt{1+m_2^2}}\right)} = {m_1m_2+\sqrt{1+m_1^2}\sqrt{1+m_2^2}-1\over m_1+m_2}.$$ The slope of the other bisector is found via $(u_1-u_2)/2$, which gives $$m_3'={m_1m_2-\sqrt{1+m_1^2}\sqrt{1+m_2^2}-1\over m_1+m_2}$$ instead. (This amounts to choosing either the same sign or opposite signs for the two square roots, which are the cosines of the line angles.) You can verify that $m_3m_3'=-1$, which means that the two bisectors are perpendicular to each other, as we’d expect.
This formula is of course invalid when either line is parallel to the $y$-axis or $m_1+m_2=0$, but those cases are easily dealt with by the bisector method, too. If $m_1=-m_2$, the two midpoints are of the form $(a,0)$ and $(0,b)$ so the bisectors are the coordinate axes. When only one of the lines is vertical, the midpoints are $((0,1)\pm m)/2$, which yields $m_3=m\pm\sqrt{1+m}$ for the slopes. It should be obvious what the bisectors are when both lines are vertical.
-
0I think you have a typo in the denominator for m3, which should be m1+m2. But I'm glad that I have the two formulae, now I need to establish which is the acute solution. Maybe I just have to calculate the angle for each and then choose. – 2017-01-17
-
0@dacfer Good catch. I had fixed one, but not the other. As for finding which one is the acute solution, once you have one of the bisectors, getting the other is just a matter of computing its negative reciprocal or subtracting two terms instead of adding them. You don’t really need to recompute anything. However, you can examine $u_1\cdot u_2$ first instead. If this is positive, you’ll want $m_3$, if negative, $m_3'$. – 2017-01-18