Linear Equations Practice — Slope, Intercept & Graphing

Master the equation of a line, its forms, and the algebra that connects them — with worked examples.

A linear equation describes a straight line. That straight line might predict your savings over time, the cost of a phone plan based on minutes used, or the temperature change in a chemistry experiment. Linear equations are the workhorses of algebra because they show up in almost every real-world model. This guide walks you through what a linear equation is, the three main forms it can take, how to solve one, and the common patterns that trip students up.

What Is a Linear Equation?

A linear equation is one in which the variable (usually x) appears only to the first power — never squared, cubed, or under a square root. When you graph a linear equation, the result is always a straight line. The simplest examples are x + 3 = 7 or 2y − 4 = 10. The more interesting examples have two variables: y = 2x + 5, which describes every point (x, y) on a particular line in the coordinate plane.

y = mx + b
The slope-intercept form — the most useful way to write a line.

In y = mx + b:

  • m is the slope — how steep the line is and which way it tilts
  • b is the y-intercept — where the line crosses the vertical y-axis
  • For any input x, this formula gives you the y-value on the line

The Big Idea

Slope is rise over run — how much y changes for every 1 unit that x changes. A slope of 2 means the line goes up 2 for every 1 to the right. A slope of −3 means it goes down 3 for every 1 to the right.

The Three Forms of a Linear Equation

The same line can be written in three different forms, each useful for a different task:

FormLooks LikeWhen to Use
Slope-Intercepty = mx + bGraphing quickly when you know slope and y-intercept
Point-Slopey − y₁ = m(x − x₁)Writing the equation when you know one point and the slope
StandardAx + By = CWorking with x- and y-intercepts; cleaner for systems of equations

Calculating Slope from Two Points

If you know any two points on a line, you can find the slope using the slope formula. Let the points be (x₁, y₁) and (x₂, y₂):

m = (y₂ − y₁) / (x₂ − x₁)
Rise over run — change in y divided by change in x.

📝 Worked Example — Slope Between Two Points

Find the slope between (1, 4) and (5, 16).
Step 1: Apply the formula.
m = (16 − 4) / (5 − 1) = 12 / 4 = 3
Step 2: The slope is 3 — the line rises 3 units for every 1 unit it moves right.
m = 3

Writing the Equation of a Line

Once you have a slope and a point (or the y-intercept), you can write the equation of the line in any form. The slope-intercept form is usually fastest.

📝 Worked Example — From Slope & Point to Equation

A line has slope 2 and passes through (3, 7). Write its equation.
Step 1: Start with y = mx + b. Plug in m = 2.
y = 2x + b
Step 2: Substitute the known point (3, 7) to find b.
7 = 2(3) + b → 7 = 6 + b → b = 1
Step 3: Write the final equation.
y = 2x + 1

Solving Linear Equations

To solve a one-variable linear equation, isolate the variable using inverse operations. The strategy is the same as the one taught in our algebra guide: undo any addition or subtraction first, then undo any multiplication or division.

📝 Worked Example — Solving 4x + 9 = 25

Step 1: Subtract 9 from both sides.
4x = 16
Step 2: Divide both sides by 4.
x = 4
Step 3: Check: 4(4) + 9 = 16 + 9 = 25. ✓
x = 4

Special Cases — Vertical and Horizontal Lines

Not every line fits neatly into y = mx + b. Two special cases need their own rules.

  • A horizontal line has slope 0. Its equation is simply y = c for some constant c. Example: y = 5 is the horizontal line that passes through (0, 5), (3, 5), (−7, 5), and so on.
  • A vertical line has an undefined slope (the denominator in the slope formula becomes 0). Its equation is x = c. Example: x = 4 is the vertical line through (4, 0), (4, −2), (4, 10), etc.

Common Mistakes Students Make

❌ Mistake 1 — Confusing slope direction

A positive slope tilts up to the right. A negative slope tilts down to the right. Many students reverse these. Picture a hill going up as you walk right — that is positive slope.

❌ Mistake 2 — Switching points in the slope formula

The formula is (y₂ − y₁) ÷ (x₂ − x₁). Whatever you label as "point 2" in the numerator must also be "point 2" in the denominator. Mixing them up flips the sign of your slope.

❌ Mistake 3 — Forgetting that vertical lines have no slope

Slope is undefined for vertical lines because division by zero is undefined. Be careful when a problem asks for the slope of x = 5 — the answer is "undefined," not 0.

❌ Mistake 4 — Reading the y-intercept incorrectly

The y-intercept is the y-value when x = 0, not the y-coordinate of any random point on the line. In y = 3x + 7, the y-intercept is 7, not 3.

Real-World Applications

Linear equations describe nearly any situation where one quantity changes at a constant rate. A few quick examples:

  • Phone plan: Cost = $0.10 × minutes + $25 (monthly base fee). Slope is $0.10/minute, y-intercept is $25.
  • Savings: Balance = $200 + $50 × (weeks saved). Each week adds $50 — a linear pattern.
  • Temperature conversion: F = (9/5)C + 32 — the relationship between Celsius and Fahrenheit is linear.
  • Distance and speed: If you drive at a constant 60 mph, distance = 60 × time. Slope is the speed.

💡 Study Tip — Always Sketch the Line

Even when a problem only asks for the equation, drawing a quick sketch of the line catches errors. If your equation says the slope is positive but your sketch shows the line falling, something is wrong. Two minutes of sketching saves twenty minutes of debugging.

Frequently Asked Questions

What is the difference between a linear equation and a linear function?

They are mostly the same thing, written differently. A linear equation like y = 2x + 5 becomes a linear function when written f(x) = 2x + 5. The function notation emphasizes that for every x you put in, the formula gives back exactly one y. Linear functions are linear equations, just dressed up for function notation.

Can a linear equation have more than two variables?

Yes — an equation like 3x + 2y − z = 12 is linear in three variables (x, y, z). Each variable appears only to the first power. These describe flat surfaces in 3D space (called planes) instead of lines. The same algebraic techniques work.

How do parallel and perpendicular lines relate to slope?

Parallel lines have the same slope. y = 2x + 1 and y = 2x − 7 are parallel — both rise 2 for every 1 right. Perpendicular lines have slopes that are negative reciprocals: if one is 3, the other is −1/3. Their slopes multiply to −1.

What does it mean if my slope is a fraction?

It just means the line is less steep than slope 1 (or has a more precise rise/run). A slope of 1/2 means the line rises 1 for every 2 to the right. A slope of 3/4 means it rises 3 for every 4 to the right. Fractional slopes are perfectly normal and very common.

How is this related to systems of equations?

A system of equations is just two or more linear equations considered together. The solution is the point where the lines cross — the (x, y) values that satisfy both equations at once. Mastering single linear equations is essential before tackling systems.

What grade level is this content?

Single-variable linear equations begin in 6th or 7th grade. Lines, slopes, and y-intercepts come in 8th grade pre-algebra. Algebra 1 (typically 8th or 9th grade) covers everything on this page in depth. Algebra 2 revisits linear equations to set up matrices and systems.

Ready to practice linear equations?

Practice Linear Equations Now
Ask AI