Linear graphs link algebra and geometry. Every equation of the form y = mx + c gives a straight line, and its gradient and intercepts let you solve real-world problems about rates and starting values.
This topic also introduces function notation, f(x), which you will use throughout the rest of Sec 2, 3 and 4 Maths.
What these notes cover
- •Function notation
- •Gradient of a straight line
- •Equation of a line: y = mx + c
- •Rearranging the general form ax + by = k
- •Sketching a linear graph from its intercepts
- •Linear graphs in real-world contexts
- •Common mistakes
- •Summary
Key definitions
- Function
- A rule that assigns exactly one output to each input.
- f(x)
- The value of the function f when the input is x. It does not mean f times x.
- Gradient (m)
- How steep a line is: the amount y increases for every 1 unit increase in x. If m > 0 the line slopes upward from left to right, if m < 0 it slopes downward, and if m = 0 it is horizontal.
- y-intercept (c)
- The value of y when x = 0, which is where the line crosses the y-axis.
- Vertical line
- A line of the form x = a. It cannot be written as y = mx + c, its gradient is undefined (not zero), and it is not a function.
Key formulas
Gradient formula
(x₁, y₁) and (x₂, y₂) are any two points on the line. Keep both differences in the same order.
Equation of a straight line
y = mx + c
m is the gradient and c is the y-intercept.
General form of a line
ax + by = k
Rearrange to make y the subject first. Only once y has coefficient 1 can you read off m and c directly.
Horizontal line
y = c
Gradient m = 0.
Vertical line
x = a
Gradient is undefined. It is not a function.
Worked example
Find the equation of the line passing through A(1, 4) and B(3, 10).
- 1Find the gradient: m = (10 − 4) ÷ (3 − 1) = 6 ÷ 2 = 3.
- 2Substitute m = 3 and point A(1, 4) into y = mx + c: 4 = 3(1) + c, so c = 1.
- 3So the equation is y = 3x + 1.
- 4Check with B(3, 10): 3(3) + 1 = 10, which matches, so the equation is correct.
Watch out: Keep (y₂ − y₁) and (x₂ − x₁) in the same order. Swapping only one of them flips the sign of the gradient.
Common mistakes
Reading the gradient from a non-standard equation
Wrong: In 2x + 3y = 12, taking the gradient as 2.
Right: Rearrange to make y the subject: 3y = −2x + 12, so y = −(2 ÷ 3)x + 4, giving m = −(2 ÷ 3) and c = 4.
Mixing up the intercepts
Wrong: Setting y = 0 to find the y-intercept.
Right: The y-intercept is where the graph crosses the y-axis, which happens when x = 0. Set y = 0 to find the x-intercept.
Giving a vertical line a gradient of zero
Wrong: Saying the line x = a has gradient 0.
Right: x = a is a valid line, but it cannot be written as y = mx + c. Its gradient is undefined, not zero.
Questions students ask
What does f(x) mean in Sec 2 Maths?
f(x) means the output of the function f when the input is x. It does not mean f times x. For f(x) = 3x − 5, substitute x = 2 directly to get f(2) = 3(2) − 5 = 1.
How do you find the gradient of a straight line from two points?
Use m = (y₂ − y₁) ÷ (x₂ − x₁) with any two points on the line. Keep both differences in the same order, because swapping only one of them flips the sign.
How do you sketch a linear graph quickly?
Find the two axis intercepts. Set x = 0 to find the y-intercept and set y = 0 to find the x-intercept, then draw a straight line through these two points. For example, y = 2x − 4 crosses the axes at (0, −4) and (2, 0).
What do the gradient and y-intercept represent in a real-world linear graph?
The gradient represents a rate and the y-intercept represents a fixed starting value. For a $50 registration fee plus $20 per lesson, the cost is C = 20n + 50. Here 20 is the cost per lesson and 50 is the fee paid even for 0 lessons.
In the full PDF
- •Figure 1: the graph of y = 2x − 4 with both intercepts marked
- •Figure 2: total cost C against number of lessons n
- •Further worked examples on function notation, sketching y = 2x − 4 and the lesson-cost model
- •Watch-out boxes on rearranging 2x + 3y = 12 and on which intercept comes from x = 0
- •The remaining common mistakes, including confusing f(x) with multiplication and sketching from a single point
- •A one-page summary of the whole topic