Understanding the Equation of a Straight Line
Updated July 2026
The linear equation y=mx+c describes a straight line where m is the gradient and c is the y-intercept. This topic explores how altering these constants transforms the parent function y=x. Understanding these relationships is vital for sketching graphs and interpreting linear functions in the ESAT.
The graph of y=mx+c is a transformation of the identity function y=x, where m scales the steepness (gradient) and c shifts the position vertically (the y-intercept).
To understand how the constants m and c affect the graph of a straight line, it is useful to view y=mx+c as a sequence of transformations applied to the simplest linear graph: the parent function y=x. By breaking the equation down into steps, you can see exactly how the gradient and intercept modify the line's position and orientation.
The First Sequence: Vertical Stretching and Horizontal Translation
One way to conceptualise the construction of the graph y=mx+c is through the following steps:
- Start with the identity function: y=x. This is a line passing through the origin with a gradient of 1.
- Apply the gradient m: y=mx. This represents a vertical stretch from the x-axis with a scale factor of m. If m>1, the line becomes steeper. If 0<m<1, the line becomes less steep. If m is negative, the line reflects across the x-axis.
- Apply a horizontal translation: y=m(x+mc). By expanding this expression, we see it equals mx+c. In terms of graph transformations, replacing x with (x+mc) translates the graph horizontally by the vector (−mc0).
The Second Sequence: Translation and Gradient Adjustment
An alternative way to reach the same final equation involves shifting the line before adjusting the gradient:
- Start with the identity function: y=x.
- Apply a vertical translation: y=x+c. This shifts the graph y=x by c units vertically. This results in a line with a y-intercept at (0,c).
- Adjust the gradient: y=mx+c. Here, the gradient is changed to m. Note that the y-intercept remains at c, but the slope of the line changes around that fixed point.
Interpreting Vertical vs Horizontal Shifts
A key observation in linear graphs involves the step y=x→y=x+c. If we define our function as f(x)=x, we can look at this change in two ways:
- Vertical Translation: f(x)+c=x+c. This is a shift of c units upwards.
- Horizontal Translation: f(x+c)=x+c. This is a shift of c units to the left.
For the specific function y=x, a vertical shift and a horizontal shift of the same magnitude result in the exact same line. This is a unique property of the identity function that helps explain why c can be seen both as a vertical offset and, when adjusted by m, part of a horizontal offset.
Practical Application
When sketching y=mx+c, you should always identify the effect of both parameters:
- The value of c: This is the y-intercept. It tells you where the line crosses the vertical axis (0,c).
- The value of m: This is the gradient. It tells you the 'rise over run'. For every 1 unit you move to the right, the graph moves m units up (or down if m is negative).
By picking various pairs of values for m and c and using a graph sketching package, you can observe these transformations in real time. For instance, increasing m while keeping c constant will 'pivot' the line around the point (0,c), making it steeper.
Key takeaways
- The constant m represents the gradient, determines the steepness, and acts as a vertical scale factor relative to y=x.
- The constant c is the y-intercept, indicating the point (0,c) where the line crosses the y-axis.
- The transformation y=x→y=x+c can be interpreted as either a vertical translation of c or a horizontal translation of −c.
- The full equation y=mx+c can be reached by a vertical stretch followed by a horizontal translation of −mc units.
In the ESAT, if you are asked to identify a graph from an equation, find the y-intercept first. This usually eliminates half of the multiple-choice options immediately. Then, check if the gradient is positive or negative to narrow it down further.
Be careful when identifying horizontal shifts. While y=mx+c has a y-intercept of c, its x-intercept is at x=−c/m. Students often mistake c for the x-intercept.
The dual nature of c as both a vertical and horizontal shift in the parent function y=x is due to the fact that the line has a gradient of 1. For any line y=mx+c, a vertical shift of k units is always equivalent to a horizontal shift of −k/m units.
Frequently asked questions
What happens to the graph if m=0?
If m=0, the equation becomes y=c. This is a horizontal line where the gradient is zero, meaning it stays at the same y-value regardless of the x-value.
Why does y=m(x+c/m) result in y=mx+c?
Distributing the m across the brackets gives m⋅x+m⋅(c/m). The m terms in the fraction cancel out, leaving mx+c. This shows that the vertical intercept c is related to a horizontal shift of c/m.
If c is negative, how does the graph move?
A negative c value translates the graph downwards. For example, y=x−3 is the graph of y=x shifted 3 units down, crossing the y-axis at (0,−3).
Ready to test your knowledge?
You've reached the end of this section. Start a practice session to solidify your understanding and master this topic.