Where Did Straight-Line Equations Come From?
People have been drawing straight lines for thousands of years — think of a ruler on a piece of papyrus. But writing an equation that describes a line? That took some brilliant thinking over many centuries. Let's look at how this idea developed.
So here's the big question this lesson answers: How can one short equation — y = mx + b — perfectly describe every straight line on a graph? And what makes this equation a function?
Core Ideas You Need to Know
Before we dive into graphing, let's lock down four key ideas. Each one is a building block for understanding y = mx + b.
What Is a Function?
What Makes It "Linear"?
Slope (m)
Y-Intercept (b)
Seeing y = mx + b on a Graph
The best way to understand a linear equation is to see it. Below is a graph of the equation y = 2x + 1. Notice how the line is perfectly straight, crosses the y-axis at the point (0, 1), and climbs upward at a steady rate.
Look at the graph carefully. The gold dot at (0, 1) is the y-intercept — that's where the line meets the y-axis. The dashed triangle between (0, 1) and (1, 3) shows the slope: for every 1 step to the right, the line goes 2 steps up. That's a slope of 2. Every point on this line follows the rule y = 2x + 1.
This graph is also proof that the equation is a function. You can check this with the vertical line test: if you draw any vertical line anywhere on the graph, it will cross the line at most once. That means each x-value has only one y-value. One input → one output. That's a function!
Breaking Down the Equation
Let's take the equation apart piece by piece. Once you understand what each letter means, you'll be able to read any linear equation like a story.
Here's what each part does:
y is the output — the answer you get after plugging in a value for x. On a graph, y tells you how high or low the point sits.
m is the slope. It's a number that tells you the line's steepness. Slope is calculated as "rise over run" — how much y changes divided by how much x changes.
x is the input — the value you choose. You get to pick any x-value you want, and the equation will give you the matching y.
b is the y-intercept. It's the value of y when x = 0. On the graph, it's where the line crosses the vertical axis. Notice that if you substitute x = 0 into y = mx + b, you get y = m(0) + b = b. That's why b is the y-intercept!
How Slope and Intercept Change the Line
Different values of m and b create different lines. The diagram below shows three lines on the same graph so you can compare them side by side.
Let's compare these three lines using a table:
| EQUATION | SLOPE (m) | Y-INTERCEPT (b) | WHAT THE LINE DOES |
|---|---|---|---|
y = 2x + 1 | 2 (positive, steep) | 1 | Goes up steeply from left to right; crosses y-axis at 1 |
y = −x + 3 | −1 (negative) | 3 | Goes downhill from left to right; crosses y-axis at 3 |
y = 0.5x − 2 | 0.5 (positive, gentle) | −2 | Goes up gently; crosses y-axis below the origin at −2 |
Notice the patterns. When the slope is positive, the line goes upward as you move right. When the slope is negative, the line goes downward. A bigger absolute value of slope means a steeper line. And the y-intercept simply shifts the line up or down.
What about a slope of 0? If m = 0, the equation becomes y = b — a perfectly horizontal line! The y-value never changes no matter what x is. That's still a function (each x gives one y), and it's still linear (a horizontal line is straight).
Worked Example: From Table to Equation to Graph
Let's walk through a full problem together. Suppose you earn $8 per hour at a part-time job, plus a $15 bonus for showing up on time. Write and graph a linear equation for your total pay.
m = 8b = 15y = 8x + 15Linear vs. Non-Linear: How to Tell the Difference
Not every equation is linear. It's important to recognize what makes y = mx + b special — and what kinds of equations do not produce straight lines.
| FEATURE | LINEAR FUNCTION | NON-LINEAR FUNCTION |
|---|---|---|
| Equation form | y = mx + b (x has exponent of 1) | y = x², y = 2ˣ, y = √x, etc. |
| Graph shape | Perfectly straight line | Curved (parabola, exponential curve, etc.) |
| Rate of change | Constant — same slope everywhere | Changes — steeper in some places, flatter in others |
| Table pattern | y values increase/decrease by the same amount | y values change by different amounts |
| Example | y = 3x − 4 | y = x² + 1 |
Here's a quick test: look at the equation. If x is raised to a power other than 1 (like x² or x³), or if x is in the denominator (like 1/x), or if x is an exponent (like 2ˣ), it's not linear. A linear function keeps x simple — just x times some number, plus another number.
Also remember: y = mx + b always defines a function. For every input x, you get exactly one output y. But not every function is linear. The equation y = x² is a function too, but its graph is a U-shaped curve called a parabola — not a straight line.
Where Does This Lead Next?
Understanding y = mx + b is one of the most important foundations in all of mathematics. Once you master it, you'll be ready for bigger ideas. Here's a sneak peek at where this goes.
| WHAT YOU KNOW NOW | WHAT COMES NEXT |
|---|---|
| Graphing one line | Systems of equations — graphing two lines and finding where they cross |
| Slope as rate of change | Calculus — finding the rate of change for curved lines (derivatives) |
| Linear functions (y = mx + b) | Quadratic functions (y = ax² + bx + c) — curves instead of lines |
| One input, one output | Function notation — writing f(x) = mx + b and evaluating f(3), f(−2), etc. |
| Reading slope from an equation | Linear modeling — using real-world data to find the best-fit line |
In high school, you'll study function notation, where y = 2x + 1 gets written as f(x) = 2x + 1. The idea is the same, but the notation lets you talk about different functions more easily. You'll also explore what happens when you combine, shift, or stretch linear functions — and then move on to functions that aren't straight lines at all. Every one of those future topics builds on what you're learning right now.
Practice Problems
Try these five problems to test your understanding. Start with the easier ones and work your way up. Click "Show Answer" when you're ready to check your work.
y = −3x + 7, identify the slope and the y-intercept. Then find the value of y when x = 2.Putting It All Together
The equation y = mx + b is called slope-intercept form, and it defines a linear function — a rule that takes any input x and produces exactly one output y. The letter m represents the slope, which tells you the rate of change — how much y increases or decreases for each 1-unit increase in x. The letter b represents the y-intercept, the point where the line crosses the y-axis (where x = 0). Together, m and b completely determine the line's position and direction.
The graph of any equation in the form y = mx + b is always a straight line. A positive slope means the line rises from left to right; a negative slope means it falls. A larger absolute value of slope means a steeper line. Because every x-value produces exactly one y-value, the equation passes the vertical line test and qualifies as a function. This single, powerful equation connects algebra and geometry, letting you describe, predict, and analyze straight-line relationships in math and the real world.