Given two straight lines $$y=m_1x+c$$ and $$y=m_2x+d$$
When two lines are perpendicular to each other the product of their gradients, $m_1m_2=-1.$
How can I show that $$m_1m_2=-1?$$
Given two straight lines $$y=m_1x+c$$ and $$y=m_2x+d$$
When two lines are perpendicular to each other the product of their gradients, $m_1m_2=-1.$
How can I show that $$m_1m_2=-1?$$
On
By direction vectors
then by dot product
$$v\cdot w = 1+m_1m_2=0\implies m_1m_2=-1$$
Or as an alternative
then
$$m_1m_2=\tan \theta_1\left(-\frac 1 {\tan \theta_1}\right)=-1$$
On
The angle $\theta$ between 2 lines is given by $$\tan(\theta)=|\frac{m_1-m_2}{1+m_1m_2}|$$ Suppose $m_1m_2\ne -1$, then $\tan(\theta)$ is defined and hence $\theta$ is not $90^{\circ}$ which is a contradiction. Thus we must have $m_1m_2=-1$.
Let $l_1$ denote the first line $y = m_1x+c$, and let $l_2$ denote the second line $y = m_2x+d$. Whether these two lines are perpendicular or not depends only on their slopes, so in the following, we may set $c=d=0$.
Let $P=(x_1,y_1)$ and $Q=(x_2,y_2)$ be two points on the line $l_1$. Then $$m_1 = \frac{y_2-y_1}{x_2-x_1}.$$ Assume that the two lines are perpendicular. Then $P' = (-y_1,x_1)$ and $Q'=(-y_2,x_2)$ are points on the line $l_2$ (the points have been rotated $90^{\circ}$ counter-clockwise about the origin).
The slope of line $l_2$ is then seen to be $$m_2 = \frac{x_2-x_1}{-y_2-(-y_1)}=\frac{x_2-x_1}{y_1-y_2} = -1/m_1.$$ Thus $$m_1m_2 = -1.$$