Pre-Algebra • Functions

Graphing Linear Functions — I can graph a linear function and identify intercepts and rate of change.

Learn to draw straight-line graphs and discover the slope and intercepts hiding inside every linear equation.

Middle School Math emblem with sigma notation, geometric shapes, and a ruler.
Inside this lesson 10 sections 5 questions 8 figures

SECTION 1

Where Did Graphing Come From?

Have you ever used a map or a chart? People have been drawing pictures to show information for thousands of years. But the idea of using a coordinate plane (a grid with an x-axis and a y-axis) to plot equations is only about 400 years old. A French mathematician named René Descartes had the brilliant idea of connecting algebra and geometry on one grid.

~300 BCE • Euclid's Geometry

The Greek mathematician Euclid wrote rules about lines and shapes, but he had no way to connect them to equations.

~825 CE • Al-Khwarizmi & Algebra

A scholar in Baghdad named Al-Khwarizmi developed algebra. He solved equations with words and numbers, but still didn't graph them.

1637 • Descartes Invents the Coordinate Plane

René Descartes published a book that introduced the x-y grid. Now people could turn equations into pictures!

1800s • Graphs Enter Everyday Life

Scientists and economists began using line graphs to track data like temperature and prices over time.

Today, graphing is everywhere — from weather charts to video game design. The big question this lesson answers is: how do you take a linear equation and turn it into a straight line on a graph? Let's find out!

SECTION 2

Core Definitions You Need to Know

Before we start graphing, let's lock in four important vocabulary words. These are the building blocks for everything that follows.

1

Linear Function

A rule that pairs every x-value with exactly one y-value and makes a straight line when graphed. Example: y = 2x + 1.
2

Slope (Rate of Change)

Slope tells you how steep the line is. It measures how much y changes every time x increases by 1. We use the letter m for slope.
3

Y-Intercept

The point where the line crosses the y-axis. Its coordinates are always (0, b). We use the letter b for the y-intercept value.
4

X-Intercept

The point where the line crosses the x-axis. Its coordinates are always (something, 0). You find it by setting y equal to 0 and solving for x.
✦

KEY TAKEAWAY

Think of slope like a staircase. The rise is how many steps you go up or down, and the run is how many steps you go sideways. Slope = rise ÷ run. A steep staircase has a big slope; a gentle ramp has a small slope.

SECTION 3

See It on the Coordinate Plane

Let's look at the line y = 2x − 3 on a coordinate plane. This diagram shows the line, its y-intercept, its x-intercept, and a slope triangle that shows rise and run.

xy−4−3−2−11234−1−2−3−4123(0, −3) y-intercept(1.5, 0) x-interceptrise = 2run = 1Graph of y = 2x − 3
The pink dot marks the y-intercept at (0, −3). The gold dot marks the x-intercept at (1.5, 0). The green dashed triangle shows the slope: rise 2, run 1, so slope = 2.

Notice how the line slants upward from left to right. That tells you the slope is positive. If the line slanted downward, the slope would be negative. A flat, horizontal line has a slope of zero.

SECTION 4

The Math Behind the Line

Every linear function can be written in a special form called slope-intercept form. Once you can spot the slope and y-intercept in an equation, graphing becomes super easy.

SLOPE-INTERCEPT FORM

y=mx+by = mx + b

m = slope (rise ÷ run), b = y-intercept (where the line crosses the y-axis).

SLOPE FORMULA

m=(y2−y1)÷(x2−x1)m = (y₂ − y₁) ÷ (x₂ − x₁)

Pick any two points on the line, (x₁, y₁) and (x₂, y₂). Subtract the y-values (that's the rise) and subtract the x-values (that's the run).

FINDING THE X-INTERCEPT

Sety=0,thensolveforxSet y = 0, then solve for x

Example: if y = 2x − 3, set 0 = 2x − 3, so 2x = 3, and x = 1.5. The x-intercept is (1.5, 0).

💡

Quick Tip

