3.5 BETA

Equations of linear graphs

2 learning objectives 1 core 1 extended

1. Overview

The equation of a linear graph, in the form $y = mx + c$, defines a straight line on a coordinate plane. Understanding how to determine and interpret these equations is crucial for solving problems involving rates of change, direct proportion, and geometric relationships. This topic covers finding the equation of a line from its graph, from two points, or given its relationship to another line (parallel or perpendicular).

Key Definitions

  • Gradient ($m$): The measure of the steepness of a line. It represents the change in $y$ for every one unit increase in $x$. Also referred to as 'slope'.
  • $y$-intercept ($c$): The point where the line crosses the $y$-axis (where $x = 0$).
  • Linear Equation: An equation that forms a straight line when plotted on a graph.
  • Parallel: Two lines are parallel if they have the same gradient and never meet.
  • Perpendicular: Two lines are perpendicular if they meet at a right angle ($90^{\circ}$).

Core Content

All straight-line graphs can be written in the form:

$y = mx + c$

How to find the equation from a graph:

  1. Find the $y$-intercept ($c$): Look at where the line crosses the vertical $y$-axis.
  2. Find the gradient ($m$): Choose two clear points on the line and use the formula: $$m = \frac{\text{rise}}{\text{run}} = \frac{\text{Change in } y}{\text{Change in } x}$$
📊A Cartesian grid showing a straight line crossing the $y$-axis at $(0, 2)$ and passing through the point $(2, 6)$. A right-angled triangle is drawn underneath the line to show a rise of 4 and a run of 2.

Worked example 1 — Finding equation from graph

Question: Find the equation of the line shown in the diagram above.

  • Step 1: Identify the $y$-intercept. The line crosses the $y$-axis at $2$. So, $c = 2$.
  • Step 2: Find the gradient using the points $(0, 2)$ and $(2, 6)$. $\text{Rise} = 6 - 2 = 4$ $\text{Run} = 2 - 0 = 2$ $m = \frac{4}{2} = 2$
  • Step 3: Substitute $m$ and $c$ into $y = mx + c$. $y = 2x + 2$

Answer: $y = 2x + 2$

Worked example 2 — Finding equation from graph

Question: A straight line passes through the points $(0, -1)$ and $(3, 5)$. Find the equation of the line.

  • Step 1: Identify the $y$-intercept. The line passes through $(0, -1)$, so the $y$-intercept is $-1$. $c = -1$
  • Step 2: Calculate the gradient using the two points. $m = \frac{5 - (-1)}{3 - 0}$ $m = \frac{6}{3}$ $m = 2$
  • Step 3: Substitute $m$ and $c$ into $y = mx + c$. $y = 2x + (-1)$ $y = 2x - 1$

Answer: $y = 2x - 1$

Horizontal and Vertical Lines:

  • Vertical lines have the equation $x = a$ (where $a$ is the value on the $x$-axis). Their gradient is undefined.
  • Horizontal lines have the equation $y = b$ (where $b$ is the value on the $y$-axis). Their gradient is $0$.

Extended Content (Extended Only)

Finding the equation using two points $(x_1, y_1)$ and $(x_2, y_2)$

If you are not given a graph, you must calculate the gradient algebraically first.

$m = \frac{y_2 - y_1}{x_2 - x_1}$

This formula calculates the gradient of a line given any two points on that line. It represents the change in $y$ divided by the change in $x$.

Worked example 3 — Finding equation from two points

Question: Find the equation of the line passing through $A(1, 4)$ and $B(3, 10)$.

  • Step 1: Calculate the gradient ($m$) $m = \frac{y_2 - y_1}{x_2 - x_1}$ $m = \frac{10 - 4}{3 - 1}$ $m = \frac{6}{2}$ $m = 3$
  • Step 2: Find $c$ by substituting one point into $y = mx + c$ Using point $A(1, 4)$: $4 = 3(1) + c$ $4 = 3 + c$ $c = 4 - 3$ $c = 1$
  • Step 3: State the final equation $y = 3x + 1$

Answer: $y = 3x + 1$

Parallel and Perpendicular Lines

  • Parallel lines have the same gradient ($m_1 = m_2$).
  • Perpendicular lines have gradients that are negative reciprocals ($m_1 \times m_2 = -1$). This means if one line has a gradient of $m$, a line perpendicular to it will have a gradient of $-\frac{1}{m}$.

