Key Points
- In , is the gradient (the climb for each step right) and is the y-intercept, the point .
- The equation works because a straight line has the same gradient everywhere, a fact that rests on similar triangles.
- Parallel lines share the same ; perpendicular gradients multiply to .
- and are the same equation; only the intercept letter changes.
The Same Line, Written Two Different Ways Across an Ocean
A student in London and a student in New York write the same line with different letters.
- In London it is ; in New York it is .
- Same graph, same gradient, same crossing point on the vertical axis. Only one letter changed.
- That letter trips up more learners than the mathematics does, so this page clears it up early.
What Is y = mx + c?
y = mx + c is the equation of a straight line in gradient-intercept form, where is the gradient and is the y-intercept.
- The gradient measures steepness: the change in for each step of in , or rise over run. Positive climbs, negative falls.
- The intercept is the value of when . Put in and only is left, so the line passes through .
- For one line, and are fixed while and change along it. In , the pair fits and does not.

List for and you get : start at , add each step. Two numbers rebuild the whole line.
Why y = mx + c Works: Two Ways to See It
The equation is not handed down; it falls out of what gradient means.
Way 1: similar triangles keep the gradient fixed
Draw a small step triangle under the line (across, then up) and a bigger one elsewhere.
- Both triangles have the same angles, because the line meets every horizontal at the same angle.
- So they are similar triangles, and rise ÷ run is the same for both. That number is .

Way 2: build the equation from the gradient
Take and any other point on the line. The gradient between them must be :
Multiply both sides by , then add :
When the form breaks: vertical lines
A vertical line such as has a run of , so rise ÷ run has no value and there is no . It is written instead. A horizontal line is fine: its gradient is , so it is .
What m and c Do to the Graph
Change and the line turns about ; change and it slides up or down without turning.

- The size of sets steepness: is steeper than .
- If the line passes through the origin, : is in direct proportion to .
- The x-intercept follows from both: gives .
Parallel and Perpendicular Lines in y = mx + c
Parallel lines have the same gradient and different intercepts; perpendicular lines have gradients that multiply to .
- and share , so they never meet.
- Why ? Turn the step "across , up " through and it becomes "back , up ", a gradient of .
- Flip the fraction and change the sign: becomes . The rule cannot handle a vertical and a horizontal line, though they are perpendicular.

Try It Yourself
The tool calls the gradient "slope". Drag the handles on each line, then try the presets: Parallel gives equal slopes, Perpendicular gives .
Y = mx + c and y = mx + b: The Same Equation
The intercept letter is a regional habit, not a different idea.
- The UK, India and much of the Commonwealth write ; the United States writes .
- In both, is the gradient (called slope in the US) and the last letter is the y-intercept.
- Meet in a US book? Read it as "my " and carry on. See y = mx + b and slope-intercept form.
| UK and India | United States | |
|---|---|---|
| Equation | ||
| Steepness is called | gradient, | slope, |
| Intercept letter | ||
| The mathematics | identical | identical |
How to Find the Equation of a Line
Every method has the same goal: find , then find .
- Given and : write them straight in.
- Given and a point: substitute the point and solve for .
- Given two points: find , then use either point for .
- Given another form: rearrange until stands alone.
- Given a graph: read on the y-axis, then count rise over run.
Examples of y = mx + c
Example 1
Write the equation of the line with gradient 3 and y-intercept −5.
- Substitute and : .
Final answer: .
Example 2
Find the gradient and y-intercept of y = 7 − 2x. Predict first.
- The first instinct is to take the first number, .
- Test: a gradient of would make grow, but is smaller than .
- Reorder: . multiplies ; stands alone.
Final answer: gradient , y-intercept .
Example 3
Write 5x + 4y = 12 in the form y = mx + c.
- Subtract : .
- Divide every term by : .

Final answer: and , not .
Example 4
A line has gradient 3 and passes through (2, 7). Find its equation.
- Substitute: .
- So .
Final answer: .
Example 5
Find the equation of the line through (1, 5) and (3, 11).
- Gradient: .
- Use : , so .
- Check : .

Final answer: .
Example 6
Find the line perpendicular to y = 2x + 1 through (4, 3).
- The perpendicular gradient is , since .
- Substitute: , so .
Final answer: , the orange line in the perpendicular figure.
Why This Form Matters: "Two Numbers Fix a Whole Line"
Any quantity that starts at a fixed value and changes at a steady rate is a straight line: is the start, the rate.
- A burning candle. A cm candle losing cm an hour has height . It lasts until , at hours.
- Fares. A taxi charging a 3 pound flag-drop plus 2 pounds a mile is .
- Conversions. : the gradient is the exchange rate between the scales.
- Trend lines. A line of best fit is quoted as so the rate and starting level read at once.

Turning lines into equations goes back to René Descartes's La Géométrie (1637) and to Pierre de Fermat's algebraic approach to geometry, worked out on his own. The straight line was the first case.
The Mistakes Students Make Most Often
Mistake 1: Swapping m and c
Where it slips in: Reading an equation in a hurry, or building one from a gradient and an intercept.
Don't do this: Read as "gradient , intercept ".
The correct way: sits with the ; sits alone. and are different lines meeting only at . Checking catches the swap.

Mistake 2: Reading c before rearranging
Where it slips in: Equations such as , where is not alone.
Don't do this: Call the intercept and the gradient.
The correct way: Rearrange to , dividing every term by the number in front of , then read. Example 3 gave , .
Mistake 3: Losing the sign of c
Where it slips in: Equations with a subtraction, such as .
Don't do this: Write .
The correct way: , so and the line crosses below the origin.
Mistake 4: Thinking c and b mean different things
Where it slips in: Switching between a UK or Indian book and a US one.
Don't do this: Treat as a new formula to relearn.
The correct way: and are the same y-intercept; only the letter is regional.
Conclusion
- fits every non-vertical line: is the gradient, the y-intercept .
- It works because similar triangles keep rise ÷ run the same along a line.
- Read and only once is alone; equal gradients mean parallel, a product of means perpendicular.
- and are the same equation in two notations.
Read More
- Straight Line
- Gradient of a Line
- Slope of Perpendicular Lines
- Y-Intercept
- Coordinate Geometry
- Cartesian Plane
Research Behind This Article
- OpenStax, Elementary Algebra 2e, Section 4.5: Use the Slope-Intercept Form of an Equation of a Line (identifying m and b, parallel and perpendicular lines). openstax.org
- Abramson, J., College Algebra 2e, Section 4.1: Linear Functions, OpenStax, Rice University. openstax.org
- O'Connor, J. J. and Robertson, E. F., "René Descartes", MacTutor History of Mathematics, University of St Andrews. mathshistory.st-andrews.ac.uk
- O'Connor, J. J. and Robertson, E. F., "Pierre de Fermat", MacTutor History of Mathematics, University of St Andrews. mathshistory.st-andrews.ac.uk
Quick Quiz: Check Yourself
Three levels, questions with figures, instant feedback with the reason.
Was this article helpful?
Your feedback helps us write better content
Frequently Asked Questions
What do m and c stand for in y mx c?
Is y = mx + c the same as y = mx + b?
Can every straight line be written in y = mx + c form?
What is c when the line passes through the origin?
How do you know if two lines are perpendicular from their equations?
