Understanding the Equation of a Straight Line

Updated July 2026

The linear equation y=mx+cy = mx + c describes a straight line where mm is the gradient and cc is the yy-intercept. This topic explores how altering these constants transforms the parent function y=xy = x. Understanding these relationships is vital for sketching graphs and interpreting linear functions in the ESAT.

Core concept

The graph of y=mx+cy = mx + c is a transformation of the identity function y=xy = x, where mm scales the steepness (gradient) and cc shifts the position vertically (the yy-intercept).

To understand how the constants mm and cc affect the graph of a straight line, it is useful to view y=mx+cy = mx + c as a sequence of transformations applied to the simplest linear graph: the parent function y=xy = 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+cy = mx + c is through the following steps:

  1. Start with the identity function: y=xy = x. This is a line passing through the origin with a gradient of 1.
  2. Apply the gradient mm: y=mxy = mx. This represents a vertical stretch from the xx-axis with a scale factor of mm. If m>1m > 1, the line becomes steeper. If 0<m<10 < m < 1, the line becomes less steep. If mm is negative, the line reflects across the xx-axis.
  3. Apply a horizontal translation: y=m(x+cm)y = m(x + \frac{c}{m}). By expanding this expression, we see it equals mx+cmx + c. In terms of graph transformations, replacing xx with (x+cm)(x + \frac{c}{m}) translates the graph horizontally by the vector (cm0)\begin{pmatrix} -\frac{c}{m} \\ 0 \end{pmatrix}.

The Second Sequence: Translation and Gradient Adjustment

An alternative way to reach the same final equation involves shifting the line before adjusting the gradient:

  1. Start with the identity function: y=xy = x.
  2. Apply a vertical translation: y=x+cy = x + c. This shifts the graph y=xy = x by cc units vertically. This results in a line with a yy-intercept at (0,c)(0, c).
  3. Adjust the gradient: y=mx+cy = mx + c. Here, the gradient is changed to mm. Note that the yy-intercept remains at cc, 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=xy=x+cy = x \rightarrow y = x + c. If we define our function as f(x)=xf(x) = x, we can look at this change in two ways:

  • Vertical Translation: f(x)+c=x+cf(x) + c = x + c. This is a shift of cc units upwards.
  • Horizontal Translation: f(x+c)=x+cf(x + c) = x + c. This is a shift of cc units to the left.

For the specific function y=xy = 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 cc can be seen both as a vertical offset and, when adjusted by mm, part of a horizontal offset.

Practical Application

When sketching y=mx+cy = mx + c, you should always identify the effect of both parameters:

  • The value of cc: This is the yy-intercept. It tells you where the line crosses the vertical axis (0,c)(0, c).
  • The value of mm: This is the gradient. It tells you the 'rise over run'. For every 1 unit you move to the right, the graph moves mm units up (or down if mm is negative).

By picking various pairs of values for mm and cc and using a graph sketching package, you can observe these transformations in real time. For instance, increasing mm while keeping cc constant will 'pivot' the line around the point (0,c)(0, c), making it steeper.

Key takeaways

  • The constant mm represents the gradient, determines the steepness, and acts as a vertical scale factor relative to y=xy = x.
  • The constant cc is the yy-intercept, indicating the point (0,c)(0, c) where the line crosses the yy-axis.
  • The transformation y=xy=x+cy = x \rightarrow y = x + c can be interpreted as either a vertical translation of cc or a horizontal translation of c-c.
  • The full equation y=mx+cy = mx + c can be reached by a vertical stretch followed by a horizontal translation of cm-\frac{c}{m} units.
Tips

In the ESAT, if you are asked to identify a graph from an equation, find the yy-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.

Cautions

Be careful when identifying horizontal shifts. While y=mx+cy = mx + c has a yy-intercept of cc, its xx-intercept is at x=c/mx = -c/m. Students often mistake cc for the xx-intercept.

Insight

The dual nature of cc as both a vertical and horizontal shift in the parent function y=xy = x is due to the fact that the line has a gradient of 1. For any line y=mx+cy = mx + c, a vertical shift of kk units is always equivalent to a horizontal shift of k/m-k/m units.

Frequently asked questions

What happens to the graph if m=0m = 0?

If m=0m = 0, the equation becomes y=cy = c. This is a horizontal line where the gradient is zero, meaning it stays at the same yy-value regardless of the xx-value.

Why does y=m(x+c/m)y = m(x + c/m) result in y=mx+cy = mx + c?

Distributing the mm across the brackets gives mx+m(c/m)m \cdot x + m \cdot (c/m). The mm terms in the fraction cancel out, leaving mx+cmx + c. This shows that the vertical intercept cc is related to a horizontal shift of c/mc/m.

If cc is negative, how does the graph move?

A negative cc value translates the graph downwards. For example, y=x3y = x - 3 is the graph of y=xy = x shifted 3 units down, crossing the yy-axis at (0,3)(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.