2.1 Linear Functions
1. Basic Notions on Coordinate Geometry
Given two points $A(x_1,y_1)$ and $B(x_2,y_2)$ on a Cartesian plane, the change in $x$ is called the run, and the change in $y$ is called the rise: $$\Delta x=x_2-x_1,\qquad \Delta y=y_2-y_1.$$
The gradient, or slope, of the line segment $AB$ is $$m=\dfrac{\Delta y}{\Delta x}=\dfrac{y_2-y_1}{x_2-x_1},\qquad x_1\neq x_2.$$
The slope indicates the inclination of the line. Moving in the positive direction of the $x$-axis:
- If the line is increasing, then $m>0$.
- If the line is decreasing, then $m<0$.
- If the line is horizontal, then $m=0$.
- If the line is vertical, then $m$ is undefined.
- The slope also satisfies $m=\tan\theta$, where $\theta$ is the angle between the line and the positive $x$-axis.
EXAMPLE 1
For each pair of points, find the slope, distance, and midpoint.
- The $y$-coordinates are equal, so the line is horizontal.
- The slope is $m=0$.
- The distance is $d=5-1=4$.
- The midpoint is $M(3,8)$.
- The $x$-coordinates are equal, so the line is vertical.
- The slope is undefined.
- The distance is $d=7-5=2$.
- The midpoint is $M(1,6)$.
2. The Equation of a Line
A straight line can be written in slope-intercept form as $$y=mx+c,$$ where $m$ is the gradient, or slope, and $c$ is the $y$-intercept.
- $m$ controls the steepness and direction of the line.
- $c$ is the $y$-intercept, so the graph crosses the $y$-axis at $(0,c)$.
- A horizontal line has equation $y=c$ and slope $m=0$.
- A vertical line has equation $x=c$ and has no slope.
- A vertical line is not a function of $x$, so it is not a special case of $y=mx+c$.
EXAMPLE 2
Look at the graphs of $$L_1:y=2x,\qquad L_2:y=-2x.$$
EXAMPLE 3
Look at the graphs of $$L_1:y=2x+3,\qquad L_2:y=-2x+3.$$
EXAMPLE 4
Look at the graphs of $$L_1:y=5,\qquad L_2:x=5.$$
3. Parallel and Perpendicular Lines
Consider two lines $$L_1:y=m_1x+c_1,\qquad L_2:y=m_2x+c_2.$$
- Parallel lines: $$L_1\parallel L_2\quad\Longleftrightarrow\quad m_1=m_2.$$ Example: $$y=3x+5\qquad\text{and}\qquad y=3x+8$$ are parallel.
- Perpendicular lines: $$L_1\perp L_2\quad\Longleftrightarrow\quad m_1m_2=-1.$$ Equivalently, $$m_2=-\dfrac{1}{m_1},\qquad m_1\neq 0.$$ Example: $$y=3x+5\qquad\text{and}\qquad y=-\dfrac{1}{3}x+8$$ are perpendicular.
EXAMPLE 5
Compare the following pairs of lines.
4. Alternative Formula: General Form
A straight line can also be written in the general coordinate form $$Ax+By=C.$$ In this form, $A$, $B$, and $C$ are usually taken to be integers.
- If $B\neq 0$, then we can solve for $y$ and obtain the usual form $y=mx+c$.
- If $B=0$, then $Ax=C$, so $$x=\dfrac{C}{A}.$$ This is a vertical line.
- If $A=0$, then $By=C$, so $$y=\dfrac{C}{B}.$$ This is a horizontal line.
| Form | Equation | Main use |
|---|---|---|
| Slope-intercept form | $y=mx+c$ | Read the slope and $y$-intercept quickly. |
| General form | $Ax+By=C$ | Use integer coefficients and include vertical lines. |
| Point-slope form | $y-y_0=m(x-x_0)$ | Use when a point and slope are known. |
EXAMPLE 6
Convert between general form and slope-intercept form.
5. Given a Point and a Slope
The line passing through a point $P(x_0,y_0)$ with slope $m$ is given by the point-slope formula: $$y-y_0=m(x-x_0).$$
EXAMPLE 7
Find the equation of the line passing through $P(1,2)$ with slope $m=3$.
6. Given Two Points
The line passing through two distinct points $P(x_1,y_1)$ and $Q(x_2,y_2)$ has slope $$m=\dfrac{y_2-y_1}{x_2-x_1},\qquad x_1\neq x_2.$$ Its equation is then found using $$y-y_1=m(x-x_1).$$
Special cases:
- If $x_1=x_2$, the line is vertical and has equation $x=x_1$.
- If $y_1=y_2$, the line is horizontal and has equation $y=y_1$.
EXAMPLE 8
Find the line passing through $P(1,2)$ and $Q(4,7)$. Express your answer in the form $ax+by=c$, where $a,b,c\in\mathbb{Z}$.
EXAMPLE 9 (Horizontal and Vertical Cases)
- The $x$-coordinates are equal: $x_1=x_2=3$.
- The slope is undefined because $$\dfrac{-2-5}{3-3}=\dfrac{-7}{0}.$$
- Therefore, the line is vertical: $$x=3.$$
- The $y$-coordinates are equal: $y_1=y_2=6$.
- The slope is $$m=\dfrac{6-6}{8-(-4)}=\dfrac{0}{12}=0.$$
- Therefore, the line is horizontal: $$y=6.$$