# Slope of a line perpendicular to a line of slope $0$.

I have three points:

$P = (2,5)$

$Q = (12,5)$

$R = (8,-7)$

I need to find the equation of the line thru $R$ which is perpendicular to $PQ$.

How do I do this? $PQ$'s gradient is $\frac{5-5}{12-2}=0$ so the line perpendicular to that has what kind of gradient?

-
They call it analytic geometry for a reason. Draw a picture! –  Gerry Myerson Mar 10 '12 at 5:26

It is easier than the equations of the other altitudes, not harder.

By drawing a picture, we can see that the altitude you are referring to is a vertical line. That line passes through $(8,-7)$, so it has equation $x=8$: the points on the line all have the shape $(8,t)$.

We get accustomed to viewing $y=mx+b$ as a general equation that will work for all lines. It works for almost all lines. But vertical lines have equation of the shape $x=k$. They do not fit the "slope-intercept" format since (i) they do not have a slope and (ii) all of them except the $y$-axis itself do not intercept the $y$-axis.

Remark: Horizontal lines are a little special too: they have equations of the shape $y=k$. Note however that this does fit the $y=mx+b$ format, with $m=0$.

One can give a general equation for lines, by saying that the equation has shape $ax+by+c$, where at least one of $a$ and $b$ is non-zero.

One can, for certain purposes, view a vertical line as having infinite slope. But the "infinity" concept can be treacherous, so avoiding it seems like a good idea.

-