Graphing Linear Equations
Learn to graph lines on the coordinate plane using tables and slope-intercept form.
For Elementary Students
What Is a Linear Equation?
A linear equation is a special kind of math equation that makes a straight line when you graph it!
Think about it like this: Imagine you're connecting dots, and they all line up in a perfectly straight line—that's a linear equation!
●
/
●
/
●
The Special Form: y = mx + b
Linear equations usually look like this:
y = mx + b
Don't worry! Let's break it down:
- y = the up-and-down number (how high or low)
- m
=the slope (how tilty the line is) - x = the left-and-right number
- b = where the line crosses the y-axis (the vertical line)
What Is Slope (m)?
Slope tells you how steep or flat your line is!
Think of slope like climbing a hill:
- Big slope = steep hill (hard to climb!)
- Small slope = gentle hill (easy!)
- Zero slope = flat ground (no hill at all!)
Examples:
m = 2 → Line goes up 2 for every 1 right (steep!)
m = 1 → Line goes up 1 for every 1 right (diagonal)
m = 1/2 → Line goes up 1 for every 2 right (gentle)
m = 0 → Flat horizontal line
Negative slopes go DOWN:
m = -1 → Line goes down 1 for every 1 right
m = -2 → Line goes down 2 for every 1 right
What Is Y-Intercept (b)?
The y-intercept is where your line crosses the y-axis (the vertical number line)!
Example: In y = 2x + 3
- The y-intercept is 3
- The line crosses at the point
(0, 3)
y
│
3 ●─── Line crosses here!
│ /
│ /
│ /
└──────── x
Method 1: Using a Table of Values
The easiest way to graph: pick some x-values, find the y-values, then connect the dots!
Example: Graph y = 2x + 1
Step 1: Make a table
| x | Calculate y | y | Point |
|---|---|---|---|
| 0 | 2(0) + 1 = 1 | 1 | (0, 1) |
| 1 | 2(1) + 1 = 3 | 3 | (1, 3) |
| 2 | 2(2) + 1 = 5 | 5 | (2, 5) |
| -1 | 2(-1) + 1 = -1 | -1 | (-1, -1) |
Step 2: Plot the points on graph paper
Step 3: Draw a straight line through all the points!
y
│
5 ● `(2,5)`
│ /
3 ● `(1,3)`
│ /
1● `(0,1)`
│/
─1●─────── x
(-1,-1)
Tip: Always use at least 3 points to make sure your line is straight!
Method 2: Using Slope and Y-Intercept
This is a shortcut way that's super fast!
Example: Graph y = 3x + 2
Step 1: Find the y-intercept (b = 2)
- Plot the point
(0, 2)on the y-axis
Step 2: Use the slope (m = 3)
- Slope 3 means "up 3, right 1"
- From
(0, 2), go up 3 and right 1 → point(1, 5)
Step 3: Draw the line through both points!
y
│
5 ● `(1,5)`
│/
2● `(0,2)` ← y-intercept
│
└──────── x
Understanding "Rise Over Run"
Slope is rise over run (how much up ÷ how much right)
slope = rise / run
= up (or down) / right
Example: Slope = 2/1 = 2
- Rise: up 2
- Run: right 1
Example: Slope = 3/4
- Rise: up 3
- Run: right 4
Negative Slopes
When the slope is negative, the line goes downhill (from left to right)!
Example: y = -x + 4
- Slope: -1 (which means down 1, right 1)
- Y-intercept: 4
Graph it:
- Plot
(0, 4) - From
(0, 4), go down 1 and right 1 → point(1, 3) - Draw the line!
y
│
4●\ `(0,4)`
│ \
3 ●\ `(1,3)`
│ \
└──────── x
Horizontal Lines (Flat!)
When slope = 0, you get a horizontal line (perfectly flat)!
Example: y = 3
This means y is ALWAYS 3, no matter what x is!
y
│
3 ●───●───● All points have y = 3
│
└──────── x
Points: (0, 3), (1, 3), (2, 3), (-1, 3)...
Vertical Lines (Straight Up and Down!)
Special case: Equations like x = 2
This means x is ALWAYS 2, no matter what y is!
y
│
│ ●
│ │
│ ● x = 2 line
│ │
│ ●
└──────── x
2
Note: Vertical lines don't have a slope formula!
Tips for Graphing Success
Tip 1: Always label your axes (x and y)!
Tip 2: Plot at least 3 points to check your line is straight
Tip 3: Use graph paper or a ruler for neat lines
Tip 4: Check your work by picking a point on your line and plugging it into the equation!
For Junior High Students
Understanding Linear Equations
A linear equation in two variables produces a straight line when graphed on the coordinate plane.
Standard forms:
- Slope-intercept form:
y = mx + b - Point-slope form:
y − y₁ = m(x − x₁) - Standard form:
Ax + By = C
Most common for graphing: slope-intercept form y = mx + b
Components of y = mx + b
Slope (m):
- Rate of change of y with respect to x
- Steepness and direction of the line
- Formula:
m = (y₂ − y₁)/(x₂ − x₁)(rise over run)
Y-intercept (b):
- The y-coordinate where the line crosses the y-axis
- Point:
(0, b) - Value of y when x = 0
Example: y = 3x − 4
- Slope: m = 3
- Y-intercept: b = −4
- The line passes through (0, −4)
Interpreting Slope
Positive slope: Line rises from left to right
m > 0: Line ascends
Negative slope: Line falls from left to right
m < 0: Line descends
Zero slope: Horizontal line
m = 0: y = b (constant function)
Undefined slope: Vertical line
x = a (not a function of y)
Slope as rate of change:
- m = 2: for every 1 unit increase in x, y increases by 2
- m = −3: for every 1 unit increase in x, y decreases by 3
- m = 1/2: for every 2 units increase in x, y increases by 1
Graphing Method 1: Table of Values
Procedure:
- Select several x-values (including positive, negative, and zero)
- Substitute each x-value into the equation to find corresponding y-values
- Plot the ordered pairs
(x, y) - Draw a straight line through the points
Example: Graph y = 2x + 1
Create table:
| x | Calculation | y | Point |
|---|---|---|---|
| −2 | 2(−2) + 1 = −3 | −3 | (−2, −3) |
| −1 | 2(−1) + 1 = −1 | −1 | (−1, −1) |
| 0 | 2(0) + 1 = 1 | 1 | (0, 1) |
| 1 | 2(1) + 1 = 3 | 3 | (1, 3) |
| 2 | 2(2) + 1 = 5 | 5 | (2, 5) |
Plot points and draw line through them.
Verification: All points should be collinear (lie on same straight line).
Graphing Method 2: Slope-Intercept Method
More efficient when equation is in y = mx + b form.
Procedure:
- Identify and plot the y-intercept
(0, b) - From the y-intercept, use the slope to find a second point
- Draw the line through both points
Example: Graph y = −2x + 3
Step 1: Plot y-intercept
- b = 3, so plot
(0, 3)
Step 2: Apply slope
- m = −2 = −2/1 (down 2, right 1)
- From
(0, 3): move right 1, down 2 →(1, 1)
Step 3: Draw line through (0, 3) and (1, 1)
Alternative slope interpretation: m = −2 = 2/(−1) (up 2, left 1)
Calculating Slope from Two Points
Given two points (x₁, y₁) and (x₂, y₂):
Slope formula:
m = (y₂ − y₁) / (x₂ − x₁)
Interpretation: rise (vertical change) over run (horizontal change)
Example: Find slope through (1, 3) and (4, 9)
m = (9 − 3) / (4 − 1)
= 6 / 3
= 2
Note: Order doesn't matter as long as you're consistent:
m = (y₁ − y₂) / (x₁ − x₂) gives the same result
Writing Equations from Graphs
Given: A graph of a line
Find: The equation in slope-intercept form
Procedure:
- Identify y-intercept (b) where line crosses y-axis
- Calculate slope (m) using two clear points on the line
- Write equation: y = mx + b
Example: Line passes through (0, −2) and (3, 4)
Step 1: Y-intercept: b = −2
Step 2: Calculate slope:
m = (4 − (−2)) / (3 − 0)
= 6 / 3
= 2
Step 3: Equation: y = 2x − 2
Special Lines
Horizontal lines:
- Form:
y = k(where k is a constant) - Slope: m = 0
- Every point has the same y-coordinate
- Example:
y = 5passes through (0, 5), (1, 5), (−3, 5)...
Vertical lines:
- Form:
x = h(where h is a constant) - Slope: undefined (division by zero)
- Every point has the same x-coordinate
- Example:
x = −2passes through (−2, 0), (−2, 5), (−2, −3)... - Not a function (fails vertical line test)
Parallel and Perpendicular Lines
Parallel lines:
- Have the same slope:
m₁ = m₂ - Never intersect
- Example:
y = 2x + 1andy = 2x − 3are parallel
Perpendicular lines:
- Slopes are negative reciprocals:
m₁ · m₂ = −1 - Intersect at right angles (90°)
- Example:
y = 2x + 1andy = −(1/2)x + 3are perpendicular- m₁ = 2, m₂ = −1/2
- 2 · (−1/2) = −1 ✓
Real-Life Applications
Economics: Cost functions (cost = fixed + variable × quantity)
y = 50 + 5x (base fee $50, $5 per item)
Physics: Motion with constant velocity
d = 60t (distance = 60 mph × time)
Temperature conversion: Celsius to Fahrenheit
F = (9/5)C + 32
Business: Revenue models
R = 20x (revenue = $20 per unit sold)
Common Mistakes
Mistake 1: Confusing slope and y-intercept
❌ In y = 5x + 3, thinking slope is 3
✓ Slope is 5, y-intercept is 3
Mistake 2: Incorrect slope calculation
❌ m = (x₂ − x₁) / (y₂ − y₁)
✓ m = (y₂ − y₁) / (x₂ − x₁) (rise over run, not run over rise)
Mistake 3: Plotting points incorrectly
❌ Plotting (3, 2) at x = 2, y = 3
✓ (3, 2) means x = 3, y = 2 (x comes first)
Mistake 4: Not using a ruler
Freehand lines rarely appear perfectly straight
Mistake 5: Forgetting negative slopes go downward
m = −2 means down, not up
Tips for Success
Tip 1: Always start by identifying slope and y-intercept
Tip 2: Plot y-intercept first when using slope-intercept method
Tip 3: Check your graph by substituting a point back into the equation
Tip 4: Use at least three points when creating a table to verify linearity
Tip 5: Remember rise over run: vertical change over horizontal change
Tip 6: For fractional slopes, interpret carefully (e.g., 2/3 means up 2, right 3)
Tip 7: Use graph paper and a ruler for accuracy
Verification
After graphing, verify your work:
- Check that all plotted points satisfy the equation
- Confirm the line passes through the y-intercept
- Verify slope by choosing two points and calculating rise/run
- Test an additional point not used in construction
Example: For y = 3x − 1, verify point (2, 5) is on the line:
y = 3(2) − 1 = 6 − 1 = 5 ✓
Point `(2, 5)` satisfies the equation
Summary of Graphing Methods
| Method | Best Used When | Steps |
|---|---|---|
| Table of Values | Any linear equation | Pick x-values, calculate y-values, plot, connect |
| Slope-Intercept | y = mx + b form | Plot (0, b), use slope for second point, draw line |
| Two Points | Two points known | Plot both points, draw line, calculate slope to find equation |
Practice
In y = 5x − 3, what is the slope?
What is the y-intercept of y = -x + 7?
Find the slope of the line passing through `(2, 1)` and `(5, 10)`.
What type of line is y = −4?