Straight Line Graphs in IGCSE Maths
Understanding y = mx + c, finding the gradient and equation of a line, and working with parallel and perpendicular lines.
0580 · E2.10 / E2.11Understanding y = mx + c
Every straight line can be written in the form:
\[y = mx + c\]where \(m\) is the gradient (how steep the line is) and \(c\) is the y-intercept (where the line crosses the y-axis).
In the graph above, the line \(y = 2x + 1\) has a gradient of 2 (it goes up 2 for every 1 across) and crosses the y-axis at 1.
If \(m > 0\), the line slopes upward from left to right (uphill). If \(m < 0\), it slopes downward (downhill). A larger value of \(m\) means a steeper line.
Finding the gradient
The gradient measures how steep a line is. Given two points \((x_1, y_1)\) and \((x_2, y_2)\) on the line:
\[m = \frac{y_2 - y_1}{x_2 - x_1} = \frac{\text{rise}}{\text{run}}\]Rise is the vertical change, run is the horizontal change.
Find the gradient of the line through \((2, 3)\) and \((6, 11)\).
Find the gradient of the line through \((1, 7)\) and \((4, 1)\).
The negative gradient tells us the line slopes downward from left to right.
Pick two points on the line where it crosses grid intersections. Draw a right-angled triangle between them. Count the squares across (run) and up or down (rise). Gradient = rise ÷ run.
If the line goes uphill (left to right), the rise is positive and the gradient is positive. If it goes downhill, the rise is negative and the gradient is negative.
Reading the equation from a graph
Find where the line crosses the y-axis. This gives you \(c\).
Pick two points on the line that sit on grid intersections. Use the gradient formula or count rise and run.
Substitute your values of \(m\) and \(c\).
Find the equation of the line shown below.
The line crosses the y-axis at \(4\), so \(c = 4\).
Pick two points on grid intersections: \((0, 4)\) and \((2, 3)\).
\[m = \frac{3 - 4}{2 - 0} = \frac{-1}{2} = -\tfrac{1}{2}\]A straight line crosses the y-axis at \(-3\) and passes through the point \((4, 5)\). Find its equation.
\(c = -3\)
Using the y-intercept \((0, -3)\) and the point \((4, 5)\):
\[m = \frac{5 - (-3)}{4 - 0} = \frac{8}{4} = 2\]Equation of a line through two points
When you don't have the y-intercept, you need an extra step.
Pick either point and substitute its \(x\) and \(y\) values along with \(m\) to solve for \(c\).
The midpoint of a line segment between \((x_1, y_1)\) and \((x_2, y_2)\) is:
\[M = \left(\frac{x_1 + x_2}{2},\; \frac{y_1 + y_2}{2}\right)\]Average the x-coordinates and average the y-coordinates. For example, the midpoint of \((3, 5)\) and \((7, 17)\) is \(\left(\frac{3+7}{2},\; \frac{5+17}{2}\right) = (5, 11)\).
You need this when finding perpendicular bisectors — see the exam questions below.
Find the equation of the line through \((3, 5)\) and \((7, 17)\).
Rearranging to y = mx + c
Equations are not always given in the form \(y = mx + c\). You may see forms like \(2x + 3y = 12\) or \(3y = 6x - 9\). To find the gradient and y-intercept, rearrange to make \(y\) the subject.
Find the gradient and y-intercept of \(2x + 5y = 20\).
Gradient: \(m = -\frac{2}{5}\). Y-intercept: \(c = 4\).
Find the gradient of \(3x - 4y + 8 = 0\).
Gradient: \(m = \frac{3}{4}\).
Parallel lines
Parallel lines have the same gradient.
If line 1 has gradient \(m\), any line parallel to it also has gradient \(m\). The only difference is the y-intercept.
Find the equation of the line parallel to \(y = 3x + 1\) that passes through \((2, 4)\).
Parallel means same gradient: \(m = 3\).
Perpendicular lines
Perpendicular lines meet at 90°. Their gradients are negative reciprocals of each other:
\[m_1 \times m_2 = -1\]To find the perpendicular gradient, flip the fraction and change the sign (the same principle as negative indices). For example, if \(m_1 = 3\), then \(m_2 = -\frac{1}{3}\). If \(m_1 = -\frac{2}{5}\), then \(m_2 = \frac{5}{2}\).
Find the equation of the line perpendicular to \(y = 2x - 1\) that passes through \((4, 5)\).
The gradient of \(y = 2x - 1\) is 2. The perpendicular gradient is \(-\frac{1}{2}\).
Show that \(y = 4x + 1\) and \(2y + \frac{1}{2}x = 3\) are perpendicular.
Rearrange the second equation:
\[\begin{aligned}2y &= -\tfrac{1}{2}x + 3 \\[4pt] y &= -\tfrac{1}{4}x + \tfrac{3}{2}\end{aligned}\]Gradient of line 1: \(m_1 = 4\). Gradient of line 2: \(m_2 = -\frac{1}{4}\).
\[m_1 \times m_2 = 4 \times \left(-\tfrac{1}{4}\right) = -1\]Since the product is \(-1\), the lines are perpendicular.
Horizontal and vertical lines
Horizontal lines have the equation \(y = c\) (gradient = 0). Every point on the line has the same y-coordinate.
Vertical lines have the equation \(x = k\). Every point on the line has the same x-coordinate. Vertical lines do not have a gradient (it is undefined).
Exam-style questions
A straight line has a gradient of \(-3\) and passes through the point \((0, 7)\). Write down the equation of the line.
Show solution
The point \((0, 7)\) is on the y-axis, so \(c = 7\).
\[y = -3x + 7\]Find the equation of the line shown on the grid below.
Show solution
The line crosses the y-axis at \(-1\), so \(c = -1\).
Using the points \((0, -1)\) and \((2, 2)\):
\[m = \frac{2 - (-1)}{2 - 0} = \frac{3}{2}\]Equation: \(y = \frac{3}{2}x - 1\).
Line \(L\) has equation \(y = 4x - 5\). Find the equation of the line parallel to \(L\) that passes through \((1, 2)\).
Show solution
Parallel means same gradient: \(m = 4\).
\[\begin{aligned}2 &= 4(1) + c \\[4pt] c &= -2\end{aligned}\]Equation: \(y = 4x - 2\).
Line \(L\) has equation \(3x + 6y = 12\). Find the equation of the line perpendicular to \(L\) that passes through \((4, 1)\).
Show solution
Gradient of \(L\): \(m = -\frac{1}{2}\).
Negative reciprocal: \(m = 2\).
Equation: \(y = 2x - 7\).
The points \(A = (2, 8)\) and \(B = (6, 4)\) are given. Find the equation of the perpendicular bisector of \(AB\).
Show solution
Negative reciprocal of \(-1\) is \(1\).
Equation: \(y = x + 2\)
Common mistakes
The gradient is \(\frac{y_2 - y_1}{x_2 - x_1}\), not \(\frac{x_2 - x_1}{y_2 - y_1}\). The \(y\) change goes on top. Remember: rise (vertical) over run (horizontal).
The gradient formula uses subtraction: \(\frac{y_2 - y_1}{x_2 - x_1}\). The midpoint formula uses addition and divides by 2: \(\left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}\right)\). Students often mix these up under exam pressure — subtracting when they should add, or dividing by 2 in the gradient formula.
When subtracting negative coordinates, be careful. \(\frac{-3 - 5}{3 - (-1)} = \frac{-8}{4}\), not \(\frac{-8}{2}\). Show your working so you can spot where a sign goes wrong.
The perpendicular gradient is the negative reciprocal, not just the negative. If the gradient is 3, the perpendicular gradient is \(-\frac{1}{3}\), not \(-3\). You must flip the fraction and change the sign.
Need help with straight line graphs?
I teach IGCSE Maths one-to-one online. Book a free chat and we can work on the areas you find most challenging.
Book a Free Chat