Writing Linear Equations
From Points, Slope & Context
Learn to build the equation \( y = mx + b \) from any starting information: two points, a slope and a point, or a real-world situation.
What Is a Linear Equation?
A linear equation describes a straight line on the coordinate plane. Every point \((x, y)\) on the line satisfies the equation. The most useful form is slope-intercept form:
Reading Slope and Intercept
Why This Matters
The Slope Formula
Given two points \( (x_1, y_1) \) and \( (x_2, y_2) \), the slope of the line through them is:
The Point-Slope Form
When you know the slope \( m \) and one point \( (x_1, y_1) \), use point-slope form to build the equation directly:
Two Forms, One Line
| Slope-Intercept | Point-Slope | |
|---|---|---|
| Equation | \( y = mx + b \) | \( y - y_1 = m(x - x_1) \) |
| Best when you know | slope & y-intercept | slope & any point |
| Shows directly | intercept \( b \) | a known point |
| Used for | graphing fast | building from data |
How to Write the Equation
Example 1: Slope and a Point
Write the equation of the line with slope \( m = 2 \) passing through \( (1, 4) \).
Example 2: From Two Points
Find the equation of the line through \( (2, 3) \) and \( (4, 11) \).
Example 3: From Context
A gym charges a $30 sign-up fee plus $15 per month. Write an equation for total cost \( y \) after \( x \) months.
Common Mistakes
Choosing Your Starting Point
| You are given | First step | Tool |
|---|---|---|
| Slope + y-intercept | Plug in directly | \( y = mx + b \) |
| Slope + a point | Use the point | \( y - y_1 = m(x - x_1) \) |
| Two points | Find slope first | slope formula, then point-slope |
| A word problem | Identify rate & start | rate = \( m \), start = \( b \) |
Quick Recap
In context, the constant fee or starting value is \( b \), and the per-unit rate of change is \( m \). Always finish by solving for \( y \) and checking a point.
Question 1 of 5
What is the slope of the line through \( (1, 2) \) and \( (3, 8) \)?
Question 2 of 5
Write the equation of the line with slope \( m = 5 \) and y-intercept \( -2 \).
Question 3 of 5
Find the equation of the line with slope \( m = 2 \) through the point \( (3, 1) \).
Question 4 of 5
Find the equation of the line through \( (0, 4) \) and \( (2, 10) \).
Question 5 of 5
A phone plan costs $40 to start plus $25 per month. Which equation gives total cost \( y \) after \( x \) months?
You Can Write Any Line
From two points, a slope and a point, or a real-world story, you now have a reliable path to \( y = mx + b \). Find the slope, use a point, solve for \( y \), and check.