Linear Functions and Slope

Understand what makes a line straight and how steep it is

You already understand slope. You may not realize it yet, but you do. Every time you have walked up a steep hill and thought “this is exhausting,” or coasted down a gentle slope on a bike thinking “this is nice,” you were experiencing slope. When you compare phone plans and notice one charges more per gigabyte than another, you are comparing slopes. Slope is simply a way to measure steepness - how quickly something goes up or down as you move forward. That is all it is. The math just gives us a precise way to describe what your legs and wallet already know.

Core Concepts

What Makes a Function Linear?

A linear function is a function whose graph is a straight line. But what makes a line straight? The answer is beautifully simple: a line is straight because it changes at a constant rate.

Think about walking up a staircase where each step is exactly 8 inches tall and 10 inches deep. Every single step is the same. You go up by the same amount for every step forward. That consistency - that constant rate of change - is what makes something linear.

Compare that to a curved ramp that starts out gentle and gets steeper as you go. The rate of change is different at different points. That is not linear.

A linear function has the form $f(x) = mx + b$, where $m$ and $b$ are constants. The key insight is that no matter which two points you pick on the line, the rate of change between them is always the same. Always. That constant rate of change has a name: slope.

Slope: The Rate of Change

Slope measures how steep a line is. More precisely, it tells you how much the output (y-value) changes for every one unit increase in the input (x-value).

If a line has a slope of 3, that means:

  • For every 1 unit you move to the right, the line goes up 3 units.
  • If you move 2 units right, the line goes up 6 units.
  • If you move 5 units right, the line goes up 15 units.

The relationship is always proportional because the rate of change is constant.

Here is another way to think about it: slope is the answer to the question “How much does y change when x increases by 1?”

Rise Over Run

The most intuitive way to understand slope is through the phrase rise over run.

  • Rise is the vertical change (how much you go up or down)
  • Run is the horizontal change (how much you go left or right)

$$\text{Slope} = \frac{\text{rise}}{\text{run}}$$

Imagine you are hiking a trail. If you walk 100 feet horizontally (the run) and climb 40 feet in elevation (the rise), the slope of that section is $\frac{40}{100} = 0.4$ or 40%.

Road signs that say “6% grade” are telling you the slope: for every 100 feet you travel horizontally, you gain 6 feet of elevation.

The Slope Formula

When you have two specific points on a line, you can calculate the slope using the slope formula:

$$m = \frac{y_2 - y_1}{x_2 - x_1}$$

The letter $m$ is traditionally used to represent slope. The subscripts 1 and 2 just indicate “first point” and “second point” - you pick any two points on the line.

Here is what each part means:

  • $y_2 - y_1$ is the rise (how much y changed)
  • $x_2 - x_1$ is the run (how much x changed)

It does not matter which point you call “point 1” and which you call “point 2,” as long as you are consistent. If you put the y-coordinates in a certain order on top, put the x-coordinates in that same order on the bottom.

Types of Slope

Lines can tilt in different ways, and the slope tells you exactly how:

Positive slope - The line goes upward as you move from left to right. Think of climbing a hill. The larger the positive number, the steeper the climb. Examples: $m = 2$, $m = \frac{1}{2}$, $m = 0.75$

Negative slope - The line goes downward as you move from left to right. Think of going downhill. The more negative the number, the steeper the descent. Examples: $m = -3$, $m = -\frac{1}{4}$, $m = -1.5$

Zero slope - The line is perfectly horizontal. There is no rise at all; the line stays flat. A horizontal line has the equation $y = c$ for some constant $c$. Example: $m = 0$

Undefined slope - The line is perfectly vertical. This is a special case because you would be dividing by zero (the run is zero). Vertical lines have the equation $x = c$ for some constant $c$. We say the slope is “undefined” rather than giving it a number.

A helpful way to remember: imagine pouring water on each type of line. On a positive slope, water flows down to the left. On a negative slope, water flows down to the right. On a zero slope, water sits still. On an undefined slope (vertical), water would cascade straight down like a waterfall.

Finding Slope from a Graph

