Skip to main content
\( \definecolor{colordef}{RGB}{249,49,84} \definecolor{colorprop}{RGB}{18,102,241} \)
International Baccalaureate · MYP 3

Straight-Line Graphs

⌚ ~106 min ▢ 11 blocks ✓ 60 exercises ➣ Prerequisites : Linear Equations, Ratio, Rates and Speed, Coordinates and Straight-Line Graphs
I Equations of Lines
I.1 Recognising the Equation \(y \equal mx + c\)
The equation of a line is usually written in a standard shape, so that its important numbers are easy to spot. In the next definition, the two numbers \(m\) and \(c\) each have a geometric meaning. Here it is enough to recognise them in the equation: \(m\) is the number that multiplies \(x\), and \(c\) is the number that stands alone.
Report an error
Definition — Gradient-Intercept Form
The gradient-intercept form (also called the slope-intercept form) of a non-vertical line's equation is:$$y = mx + c$$ where \(m\) is the gradient (also called the slope) and \(c\) is the \(y\)-intercept.
  • The gradient \(m\) tells us how much \(y\) changes when \(x\) increases by \(1\).
  • The \(y\)-intercept \(c\) is the value of \(y\) when \(x = 0\): the line crosses the \(y\)-axis at the point \((0, c)\).
Example
Figure
This line has gradient \(m=-2\) and \(y\)-intercept \(c=1\).
When \(c = 0\), the equation becomes \(y = mx\): then \(y\) is proportional to \(x\), and \(m\) is the proportionality coefficient. Proportional situations are exactly the ones whose graphs are non-vertical lines through the origin.
Report an error
Skills to practice
  • Reading m and c in an Equation
I.2 Measuring the Slope of a Line

The gradient (also called the slope) of a line describes its direction and steepness. It is a number that tells us how much the \(y\)-coordinate of a point on the line changes when the \(x\)-coordinate increases by \(1\) unit.
  • A positive gradient indicates that the line goes up (ascends) as you move to the right.
    Figure
  • A negative gradient indicates that the line goes down (descends) as you move to the right.
    Figure
  • A gradient of zero means the line is horizontal: as you move to the right, there is no vertical change.
    Figure

Definition — Gradient
The gradient (also called the slope) of a non-vertical line is defined as the ratio of the change in the vertical direction (\(\Delta y\)) to the change in the horizontal direction (\(\Delta x\)), for any two distinct points on the line. This ratio is the same no matter which two points on the line we choose:$$\text{gradient} = \dfrac{\textcolor{colorprop}{\Delta y}}{\textcolor{colordef}{\Delta x}} = \dfrac{\textcolor{colorprop}{\text{vertical change}}}{\textcolor{colordef}{\text{horizontal change}}}, \quad \text{where } \textcolor{colordef}{\Delta x} \neq 0$$
Figure
For a vertical line, the horizontal change \(\Delta x\) is always zero, so the gradient is undefined.
In the special case where \(x\) increases by exactly \(1\) — that is, \(\Delta x = 1\) — the gradient is simply \(\Delta y\): the gradient tells how much \(y\) changes for one unit step in \(x\).
Figure
Example
Figure
Find the gradient of the line.

Figure
$$\begin{aligned}[t]\text{gradient} &= \frac{\textcolor{colorprop}{\Delta y}}{\textcolor{colordef}{\Delta x}}\\ &= \frac{\textcolor{colorprop}{2}}{\textcolor{colordef}{1}}\\ &= 2\end{aligned}$$

Skills to practice
  • Finding Slopes of Lines
I.3 Reading the y-Intercept
Definition — \(y\)-Intercept
The \(y\)-intercept is the value of \(y\) where the graph crosses the \(y\)-axis (when \(x=0\)).
Example
Find the \(y\)-intercept.
Figure

Figure
The \(y\)-intercept is \(1\) because the graph crosses the \(y\)-axis at the point \((0,1)\).

Skills to practice
  • Reading the y-Intercept on a Graph
II Graphing Lines
II.1 Graphing a Line from Its Equation
Method — Graphing a Line Using Two Points
To graph a line given by \(y = mx + c\):
  1. Find the first point \((x_1, y_1)\):
    • Choose any convenient value for \(x_1\) (often an integer).
    • Substitute \(x_1\) into the equation to calculate \(y_1\).
  2. Find a second point \((x_2, y_2)\):
    • Choose a different value for \(x_2\).
    • Substitute \(x_2\) into the equation to calculate \(y_2\).
  3. Draw the line:
    • Plot both points on a graph.
    • Use a ruler to draw a straight line passing through both points.
Example
Graph the line \(y = -2x + 3\).

  • For \(\textcolor{colordef}{x} = \textcolor{colordef}{1}\),$$\begin{aligned}[t]\textcolor{colorprop}{y} &= -2 \times \textcolor{colordef}{1} + 3 \\ &= \textcolor{colorprop}{1}\end{aligned}$$
  • For \(\textcolor{colordef}{x} = \textcolor{colordef}{2}\),$$\begin{aligned}[t]\textcolor{colorprop}{y} &= -2 \times \textcolor{colordef}{2} + 3 \\ &= \textcolor{colorprop}{-1}\end{aligned}$$
  • So, the points \((\textcolor{colordef}{1}, \textcolor{colorprop}{1})\) and \((\textcolor{colordef}{2}, \textcolor{colorprop}{-1})\) are on the graph.
  • Figure