In y = mx + b, the number in front of x is always the slope, and the number by itself is always the y-intercept. For example, in y = −4x + 7, the slope is −4 and the y-intercept is 7.

SECTION 5

Types of Slope — Positive, Negative, Zero, and Undefined

Not all lines look the same. The slope tells you the direction and steepness. Here are the four types of slope you will see.

Four Types of SlopePositive SlopeGoes up-right ↗m > 0Negative SlopeGoes down-right ↘m < 0Zero SlopeFlat, horizontal →m = 0Undefined SlopeStraight up, vertical ↑m = undefined
A positive slope rises to the right. A negative slope falls to the right. A zero slope is flat. An undefined slope is a vertical line (not a function).
Slope TypeDirectionExample Equation
Positive (m > 0)Line goes up from left to righty = 3x + 1
Negative (m < 0)Line goes down from left to righty = −2x + 5
Zero (m = 0)Line is perfectly horizontaly = 4
UndefinedLine is perfectly vertical (not a function)x = 2

Slope types and their directions

SECTION 6

Worked Example — Graphing y = −x + 4

Let's graph the equation y = −x + 4 step by step. We will find the slope, both intercepts, and draw the line.

Graph y = −x + 4

  1. 1

    Step 1 — Identify the Slope and Y-Intercept

    Compare y = −x + 4 to y = mx + b. The number in front of x is −1, so m = −1. The number by itself is 4, so b = 4.
    Slope = −1, y-intercept = (0, 4)
  2. 2

    Step 2 — Plot the Y-Intercept

    Start by putting a dot at the point (0, 4) on the y-axis. This is your first point.
    First point: (0, 4)
  3. 3

    Step 3 — Use the Slope to Find a Second Point

    A slope of −1 means rise = −1 and run = 1. From (0, 4), move right 1 and down 1. You land on (1, 3). Move again: right 1, down 1, and you reach (2, 2).
    Second point: (1, 3). Third point: (2, 2).
  4. 4

    Step 4 — Find the X-Intercept

    Set y = 0 and solve: 0 = −x + 4. Add x to both sides: x = 4. So the x-intercept is (4, 0).
    X-intercept = (4, 0)
  5. 5

    Step 5 — Draw the Line

    Connect your plotted points with a straight line and extend it in both directions with arrows. Label the intercepts.
    The line passes through (0, 4), (1, 3), (2, 2), and (4, 0), slanting downward.
ℹ

Check Your Work

Plug a point back into the equation. Does (2, 2) work? y = −(2) + 4 = 2. Yes! It checks out.

SECTION 7

Two Ways to Graph — Which Is Best?

There are two main strategies for graphing a linear equation. Each one has strengths and weaknesses depending on the situation.

FeatureSlope-Intercept MethodTable-of-Values Method
How it worksPlot b, then use m to find more pointsChoose several x-values, compute y for each, plot all points
SpeedFast — only 2 points neededSlower — need 3–5 points
AccuracyGood if slope is a simple fractionVery accurate with many points
Best forEquations already in y = mx + b formAny equation, including tricky ones
WeaknessHarder with fractional slopes like ²⁄₃Takes more time

Comparing graphing strategies

✦

KEY TAKEAWAY

Think of the slope-intercept method like following a recipe that starts with one ingredient (the y-intercept) and adds one direction (the slope). The table method is like tasting the dish at many points along the way — slower, but you can't go wrong.

SECTION 8

From Linear Functions to Bigger Ideas

Linear functions are the first type of function you study, but they are not the last! Here's a preview of how the ideas you learned today connect to future math topics.

What You Know NowWhat Comes Next
Slope (constant rate of change)In Algebra 1, you'll study systems of equations where two lines cross at one point.
y = mx + b (slope-intercept form)You'll learn other forms like standard form (Ax + By = C) and point-slope form.
Graphing straight linesYou'll graph curves like parabolas (y = x²) and exponentials (y = 2ˣ).
Finding interceptsIn advanced math, intercepts help you solve real-world problems like finding break-even points in business.

How today's lesson leads to future topics

