Deriving y = mx & y = mx + b
Learn to derive and write linear equations y = mx and y = mx + b by identifying slope and y-intercept from a graph.
What you'll do in this lesson
A voice-first session with the Crimsora tutor on Deriving y = mx & y = mx + b, then targeted practice and FRQs — with the tutor adapting to where you get stuck.
What this lesson covers
Linear equations are the language of straight-line relationships. In this lesson, you'll discover where the famous forms y = mx and y = mx + b come from, and how to read a graph to write the equation of any line. Understanding these forms lets you predict values, compare real-world relationships, and solve problems from business to physics.
Understanding y = mx: Lines Through the Origin
A proportional relationship—one where the ratio of y to x is always constant—creates a line that passes through the origin (0, 0). When a line goes through (0, 0) and another point, say (3, 6), the ratio . This constant ratio is the slope, called m. The equation becomes , where m is the unit rate or slope. For example, if you earn 12 dollars per hour, after x hours you've earned y = 12x dollars. The equation means for every 1 unit right, the line goes up 2 units. You derive by observing that at any point on the line, , so multiplying both sides by x gives . This form always means no starting amount or fixed cost—the relationship is purely proportional.
Introducing y = mx + b: The Y-Intercept
Not all linear relationships start at zero. Suppose you rent a bike for 5 dollars plus 3 dollars per hour. After 2 hours, you pay dollars. The 5 is a fixed starting cost, and the 3 is the hourly rate. In the equation , the b represents the y-intercept—the y-value when x = 0. It's the point where the line crosses the y-axis, written as (0, b). The m is still the slope: the rate of change. When x = 0, the equation becomes . On a graph, this is immediate: b is simply where the line touches the y-axis. The equation is the general form for any non-vertical line. If b = 0, it simplifies to , which you already know.
Reading Slope and Y-Intercept from a Graph
To write the equation of a line from its graph, find two pieces of information: the y-intercept and the slope. First, locate where the line crosses the y-axis; this point is (0, b), and b is your intercept value. If the line doesn't clearly pass through a grid intersection at the y-axis, you can still find b by identifying any two clear points and calculating the slope, then using one point to solve for b. Second, find the slope m by picking two points on the line with integer coordinates. Use the slope formula: . For instance, if the line passes through (1, 3) and (3, 7), then . Once you have m and b, write . Use one known point to find b: gives . The equation is .
Common Mistakes and Where Students Go Wrong
A frequent error is confusing which value is m and which is b. Remember: b is found on the y-axis (where x = 0), and m is the slope (rise over run between two points). Another mistake is calculating slope incorrectly by using rise over run in the wrong order or subtracting in an inconsistent way. Always subtract y-values on top and x-values on bottom, in the same order: if you use in the numerator, use in the denominator. Students sometimes assume a line passes through the origin when it doesn't, or vice versa; always check the graph carefully. Finally, when reading m from a graph, be sure both points you choose actually lie on the line. If unsure, pick three points and verify the slope is consistent.
Deriving the Equations: Why the Forms Work
The equation comes from the definition of a proportional relationship: if the ratio is constant and equals m, then . The equation is derived by translation. Start with a line through the origin, . If you shift the entire line up by b units, every y-value increases by b, giving . Algebraically, a line's slope is constant everywhere, so for any two points. If one point is (0, b), then using another point (x, y): , which simplifies to , or . This derivation shows that m and b fully describe any non-vertical line: m controls steepness and direction, and b positions the line vertically.
Key terms
- Slope (m).
- The rate of change of a line, calculated as rise over run, or . It tells you how much y increases (or decreases) for each unit increase in x.
- Y-intercept (b).
- The y-coordinate of the point where a line crosses the y-axis. Always occurs at x = 0 and is written as the point (0, b).
- Linear equation.
- An equation whose graph is a straight line. The forms and are both linear equations.
- Proportional relationship.
- A relationship where y and x are in constant ratio, meaning (a constant). The graph is always a line through the origin.
- Unit rate.
- The slope m in the context of a real-world relationship. It describes the amount of change in y for each unit of x (for example, dollars per hour).
Worked example
A line passes through the points (2, 5) and (4, 9). Write the equation of the line in the form .
Step 1: Find the slope m using the slope formula. Choose the two points: and .Step 2: Use the slope and one point to find b. Substitute and the point (2, 5) into :Step 3: Write the equation. With and , the equation isStep 4: Check using the other point. Substitute (4, 9): . ✓
Practice questions
A line on a graph passes through (0, 3) and (2, 7). What is the equation of the line?
Answer:
First, find the slope: . The line crosses the y-axis at (0, 3), so . Therefore . A common mistake is using 7 as the y-intercept; remember that b is the y-value when x = 0, which here is 3.
Write an equation for a line that has a slope of 4 and crosses the y-axis at (0, –2).
Answer:
You are given m = 4 (the slope) and the y-intercept point (0, –2), so b = –2. Substitute directly into to get , or . Note that writing the equation is straightforward when both m and b are given; the harder work is finding them from a graph or from two points.
The line represents a situation where a plant's height decreases 3 cm per day, and it starts at 6 cm tall. What does the slope tell you about the plant?
Answer: The slope of –3 tells you the rate of change: the plant loses (decreases) 3 cm in height each day.
In , the slope m describes how y changes as x increases. Here, m = –3 means that for every increase of 1 day, the height decreases by 3 cm. A negative slope always indicates a decreasing relationship. The y-intercept b = 6 means the plant started at 6 cm, but the question asks specifically about what the slope tells you.
FAQ
- What is the difference between y = mx and y = mx + b?
- is used only for proportional relationships that pass through the origin (0, 0). There is no starting value or fixed amount. is the general form for any line. It includes a y-intercept b, which represents a starting value or fixed amount. When b = 0, the two forms are the same.
- How do I find the y-intercept if the line doesn't clearly cross the y-axis on the graph?
- If the visible part of the graph doesn't show the y-axis crossing, you can still find b by calculating the slope m from two points on the line, then substituting m and any known point (x, y) into and solving for b.
- Why is slope represented by the letter m?
- The origin of the letter m for slope is historically uncertain, but one theory links it to the French word 'monter' (to climb) or the concept of modulus (measure). The letter b for y-intercept likely comes from the phrase 'y-intercept begins at b'. These are simply conventions that mathematicians agreed upon, and they're used consistently worldwide.
- Can a line have a negative slope?
- Yes. A negative slope means the line goes downward from left to right. For example, has a slope of –2. For every increase of 1 in x, y decreases by 2. Negative slopes represent decreasing relationships, like the value of a car over time or the distance remaining on a long drive as time passes.
Learn this with a teacher, not a page
The Crimsora tutor teaches Deriving y = mx & y = mx + b live — explaining on a whiteboard, asking you questions, and adapting to where you get stuck.