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.
-
Which "halfway"? There are two bisectors to choose from. – Arthur Jan 17 '17 at 16:19
-
the line which bisects the acute angle between the lines. – Adrian Jan 17 '17 at 16:23
-
But for $y = 2x$ and $y = -2x$, the bisector for the acute angle has no slope. – Arthur Jan 17 '17 at 16:34
-
yes it does, it is 0 – Adrian Jan 17 '17 at 16:36
-
1No, it's vertical. – Arthur Jan 17 '17 at 17:17
-
no it's horizontal – Adrian Jan 17 '17 at 17:19
-
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? – Arthur Jan 17 '17 at 17:27
-
I'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 – Adrian Jan 17 '17 at 17:42
-
But the angle between the lines in that direction is $127^\circ$, which is not acute. – Arthur Jan 17 '17 at 17:45
-
ah yes you are correct, the bisector of the acute angle has an infinite slope – Adrian Jan 17 '17 at 18:28
-
so the formula below in this case gives the obtuse bisector, not what I need – Adrian Jan 17 '17 at 18:36
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)$.

- 15,428
-
Thanks - 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. – Adrian Jan 17 '17 at 16:27
-
-
ok thanks that works, except for the case where m1 = -m2, this gives 0/0 – Adrian Jan 17 '17 at 16:50
-
Yes, indeed that is true. That seems to be one limitation of it. – projectilemotion Jan 17 '17 at 16:53
-
@dacfer Did you get: $$m_3 = \frac{\sqrt{(1+m_1^2)(1+m_2^2)} + m_1m_2 - 1}{m_1 + m_2}$$ – projectilemotion Jan 17 '17 at 16:56
-
-
-
I'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. – projectilemotion Jan 17 '17 at 17:24
-
Please 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. – Adrian Jan 17 '17 at 18:32
-
I 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$. – projectilemotion Jan 17 '17 at 18:35
-
no try m1=1.9999 and m2=-2.0001, it still gives m3 approx=0.0, so it is giving the obtuse bisector – Adrian Jan 17 '17 at 18:38
-
@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. – projectilemotion Jan 17 '17 at 18:44
-
@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}$ – projectilemotion Jan 17 '17 at 18:47
-
I 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. – Adrian Jan 17 '17 at 18:50
-
-
There may not be a general formula without separating them case-by-case... – projectilemotion Jan 17 '17 at 18:53
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.

- 53,693
-
I 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. – Adrian Jan 17 '17 at 21:38
-
@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'$. – amd Jan 18 '17 at 04:42
-
See also https://math.stackexchange.com/q/2403530/265466 for a related pair of formulas for the bisectors of a pair of arbitrary lines that also gives a way to determine which is the acute bisector. – amd Oct 30 '19 at 18:53