The great news is that the skills you're building now — reading slope, plotting intercepts, and drawing lines — are the same skills you'll use in every math class from here on. Master them now, and future topics will feel a lot easier!

SECTION 9

Practice Problems

Question 1: CONCEPTUAL

In the equation y = 5x − 2, what is the slope and what is the y-intercept? Explain in your own words what each one tells you about the graph.
Show answer
The slope is 5 and the y-intercept is −2. The slope of 5 means that every time x increases by 1, y increases by 5 — so the line is steep and goes upward from left to right. The y-intercept of −2 means the line crosses the y-axis at the point (0, −2), which is 2 units below the origin. Together, these two values tell you exactly where the line starts on the y-axis and the direction and steepness of the line.

Question 2: BASIC CALCULATION

Find the x-intercept of the equation y = 3x − 9.
Show answer
To find the x-intercept, set y equal to 0 and solve for x. Substituting gives 0 = 3x − 9. Add 9 to both sides: 9 = 3x. Divide both sides by 3: x = 3. So the x-intercept is the point (3, 0). This means the line crosses the x-axis three units to the right of the origin.

Question 3: INTERMEDIATE

A line passes through the points (1, 2) and (4, 8). Find the slope of the line. Then use one of the points to write the equation in y = mx + b form.
Show answer
First, find the slope: m = (8 − 2) ÷ (4 − 1) = 6 ÷ 3 = 2. The slope is 2. Next, plug the slope and one point into y = mx + b. Using (1, 2): 2 = 2(1) + b, so 2 = 2 + b, which gives b = 0. The equation is y = 2x. You can check with the other point: y = 2(4) = 8. That matches (4, 8), so the equation is correct.

Question 4: APPLIED

A swimming pool is being filled with water. After 2 hours, there are 500 gallons. After 5 hours, there are 1,100 gallons. Write a linear equation for the amount of water (y) after x hours. How much water was in the pool at the start? When will the pool reach 2,000 gallons?
Show answer
The two data points are (2, 500) and (5, 1100). Slope = (1100 − 500) ÷ (5 − 2) = 600 ÷ 3 = 200 gallons per hour. Now find b using (2, 500): 500 = 200(2) + b, so 500 = 400 + b, and b = 100. The equation is y = 200x + 100. The y-intercept of 100 means there were 100 gallons in the pool at the start (when x = 0). To find when y = 2000: 2000 = 200x + 100, so 1900 = 200x, and x = 9.5. The pool will reach 2,000 gallons after 9.5 hours.

Question 5: CRITICAL THINKING

Line A has the equation y = 3x + 1. Line B passes through (0, 7) and (2, 1). Without graphing, will these two lines ever cross? If so, find the crossing point. Explain your reasoning.
Show answer
First, find the equation of Line B. Its slope is (1 − 7) ÷ (2 − 0) = −6 ÷ 2 = −3. Since it passes through (0, 7), b = 7, so Line B is y = −3x + 7. Because Line A has slope 3 and Line B has slope −3, the slopes are different, which means the lines are not parallel and must cross exactly once. Set the two equations equal: 3x + 1 = −3x + 7. Add 3x to both sides: 6x + 1 = 7. Subtract 1: 6x = 6, so x = 1. Plug x = 1 into Line A: y = 3(1) + 1 = 4. The lines cross at the point (1, 4).

SUMMARY

Putting It All Together

Summary

A linear function creates a straight line on the coordinate plane. Every linear equation can be written in slope-intercept form y = mx + b, where m is the slope (rate of change — how steep the line is) and b is the y-intercept (where the line crosses the y-axis). The x-intercept is found by setting y = 0 and solving.

To graph a line, start at the y-intercept, then use the slope (rise over run) to find a second point. Connect the points with a straight line. A positive slope goes up to the right, a negative slope goes down to the right, and a zero slope is a flat horizontal line. These skills are the foundation for all the algebra and graphing you will do in high school and beyond!

Varsity Tutors • Pre-Algebra • Graphing Linear Functions