When you have a graph of a line, you can find the slope by:

  1. Pick any two clear points where the line crosses grid intersections (this makes coordinates easy to read)
  2. Count the rise: how many units up or down from the first point to the second?
  3. Count the run: how many units left or right from the first point to the second?
  4. Divide rise by run

Remember: going up is positive rise, going down is negative rise. Going right is positive run, going left is negative run.

Finding Slope from an Equation

If a linear equation is in slope-intercept form $y = mx + b$, the slope is simply the coefficient of $x$. That is the $m$ right in front of the $x$.

For example:

  • $y = 3x + 7$ has slope $m = 3$
  • $y = -2x + 5$ has slope $m = -2$
  • $y = \frac{1}{4}x - 3$ has slope $m = \frac{1}{4}$

If the equation is in a different form, like standard form $Ax + By = C$, you have two options:

  1. Solve for $y$ to convert it to slope-intercept form
  2. Use the shortcut: slope $= -\frac{A}{B}$

We will use option 1 in the examples below because understanding the process helps build intuition.

Interpreting Slope in Context

In real-world problems, slope has meaning. It represents a rate of change - how fast one quantity changes relative to another.

  • If a car travels at 60 miles per hour, the slope of its distance-time graph is 60. The units are miles per hour.
  • If a phone plan charges $0.05 per text message, the slope of the cost-vs-texts graph is 0.05. The units are dollars per text.
  • If a population decreases by 200 people per year, the slope is $-200$. The negative indicates decrease.

When interpreting slope in context, always think about:

  1. What are the units? (rise units per run units)
  2. Is it increasing (positive) or decreasing (negative)?
  3. What does the number actually mean in the real situation?

Notation and Terminology

Term Meaning Example
Linear function Function with constant rate of change $f(x) = 3x + 2$
Slope Steepness of a line $m = 2$ means “up 2, right 1”
Rate of change How fast output changes per unit input $5 per hour
Rise Vertical change Going from $y = 2$ to $y = 7$ is a rise of 5
Run Horizontal change Going from $x = 1$ to $x = 4$ is a run of 3
$\frac{\text{rise}}{\text{run}}$ Another way to express slope Rise of 6, run of 2 gives slope $\frac{6}{2} = 3$
$m$ The variable traditionally used for slope In $y = mx + b$, $m$ is the slope
Positive slope Line goes up from left to right $m = 4$
Negative slope Line goes down from left to right $m = -3$
Zero slope Horizontal line $m = 0$
Undefined slope Vertical line Division by zero

Examples

Example 1: Finding Slope from Two Points

Find the slope of the line passing through $(1, 2)$ and $(3, 8)$.

Solution:

We use the slope formula $m = \frac{y_2 - y_1}{x_2 - x_1}$.

Let $(x_1, y_1) = (1, 2)$ and $(x_2, y_2) = (3, 8)$.

Step 1: Find the rise (change in y): $$y_2 - y_1 = 8 - 2 = 6$$

Step 2: Find the run (change in x): $$x_2 - x_1 = 3 - 1 = 2$$

Step 3: Calculate slope: $$m = \frac{6}{2} = 3$$

The slope is 3.

What this means: For every 1 unit you move to the right along this line, you go up 3 units. The line is relatively steep and tilts upward.

Example 2: Identifying Slope Type from a Graph

Look at a line that passes through $(-2, 4)$ and $(3, 4)$. Is the slope positive, negative, zero, or undefined?

Solution:

Notice that both points have the same y-coordinate: 4.

This means the line is perfectly horizontal - it does not go up or down at all as you move from left to right.

Let us verify with the formula: $$m = \frac{4 - 4}{3 - (-2)} = \frac{0}{5} = 0$$

The slope is zero.

Visual check: When a line is horizontal (flat), the slope is always zero. When a line is vertical (straight up and down), the slope is undefined.

Example 3: Slope with Negative Coordinates

Find the slope of the line passing through $(-2, 5)$ and $(4, -1)$.

Solution:

Let $(x_1, y_1) = (-2, 5)$ and $(x_2, y_2) = (4, -1)$.

Step 1: Find the rise: $$y_2 - y_1 = -1 - 5 = -6$$

Step 2: Find the run: $$x_2 - x_1 = 4 - (-2) = 4 + 2 = 6$$

Step 3: Calculate slope: $$m = \frac{-6}{6} = -1$$

The slope is $-1$.

What this means: For every 1 unit you move to the right, the line goes down 1 unit. The negative slope tells us the line falls as we move from left to right.

Note: Be careful with negative signs! When subtracting a negative number, you add. This is a common place for errors.

Example 4: Finding Slope from an Equation

Find the slope of the line $3x + 2y = 12$.

Solution:

This equation is in standard form. We need to solve for $y$ to get it into slope-intercept form ($y = mx + b$).

Step 1: Subtract $3x$ from both sides: $$2y = -3x + 12$$

Step 2: Divide everything by 2: $$y = \frac{-3x + 12}{2} = -\frac{3}{2}x + 6$$

Now the equation is in slope-intercept form: $y = -\frac{3}{2}x + 6$

The coefficient of $x$ is the slope.

The slope is $-\frac{3}{2}$ (or equivalently, $-1.5$).

What this means: For every 2 units you move to the right, the line goes down 3 units. Or equivalently, for every 1 unit right, it goes down 1.5 units.

Example 5: Interpreting Slope in a Real-World Context

A swimming pool contains 10,000 gallons of water. Water drains from the pool at a constant rate of 50 gallons per minute.

a) If we graph the amount of water (y) versus time in minutes (x), what is the slope? b) What does this slope represent in context? c) What would the equation of this line be?

Solution:

Part a) The pool loses 50 gallons every minute. This means:

  • For every 1 minute that passes (run of 1), the water level decreases by 50 gallons (rise of $-50$).

The slope is $\frac{-50}{1} = $ $-50$.

Part b) The slope represents the rate at which water drains from the pool: 50 gallons per minute.

The negative sign indicates that the amount of water is decreasing over time, not increasing. If someone asks “what does the slope mean here?”, you would say: “The pool is losing water at a rate of 50 gallons per minute.”

Part c) We can write this as a linear function:

  • The slope $m = -50$
  • The starting amount (y-intercept) is 10,000 gallons (when $x = 0$, meaning at time zero)

$$y = -50x + 10000$$

Or in function notation: $f(x) = -50x + 10000$ where $x$ is time in minutes and $f(x)$ is gallons of water remaining.

Further insight: Using this equation, we could figure out when the pool will be empty by setting $y = 0$: $$0 = -50x + 10000$$ $$50x = 10000$$ $$x = 200$$

The pool would be empty after 200 minutes (3 hours and 20 minutes).

Key Properties and Rules

The Slope Formula

$$m = \frac{y_2 - y_1}{x_2 - x_1} = \frac{\text{rise}}{\text{run}}$$

Slope Types Summary

If the slope is… The line… Looks like…
Positive ($m > 0$) Goes up from left to right /
Negative ($m < 0$) Goes down from left to right \
Zero ($m = 0$) Is horizontal
Undefined Is vertical |

Finding Slope From Different Sources

From two points $(x_1, y_1)$ and $(x_2, y_2)$: $$m = \frac{y_2 - y_1}{x_2 - x_1}$$

From a graph: Pick two points on the line, then use $m = \frac{\text{rise}}{\text{run}}$

From slope-intercept form $y = mx + b$: The slope is $m$ (the coefficient of $x$)

From standard form $Ax + By = C$: Solve for $y$, or use $m = -\frac{A}{B}$

Parallel and Perpendicular Lines (Preview)

  • Parallel lines have the same slope (they never meet because they tilt the same way)
  • Perpendicular lines have slopes that are negative reciprocals (their slopes multiply to $-1$)

These ideas will be explored more in later lessons.

Real-World Applications

Speed and Distance

When you drive at a constant speed, your distance-versus-time graph is a straight line. The slope of that line is your speed. If you drive at 65 mph, the slope of your distance-time graph is 65 miles per hour. A steeper line means faster travel.