Worked example 4 — Perpendicular lines

Question: Find the equation of the line perpendicular to $y = 2x + 5$ that passes through $(4, 1)$.

  • Step 1: Identify the original gradient ($m_1 = 2$).
  • Step 2: Find the perpendicular gradient ($m_2 = -\frac{1}{2}$).
  • Step 3: Use $y = mx + c$ with point $(4, 1)$. $1 = -\frac{1}{2}(4) + c$ $1 = -2 + c$ $c = 1 + 2$ $c = 3$
  • Final equation: $y = -\frac{1}{2}x + 3$

Answer: $y = -\frac{1}{2}x + 3$

Worked example 5 — Parallel lines

Question: A line is parallel to $y = -3x + 2$ and passes through the point $(-1, 5)$. Find the equation of the line.

  • Step 1: Identify the gradient of the parallel line. Since the lines are parallel, they have the same gradient. $m = -3$
  • Step 2: Substitute the gradient and the point $(-1, 5)$ into $y = mx + c$ to find $c$. $5 = -3(-1) + c$ $5 = 3 + c$ $c = 5 - 3$ $c = 2$
  • Step 3: Write the equation of the line. $y = -3x + 2$

Answer: $y = -3x + 2$


Key Equations

Equation Meaning Notes
$y = mx + c$ Standard form of a linear equation Not provided on formula sheet.
$m = \frac{y_2 - y_1}{x_2 - x_1}$ Formula for gradient Use when given two coordinates.
$m_1 = m_2$ Parallel lines condition Gradients are equal.
$m_1 \times m_2 = -1$ Perpendicular lines condition One gradient is the negative reciprocal of the other.

Common Mistakes to Avoid

  • Wrong: Forgetting the $x$ in the final equation (e.g., writing $y = 3 + 2$ instead of $y = 3x + 2$). ✓ Right: Always ensure the variable $x$ is attached to the gradient. Write out $y = mx + c$ first, then substitute.
  • Wrong: Mixing up the rise and run when calculating the gradient (putting the change in $x$ on top of the fraction). ✓ Right: Remember "Rise over Run" (Change in $y$ over Change in $x$). Always calculate $m = \frac{\text{change in }y}{\text{change in }x}$.
  • Wrong: Making sign errors when calculating the gradient with negative coordinates, especially when subtracting a negative. ✓ Right: Use brackets when subtracting negatives: e.g., if $y_2 = 4$ and $y_1 = -2$, then $y_2 - y_1 = 4 - (-2) = 4 + 2 = 6$.
  • Wrong: Assuming that if a line looks perpendicular on a sketch, it is perpendicular, without checking the gradients. ✓ Right: Always calculate the gradients and verify that their product is -1. Visual estimations can be misleading.

Exam Tips

  • Command Words: "Find the equation" means you must provide an answer in the form $y = mx + c$. "State the gradient" only requires the value of $m$.
  • Calculator Tip: If the question is in the calculator paper, you can use the fraction button to calculate the gradient to avoid rounding errors mid-calculation.
  • Rearranging: Sometimes equations are given as $2y - 4x = 8$. Always rearrange into $y = mx + c$ (in this case, $y = 2x + 4$) before identifying the gradient or intercept.
  • Context: In real-world problems (e.g., taxi fares), $c$ is usually the "fixed base cost" and $m$ is the "cost per kilometer."
  • Show your working: Even if you can spot the answer, showing your steps to calculate the gradient and y-intercept can earn you method marks if you make a small arithmetic error.

Frequently Asked Questions: Equations of linear graphs

What is Gradient ($m$): in Equations of linear graphs?

Gradient ($m$):: The measure of the steepness of a line. It represents the change in $y$ for every one unit increase in $x$. Also referred to as 'slope'.

What is $y$-intercept ($c$): in Equations of linear graphs?

$y$-intercept ($c$):: The point where the line crosses the $y$-axis (where $x = 0$).

What is Linear Equation: in Equations of linear graphs?

Linear Equation:: An equation that forms a straight line when plotted on a graph.

What is Parallel: in Equations of linear graphs?

Parallel:: Two lines are parallel if they have the same gradient and never meet.

What is Perpendicular: in Equations of linear graphs?

Perpendicular:: Two lines are perpendicular if they meet at a right angle ($90^{\circ}$).