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

Let say I have this figure,

enter image description here

I know slope $m1$, slope $m2$, $(X1, Y1)$, $(X2, Y2)$ and $(X3, Y3)$. I need to calculate slope $m3$. Note the line with $m3$ slope will always equally bisect line with $m1$ slope and line with $m2$.

share|cite|improve this question
up vote 2 down vote accepted

A possible answer is that if $$ m_1=\tan(\alpha), \qquad m_2=\tan(\beta), $$ then $$ m_3=\tan\left(\frac{\alpha+\beta}2\right). $$

share|cite|improve this answer

Suppose $m_1$ is $\tan(x)$ and $m_2$ is $\tan(y)$. We basically want $$ \begin{eqnarray} \tan((x+y)/2) &=& (1-\cos(x+y))/\sin(x+y)\\ & =& (1-(\cos(x)\cos(y) - \sin(x)\sin(y)))/(\sin(x)\cos(y) + \cos(x)\sin(y)) \end{eqnarray} $$

This is easy as $\sin(x) = m_1/\sqrt{1+m_1^2}, \cos(x) = 1/\sqrt{1+m_1^2}$, and similarly for $y$. Call $\sqrt{1+m_1^2} = n_1$ and similarly $n_2$ for $m_2$.

$$m_3 = (1-(1/n_1n_2 - m_1m_2/n_1n_2)/(m_1/n_1n_2 + m_2/n_1n_2) = (n_1n_2 + m_1m_2 - 1)/(m_1+m_2)$$

So $m_3 = \left(\sqrt{(1+m_1^2)(1+m_2^2)} + m_1m_2 - 1\right)/(m_1 + m_2).$

You can easily check that if $m_2 = m_1$, then $m_3 = m_1$ here. Looks legit.

share|cite|improve this answer

You have $m_1=\frac{Y_2-Y_1}{X_2-X_1}=\tan(\alpha_1)$ and $m_2=\frac{Y_3-Y_1}{X_3-X_1}=\tan(\alpha_2)$, so you'll get $$m_3=\tan(\alpha_2+\frac{\alpha_1-\alpha_2}{2})=\tan(\frac{\alpha_1+\alpha_2}{2}).$$

share|cite|improve this answer

Other wasting time approach.

First, let us connect points $(x_2,y_2)$ and $(x_3,y_3)$ with a line. The intersection point of $y_3=m_3x+n_3$ with our line we call $P(x_P,y_P)$. Let us now find that point $P$.

As all three points of our triangular(say $\Delta ABC$} are known, we can use the following triangular area formula(that uses only our given points):

$$ S_{\Delta ABC}=\frac{1}{2}|x_1y_2+x_2y_3+x_3y_1-x_2y_1-x_3y_2-x_1y_3| $$

Using that formula two more times for small triangles($S_1$ and $S_2$ ),after solving $ S_{\Delta ABC}=S_1+S_2$ we will get an equation with two unknowns($x_P,y_P$)

The second equation we could get from compering the slope of points $(x_2,y_2)$, $(x_3,y_3)$ with the slope of $(x_2,y_2)$, $(x_P,y_P)$(all three point are on the same line).

Finally, we solve system of two equations and find point $P$, and with $(x_1,y_1)$ we can find our desired slope.

share|cite|improve this answer

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.