Pricing and Cost

Many pricing structures are linear. If a gym charges $30 per month plus a $50 signup fee, the cost function is $C(m) = 30m + 50$, where $m$ is the number of months. The slope is 30, representing the monthly rate of $30 per month. When comparing gym memberships, comparing slopes tells you which one charges more per month.

Population Growth and Decline

If a town’s population increases by 500 people per year, and we graph population over time, the slope is 500 people per year. If the population is declining, the slope would be negative. City planners use these rates to make decisions about infrastructure, schools, and services.

Depreciation

A new car worth $25,000 that loses $3,000 in value each year has a value function with slope $-3000$. The negative slope reflects the decreasing value. After 5 years: $V(5) = -3000(5) + 25000 = 10000$. The car would be worth $10,000. Understanding depreciation helps people make smarter decisions about buying and selling vehicles.

Temperature Conversion

The formula to convert Celsius to Fahrenheit is $F = \frac{9}{5}C + 32$. The slope is $\frac{9}{5} = 1.8$. This means that for every 1 degree increase in Celsius, the Fahrenheit temperature increases by 1.8 degrees.

Self-Test Problems

Problem 1: Find the slope of the line passing through $(2, 5)$ and $(6, 13)$.

Show Answer

Using the slope formula: $$m = \frac{13 - 5}{6 - 2} = \frac{8}{4} = 2$$

The slope is 2.

This means the line rises 2 units for every 1 unit it moves to the right.

Problem 2: A line passes through $(5, 3)$ and $(5, -4)$. What is the slope?

Show Answer

Using the slope formula: $$m = \frac{-4 - 3}{5 - 5} = \frac{-7}{0}$$

Division by zero is undefined, so the slope is undefined.

This makes sense because both points have the same x-coordinate, meaning the line is vertical. Vertical lines have no defined slope.

Problem 3: What is the slope of the line $5x - 2y = 10$?

Show Answer

Solve for $y$: $$-2y = -5x + 10$$ $$y = \frac{5}{2}x - 5$$

The slope is $\frac{5}{2}$ (or 2.5).

Problem 4: A taxi charges $3.50 plus $2.25 per mile. Write the cost as a function of miles traveled. What is the slope and what does it represent?

Show Answer

The cost function is: $C(m) = 2.25m + 3.50$ where $m$ is miles traveled.

The slope is 2.25.

It represents the cost per mile - for each additional mile you travel, the fare increases by $2.25.

Problem 5: Find the slope of a line that passes through $(-3, 7)$ and $(4, -7)$.

Show Answer

$$m = \frac{-7 - 7}{4 - (-3)} = \frac{-14}{4 + 3} = \frac{-14}{7} = -2$$

The slope is $-2$.

The negative slope indicates the line goes downward from left to right.

Problem 6: Two lines have slopes of $m_1 = 3$ and $m_2 = -\frac{1}{3}$. What can you conclude about these lines?

Show Answer

Check if they are perpendicular by multiplying the slopes: $$m_1 \times m_2 = 3 \times \left(-\frac{1}{3}\right) = -1$$

Since the product is $-1$, these lines are perpendicular (they intersect at a 90-degree angle).

Summary

  • A linear function is one whose graph is a straight line, characterized by a constant rate of change.
  • Slope measures the steepness of a line and is denoted by $m$.
  • Slope can be calculated using the formula $m = \frac{y_2 - y_1}{x_2 - x_1}$, which is the same as $\frac{\text{rise}}{\text{run}}$.
  • A positive slope means the line goes up from left to right; a negative slope means it goes down.
  • A zero slope indicates a horizontal line; an undefined slope indicates a vertical line.
  • To find slope from a graph, pick two points and calculate rise over run.
  • To find slope from an equation, put it in the form $y = mx + b$ and identify the coefficient of $x$.
  • In real-world contexts, slope represents a rate of change - how quickly one quantity changes relative to another.
  • Understanding slope helps you analyze everything from driving speed to phone plans to population trends.