Slopes and lines Given two lines having slope $m_1$ and $m_2$, the angle between them is given by $\tan(\theta)=\frac{m_2- m_1}{1+m_1m_2}$
Does the order of $m_1$ and $m_2$ matter here, and if so what is the significance? Graphical aid would be helpful.


Consider two non-perpendicular and non-vertical intersecting lines $\overleftrightarrow{l_1}$ and $\overleftrightarrow{l_2}$ in the coordinate plane.
Observe that $\overleftrightarrow{l_1}$ and $\overleftrightarrow{l_2}$ form two pairs of vertically opposite angles (acute angles $a$ and $c$, obtuse angles $b$ and $d$) between them.
To express $a$ and $b$ in terms of the slopes $m_1$ and $m_2$, let’s first see how they are related to the inclinations of  $\overleftrightarrow{l_1}$ and $\overleftrightarrow{l_2}$, i.e. $p$ and $q$.

$$a=q-p$$ $$b= 180°-(q-p)$$
Now, since $p$ and $q$ are the inclinations of $\overleftrightarrow{l_1}$ and $\overleftrightarrow{l_2}$ respectively, their respective slopes are
$$m_1=\tan p$$
$$m_2=\tan q$$
So, to express a and b in terms of $m_1$ and $m_2$, let’s take the tan on both sides of (1) and (2) as follows:
$$\tan a=\tan (q−p) and \tan b=\tan (180°−(q−p))$$
$$⇒ \tan a=\tan (q−p) and \tan b=−\tan (q−p)$$    [Using the result $\tan (180°−θ)=−\tan θ$.]
Using the above equations, we can express $\tan a and \tan b$ in terms of $m_1 and m_2$ as follows:
$$
\begin{array}{l}
\tan a=\dfrac{m_{2}-m_{1}}{1+m_{1} m_{2}} \\
\tan b=-\dfrac{m_{2}-m_{1}}{1+m_{1} m_{2}}
\end{array}
$$
