4.6 Linear Functions

Let's end our chapter on slope by taking a look at linear functions. That is, we'll look at functions that have lines as graphs.
Definition.
A function \( z \mathrel{\overset{f}{\leftarrow}} x \) is linear if we can write it in the form
\[ \begin{align} z - z_0 &= s \mult (x - x_0) \end{align} \]
where
\[ \begin{align} &x_0 : \Number, & &z_0 : \Number, & &s : \Number \end{align} \]
are constants.
We may always easily solve for the output variable, \( z \), but we'll often prefer to write a linear function in the above form.
Important.
The graph of a linear function
\[ \begin{align} z - z_0 &= s \mult (x - x_0) \end{align} \]
is the line that
  • has height \( z = z_0 \) at \( x = x_0 \), and
  • has slope \( s \).
The line has the same slope \( s \) at every point on the graph.
Why?
Let's solve for height \( z \).
\[ \begin{align} z &= z_0 + s \mult (x - x_0) \end{align} \]
By evaluating our equation at \( x = x_0 \), we find the height.
\[ \begin{align} z &= z_0 + s \mult (x_0 - x_0) = z_0 + s \mult 0 = z_0 \end{align} \]
Now let's verify the slope by calculating the derivative.
\[ \begin{align} \overset{x}{\diff} z &= \overset{x}{\diff} \bigl(z_0 + s \mult (x - x_0)\bigr) = \overset{x}{\diff} \bigl(s \mult (x - x_0)\bigr) = s \mult \overset{x}{\diff} (x - x_0) = s \mult \overset{x}{\diff} x = s \end{align} \]
Sure enough, we've found the slope to be the constant \( s \).
Let's have a quick example of a linear function and its graph.
Example.
Consider the linear function
\[ \begin{align} z - 2 &= \frac{3}{2} \mult (x - 1). \end{align} \]
According to our linear form,
  • the graph has height \( z = 2 \) at \( x = 1 \), and
  • the graph has constant slope \( s = 3 / 2 \).
You should double check both of these claims! For the first, solve for the height \( z \) and then localize it at \( x = 1 \). For the second, calculate the derivative, \( \overset{x}{\diff} z \).

Slope as Rise Over Run

Because a line has a constant slope, it is easy to calculate the slope as
\[ \begin{align} \operatorname{\overset{\mathit{x}}{\slope}} z &= \frac{\change_{z}}{\change_{x}} \end{align} \]
where \( \change_{z} \) and \( \change_{x} \) are the change in \( z \) and the change in \( x \) for any two points on the line.
When we work with a curved graph, the slope changes from point to point. We should only expect this "rise over run" formula to be an approximation of the slope.
\[ \begin{align} \operatorname{\overset{\mathit{x}}{\slope}} z &\approx \frac{\change_{z}}{\change_{x}} \end{align} \]
Even though this formula is just an approximation, it is still useful! If we zoom in towards a point on a curved graph, the graph tends to look more like a straight line.
In fact, the more we zoom in on our graph, the more confidence we should have that the "rise over run" formula gives a value close to the actual slope.
It takes hard work to make this idea of zooming fully rigorous: you can study limits in Real Analysis if you are interested in seeing the details. But let's at least take a moment to think about what makes slope so difficult. As we zoom in towards a point, our concept of slope becomes dangerously close to containing a division by zero!
\[ \begin{align} \operatorname{\overset{\mathit{x}}{\slope}} z &\approx \frac{\change_{z}}{\change_{x}} \approx \frac{0}{0} \end{align} \]
We saw that defining the fraction \( 1 / 0 \) immediately leads to a contradiction. The fraction \( 0 / 0 \) has a different problem: it could arguably be defined to be any number! We won't ever officially define \( 0 / 0 \) but it lurks in the shadows whenever we use the derivative.