Slope is independent of coordinates Let $y = m_1 x + b_1$, $y = m_2 x + b_2$ be two lines in $\mathbb R^2$. Then the expression $(m_2 - m_1)/(1 + m_1 m_2)$ is independent of coordinates. I tried to show this but failed: 
Pick two points on line one: $p_1 = (0,b_1), p_2 = (1, m_1 + b_1)$. Assume these are the coordinates in an orthonormal basis $e_1', e_2'$. Assume $T = ( \begin{array}{cc} a & c \\ b & d\end{array} )$ is a basis coordinate transformation to an orthonormal basis $e_1, e_2$: $Te_1' = e_1, Te_2' = e_2$.
I computed the points with respect to $e_i$ as: 
$p_1 = b_1 Te_2' = (\begin{array}{c} b_1 c \\ b_1 d\end{array})$
$p_2 =  Te_1' + (m_1 + b_1)Te_2'  = (\begin{array}{c} a + (m_1 + b_1)c \\ b + (m_1 + b_1)d\end{array})$
and then $m_1 = \frac{b + m_1 d}{a + m_1 c}$. Similarly for $m_2$.
Then I compute $(m_2 - m_1)/(1 + m_1 m_2) = \frac{[(m_2 -m_1)(ad - bc)][1 + m_1m_2]}{((a+m_1c)(a+m_2c))^2}$
These should be equal. What is my mistake? Thank you for correcting me. 
 A: The new slopes you computed look OK to me, but it looks as if something strange happened when you plugged them into $\frac{m_2-m_1}{1+m_1m_2}$.  The numerator and denominator of this expression will be unpleasant differences and sums of fractions, but all the fractions here can be put on a common denominator of $(a+m_1c)(a+m_2c)$. So this denominator will completely cancel out, and I don't see why you have its square in the denominator of your last formula.  I suspect you might have multiplied $m_2-m_1$ by $1+m_1m_2$  instead of dividing.  
By the way, you could avoid a lot of algebra by remembering that the slope of a (non-vertical) line is the tangent of the angle that the line makes with the $x$-axis.  So, calling the angles $\theta_1$ and $\theta_2$, we have, thanks to a helpful trig identity,
$$
\frac{m_2-m_1}{1+m_1m_2}=\frac{\tan\theta_2-\tan\theta_1}{1+(\tan\theta_1)(\tan\theta_2)}
=\tan(\theta_2-\theta_1),
$$
which is the tangent of the angle between your two lines.  That angle doesn't change when you rotate your coordinate system, so its tangent is also unchanged.
A: EDIT: Sorry I thought you wanted to show that if the lines are perpendicular then $m_1m_2=-1$.
A nice proof of this fact goes as follows. Let $L_1$ and $L_2$ be two lines of slope $m_1$ and $m_2$ and suppose that the lines are perpendicular.
Translate their intersection to the origin and suppose without loss of generality that $m_1>0$ and $m_2<0$ (if one of these are zero rotate the plane through $\alpha$ such that both of the $m_i$ are non-zero). Now consider the points $o(0,0)$, $a(1,0)$, $p(1,m_1x)\in L_1$ and $q(1,m_2x)\in L_2$. 
Consider the triangles $\triangle oap$ and $\triangle oaq$. Both are right-angled so we have:
$|op|^2=1+m_1^2$ and $|oq|^2=1+m_2^2$.
Now consider the right-angle triangle $\triangle opq$ and apply Pythagoras (note that $|aq|=-m_2$):
$|pq|^2=|op|^2+|oq|^2$
$\Rightarrow (m_1-m_2)^2=(1+m_1^2)+(1+m_2^2)$
$\Rightarrow m_1^2-2m_1m_2+m_2^2=2+m_1^2+m_2^2$
from whence it follows that $m_1m_2=-1$ $\bullet$
