Let’s study the easiest type of curves in the plane: straight lines.

Table of Contents

### Slope of a Line

Consider a straight line $L$ and two distinct points $P(x_{1},y_{1})$ and $Q(x_{2},y_{2})$ on it (see the following figure). The slope of the line, often denoted by $m$, is defined to be the ratio

\[ \bbox[#F2F2F2,5px,border:2px solid black]{\large m=\frac{y_{2}-y_{1}}{x_{2}-x_{1}}}\]

- The slope of a line is independent of which two points on the line we choose.

If $Q$ is one unit to the right of $P$ such that $x_{2}-x_{1}=1$ then $m=y_{2}-y_{1}$. This shows if we move one unit to the right from any point on a line, the signed distance that we have to go up or down to get back on the line is the slope of the line. This is why sometimes slope is written as

\[ \bbox[#F2F2F2,5px,border:2px solid black]{\large \text{slope}=\dfrac{\text{rise}}{\text{run}}.}\]

The sign of the slope is related to the direction of line as follows:

- $m>0$, the line rises to the right
- $m<0$, the line falls to the right
- $m=0$, line is horizontal

The absolute value of the slope is a measure of steepness of the line (See the following figure).

**Slope of a vertical line:** The slope of a **vertical **line is **not** defined because any two points on such a line have the same $x$ coordinates, and hence when we form the ratio $(y_{2}-y_{1})/(x_{2}-x_{1})$ the denominator becomes zero. We know that division by zero is not defined.

### Equation of a Line

Now let’s find the equation of the line passing through a given point $P(x_{1},y_{1})$ with slope $m$. If $(x,y)$ is any other point on this line, the slope formula gives

\[\frac{y-y_{1}}{x-x_{1}}=m.\]

That is,

\[ \bbox[#F2F2F2,5px,border:2px solid black]{\large y=y_{1}+m(x-x_{1}).}\]

This equation is called the **point-slope form** of the equation of the line.

A special case of the above equation occurs when the given point is a point $(0,b)$ on the $y$-axis. In this case, the number $b$ is called the $y$-intercept of the line and the equation of the line reduces to

\[ \bbox[#F2F2F2,5px,border:2px solid black]{\large y=mx+b,}\]

which is called the **slope-intercept form** of the equation.

If we are given two points $(x_{1},y_{1})$ and $(x_{2},y_{2})$ on the line, then to find the equation of the line, we first have to calculate $m$ which is $m=(y_{2}-y_{1})/(x_{2}-x_{1})$. Substitution of this expression for $m$ in the point-slope form of the equation gives the **point-point form**:

\[ \bbox[#F2F2F2,5px,border:2px solid black]{\large y=y_{1}+\left(\frac{y_{2}-y_{1}}{x_{2}-x_{1}}\right)(x-x_{1}).}\]

- The equation of a vertical line through $(x_{1},y_{1})$ is \[ \bbox[#F2F2F2,5px,border:2px solid black]{\large x=x_{1}.}\]

### Parallel and Perpendicular Lines

A number of lines of the form $y=2x+b$ are plotted in the following figure.

In general:

Two lines with slopes $m_{1}$ and $m_{2}$ are parallel if and only if $m_{1}=m_{2}$.

In other words, if two lines in a plane are parallel, then their slopes are equal and if the slopes of two lines are equal, then they are parallel.

As we can see in the following figure, lines of the form $y=-\frac{1}{2}x+c$ are perpendicular to the lines of the form $y=2x+b$.

In general:

Two lines with slopes $m_{1}$ and $m_{2}$ are perpendicular if and only if $m_{1}m_{2}=-1$.

In other words, the slopes of non-vertical perpendicular lines are negative reciprocals of each other.

- It is clear that a horizontal line (slope 0) is perpendicular to vertical lines (no slope)

#### Proof of two perpendicular lines have negative reciprocal slopes

We can easily prove this condition using the Pythagorean theorem as follows.

Assume the lines $L_{1}$ and $L_{2}$ with slopes $m_{1}$ and $m_{2}$ that are perpendicular intersect at a point $P(x_{0},y_{0})$, as shown in the following figure. Then the equations of these lines are

\[L_{1}:\quad y=y_{0}+m_{1}(x-x_{0})\]

\[L_{2}:\quad y=y_{0}+m_{2}(x-x_{0})\]

From the point of intersection, $P$, we move one unit to the right and then up and down to meet the two lines $L_{1}$ and $L_{2}$ at $A$ and $B$, respectively. Because $A$ lies on $L_{1}$ and $B$ lies on $L_{2}$, their coordinates are

\[A(x_{0}+1,y_{0}+m_{1})\qquad\text{and}\qquad B(x_{0}+1,y_{0}+m_{2}).\]

By the Pythagorean theorem $PA\perp PB$ (this symbol means $PA$ is perpendicular to $PB$) if and only if

\[|PA|^{2}+|PB|^{2}=|AB|^{2}\tag{i }\]

where $|PA|$ or $d(P,A)$ denotes the distance between $P$ and $A$ and so on. Using the Distance formula

\[|PA|=\sqrt{(x_{0}+1-x_{0})^{2}+(y_{0}+m_{1}-y_{0})^{2}}=\sqrt{1+m_{1}^{2}}\]

\[|PB|=\sqrt{(x_{0}+1-x_{0})^{2}+(y_{0}+m_{2}-y_{0})^{2}}=\sqrt{1+m_{2}^{2}}\]

\[|AB|=\sqrt{((x_{0}+1)-(x_{0}+1))^{2}+((y_{0}+m_{2})-(y_{0}+m_{1}))^{2}}=\sqrt{(m_{2}-m_{1})^{2}}\]

If the two lines are perpendicular; that is $PA\perp PB$, then (i) is true. So

\[(\sqrt{1+m_{1}^{2}})^{2}+(\sqrt{1+m_{2}^{2}})^{2}=(\sqrt{(m_{2}-m_{1})^{2}})^{2}\]

or

\begin{align*}

1+m_{1}^{2}+1+m_{2}^{2} & =(m_{2}-m_{1})^{2}\\

& =m_{2}^{2}-2m_{1}m_{2}+m_{1}^{2}

\end{align*}

After simplification, we get

\[2=-2m_{1}m_{2}\]

or

\[m_{1}m_{2}=-1.\]

Conversely, we can show that if $m_{1}m_{2}=-1$, then (i) is true and hence $PA\perp PB$.