Method — Graphing a Line Using the \(y\)-Intercept and Slope
To graph a line \(y = mx + c\):
  1. Plot the \(y\)-intercept:
    • Mark the point \((0, c)\) on the graph.
  2. Use the gradient \(m\) to find a second point:
    • From \((0, c)\), move horizontally by a chosen amount \(\Delta x\) (for example, \(1\) or \(2\) units).
    • Then move vertically by \(\Delta y = m \cdot \Delta x\).
    • Mark the second point.
  3. Draw the line:
    • Draw a straight line passing through both points.
Example
Graph the line \(y = 2x - 1\).

  • The \(y\)-intercept is \(-1\), so plot the point \((0, -1)\).
  • The slope is \(2\): from \((0, -1)\), move \(1\) unit right (\(\Delta x = 1\)), then \(2\) units up (\(\Delta y = 2\)), to reach \((1, 1)\).
  • Draw the line through these two points.
  • Figure

Skills to practice
  • Matching Slopes, Equations and Graphs
  • Graphing Lines from Their Equations
II.2 Intercepts, Horizontal and Vertical Lines

A tank holds \(120\) litres of water. It is emptied through a tap at a constant rate: after \(x\) minutes, it holds \(y = 120 - 8x\) litres.
  1. How much water is in the tank at the start?
  2. After how many minutes is the tank empty?
  3. On the graph of \(y = 120 - 8x\), where can each of these two answers be read?

  1. At the start, \(x = 0\): \(y = 120 - 8 \times 0 = 120\). The tank holds \(120\) litres.
  2. The tank is empty when \(y = 0\): $$\begin{aligned}[t] 120 - 8x &= 0 \\ 120 &= 8x && \text{(add } 8x \text{ to both sides)} \\ x &= 15. && \text{(divide by } 8\text{)} \end{aligned}$$ The tank is empty after \(15\) minutes.
  3. The point \(S(0, 120)\) is where the line crosses the \(y\)-axis, and the point \(E(15, 0)\) is where it crosses the \(x\)-axis. Only the part of the line between them describes the tank, for \(x\) from \(0\) to \(15\).
    Figure
    These two points, where the line meets the axes, give its intercepts.


Definition — Axes Intercepts
When a line crosses the \(x\)-axis at one point, this point has \(y\)-coordinate \(0\), and its \(x\)-coordinate is the \(x\)-intercept of the line. When a line crosses the \(y\)-axis at one point, this point has \(x\)-coordinate \(0\), and its \(y\)-coordinate is the \(y\)-intercept of the line: for the line \(y = mx + c\), it is \(c\) (Definition “Slope-Intercept Form”).
Figure
This line has \(x\)-intercept \(3\) and \(y\)-intercept \(2\).
Method — Finding the Axes Intercepts
For a line that is neither horizontal nor vertical, given by its equation — in the form \(y = mx + c\) or in another form, such as \(3x + 4y = 12\):
  1. The \(y\)-intercept: replace \(x\) by \(0\) in the equation and compute \(y\). The line crosses the \(y\)-axis at the point \((0, y)\).
  2. The \(x\)-intercept: replace \(y\) by \(0\) in the equation and solve the equation obtained. The line crosses the \(x\)-axis at the point \((x, 0)\).
  3. To draw the line, plot these two points and join them with a ruler — unless they are the same point, the origin: a second point is then needed (for \(y = 4x\), for example, \(x = 1\) gives the point \((1, 4)\)).
Example
Find the axes intercepts of the line \(y = 2x - 6\), then draw the line.

For \(x = 0\): \(y = 2 \times 0 - 6 = -6\). The \(y\)-intercept is \(-6\): the line crosses the \(y\)-axis at \(B(0, -6)\).
For \(y = 0\): $$\begin{aligned}[t] 2x - 6 &= 0 \\ 2x &= 6 && \text{(add } 6\text{)} \\ x &= 3. && \text{(divide by } 2\text{)} \end{aligned}$$ The \(x\)-intercept is \(3\): the line crosses the \(x\)-axis at \(A(3, 0)\).
Figure

Example
Find the axes intercepts of the line with equation \(3x + 4y = 12\), then draw the line.

The equation does not need to be solved for \(y\) first.
For \(x = 0\): \(3 \times 0 + 4y = 12\), so \(4y = 12\) and \(y = 3\). The line crosses the \(y\)-axis at \(B(0, 3)\).
For \(y = 0\): \(3x + 4 \times 0 = 12\), so \(3x = 12\) and \(x = 4\). The line crosses the \(x\)-axis at \(A(4, 0)\).
Figure

Proposition — Horizontal and Vertical Lines
Let \(c\) and \(k\) be two numbers.
  • The horizontal line through the point \((0, c)\) has the equation \(y = c\): its points are exactly the points with \(y\)-coordinate \(c\). It is the line \(y = 0x + c\): its gradient is \(0\) and its \(y\)-intercept is \(c\).
  • The vertical line through the point \((k, 0)\) has the equation \(x = k\): its points are exactly the points with \(x\)-coordinate \(k\). It has no equation of the form \(y = mx + c\), and its gradient is undefined.
In particular, the \(x\)-axis has the equation \(y = 0\) and the \(y\)-axis has the equation \(x = 0\).
Figure

A point \(M(x, y)\) lies on the horizontal line through \((0, c)\) exactly when it is at the same height as \((0, c)\), that is when \(y = c\), whatever its \(x\)-coordinate. So \(y = c\) is true for every point of this line and only for them: it is the equation of the line. Written \(y = 0x + c\), it has the form \(y = mx + c\) with \(m = 0\) and \(c\) as \(y\)-intercept: when \(x\) increases by \(1\), \(y\) does not change.
In the same way, \(M(x, y)\) lies on the vertical line through \((k, 0)\) exactly when \(x = k\), whatever its \(y\)-coordinate: \(x = k\) is its equation. This line contains the points \((k, 0)\) and \((k, 1)\), which have the same \(x\)-coordinate and different \(y\)-coordinates, while an equation \(y = mx + c\) gives only one value of \(y\) for each value of \(x\): no equation of this form describes the line. Along it, \(x\) never increases, so no gradient can be measured.

Example
  1. Give an equation of the line through \(A(-1, 4)\) and \(B(5, 4)\).
  2. Give an equation of the line through \(C(2, -1)\) and \(D(2, 3)\).
  3. At which point do these two lines cross?

  1. \(A\) and \(B\) have the same \(y\)-coordinate, \(4\): the line \(\Line{AB}\) is horizontal, with equation \(y = 4\).
  2. \(C\) and \(D\) have the same \(x\)-coordinate, \(2\): the line \(\Line{CD}\) is vertical, with equation \(x = 2\).
  3. The crossing point lies on both lines: its \(x\)-coordinate is \(2\) and its \(y\)-coordinate is \(4\). It is the point \(P(2, 4)\).
Figure

Lines Without Two Intercepts
A horizontal line \(y = c\) with \(c \neq 0\) never meets the \(x\)-axis: it has no \(x\)-intercept. A vertical line \(x = k\) with \(k \neq 0\) never meets the \(y\)-axis: it has no \(y\)-intercept. The axes themselves, \(y = 0\) and \(x = 0\), meet an axis at every one of their points. This is why the Method “Finding the Axes Intercepts” concerns lines that are neither horizontal nor vertical.
Report an error
Method — Equation from the \(y\)-Intercept and One Other Point
A non-vertical line has an equation \(y = mx + c\). When the line crosses the \(y\)-axis at \((0, c)\) and passes through another point \((x_1, y_1)\), with \(x_1 \neq 0\):
  1. Read \(c\): it is the \(y\)-coordinate of the point on the \(y\)-axis.
  2. Substitute the coordinates of the other point in \(y = mx + c\): this gives an equation whose only unknown is \(m\).
  3. Solve this equation for \(m\).
  4. Write the equation \(y = mx + c\), and check it with the other point.
Example
Find the equation of each line.
  1. The line through \((0, 3)\) and \((2, 7)\).
  2. The line through \((0, 4)\) and \((6, 0)\).

  1. The line crosses the \(y\)-axis at \((0, 3)\), so \(c = 3\) and \(y = mx + 3\). The point \((2, 7)\) is on the line: $$\begin{aligned}[t] 7 &= m \times 2 + 3 && \text{(replace } x \text{ by } 2 \text{ and } y \text{ by } 7\text{)} \\ 4 &= 2m && \text{(subtract } 3\text{)} \\ m &= 2. && \text{(divide by } 2\text{)} \end{aligned}$$ The equation is \(y = 2x + 3\). Check: for \(x = 2\), \(2 \times 2 + 3 = 7\).
  2. \(c = 4\), so \(y = mx + 4\). The point \((6, 0)\) is on the line: $$\begin{aligned}[t] 0 &= m \times 6 + 4 && \text{(replace } x \text{ by } 6 \text{ and } y \text{ by } 0\text{)} \\ -4 &= 6m && \text{(subtract } 4\text{)} \\ m &= -\frac{4}{6} = -\frac{2}{3}. && \text{(divide by } 6\text{)} \end{aligned}$$ The equation is \(y = -\dfrac{2}{3}x + 4\). Check: for \(x = 6\), \(-\dfrac{2}{3} \times 6 + 4 = -4 + 4 = 0\). This line was given by its two intercepts, \(6\) and \(4\).

Skills to practice
  • Recognising Intercepts and Special Lines
  • Finding the Axes Intercepts
  • Using Horizontal and Vertical Lines and Finding an Equation
  • Explaining Intercepts and Finding Equations
III Going further
Skills to practice
  • Reasoning and Problem-Solving
  • Investigating Patterns in Straight Lines
  • Quiz