# Linear functions and their graphs

> IB Mathematics: Analysis and Approaches SL · IB AA SL
> Source: https://www.owlsprep.com/study/ib-math-aa-sl-u2-linear-functions-and-their-graphs/

This module covers core properties of linear functions, their algebraic forms, key graph features, and relationships between parallel and perpendicular lines. You will learn to find line equations, sketch graphs, and solve common exam problems.

**Prerequisites:** Basic coordinate geometry; Algebraic manipulation of linear equations

## Learning objectives

- Convert between different algebraic forms of linear functions
- Calculate gradient and intercepts for lines from given information
- Find equations of lines parallel and perpendicular to a given line
- Model and solve real-world problems with linear relationships

## Core definitions and standard forms

**Linear function** — A first-order polynomial function that graphs to a straight line, where the highest power of the independent variable is 1.

*Notation:* $f(x) = mx + c$

*Example:* $f(x) = 3x - 2$ is linear; $f(x) = x^2 + 1$ is non-linear

Linear functions can be written in three common standard forms, each suited to different use cases:

- **Gradient-intercept form**: $y = mx + c$, used when you know gradient and y-intercept
- **Point-gradient form**: $y - y_1 = m(x - x_1)$, used when you know one point and gradient
- **General form**: $ax + by + d = 0$, where $a, b, d$ are integer constants

**Worked example:** Write $3y - 6x = 9$ in gradient-intercept form

1. Isolate the $y$ term on the left side by adding $6x$ to both sides:
2. $$3y = 6x + 9$$
3. Divide all terms by the coefficient of $y$ (which is 3):
4. $$y = 2x + 3$$
5. This is gradient-intercept form, with gradient $m=2$ and y-intercept $c=3$.

## Gradient, intercepts and graph sketching

The gradient of a line measures how much $y$ changes for every 1 unit change in $x$. It is calculated from any two points on the line.

**Gradient formula** — For two points $(x_1, y_1)$ and $(x_2, y_2)$ on a line, gradient is the ratio of vertical change to horizontal change.

*Notation:* $m = \frac{\Delta y}{\Delta x} = \frac{y_2 - y_1}{x_2 - x_1}$

> **tip**
>
> To sketch any linear graph, you only need two distinct points. The easiest points to find are usually the x-intercept (where $y=0$) and y-intercept (where $x=0$).

**Worked example:** Find the gradient of the line through $(2, 5)$ and $(5, 11)$, then find its x-intercept.

1. Label the points and substitute into the gradient formula:
2. $$m = \frac{11 - 5}{5 - 2} = \frac{6}{3} = 2$$
3. Use point-gradient form to find the full line equation:
4. $$y - 5 = 2(x - 2) \implies y = 2x + 1$$
5. Find x-intercept by setting $y=0$ and solving for $x$:
6. $$0 = 2x + 1 \implies x = -\frac{1}{2}$$
7. The x-intercept is at $\left(-\frac{1}{2}, 0\right)$.

## Parallel and perpendicular lines

There are simple rules relating the gradients of parallel and perpendicular lines, which are commonly tested in IB exams.

**Gradient rules for parallel/perpendicular lines** — If two lines have gradients $m_1$ and $m_2$: (1) Parallel lines: $m_1 = m_2$, (2) Perpendicular lines: $m_1 m_2 = -1$

*Example:* A line with gradient 4 is perpendicular to a line with gradient $-\frac{1}{4}$

> **Exam tip**
>
> Always check your answer for perpendicular lines by multiplying the two gradients to confirm they equal -1.

**Worked example:** Find the equation of the line through $(3, -2)$ that is perpendicular to $y = 3x + 1$.

1. The original line has gradient $m_1 = 3$. For a perpendicular line:
2. $$m_2 = -\frac{1}{m_1} = -\frac{1}{3}$$
3. Substitute the point $(3, -2)$ into point-gradient form:
4. $$y - (-2) = -\frac{1}{3}(x - 3)$$
5. Rearrange to gradient-intercept form:
6. $$y + 2 = -\frac{1}{3}x + 1 \implies y = -\frac{1}{3}x - 1$$

## Real-world applications of linear functions

Many real-world relationships with constant rates of change can be modeled with linear functions. In these problems, the gradient is the constant rate, and the intercept is the initial value when the input is zero.

**Worked example:** A coffee shop charges a fixed monthly subscription fee plus &#36;2 per coffee bought. If 15 coffees cost &#36;38 in a month, find the cost of 25 coffees.

1. Define variables: Let $C$ = total monthly cost, $n$ = number of coffees. The linear model is $C = mn + f$, where $f$ = fixed fee, $m$ = cost per coffee.
2. We know $m = 2$, substitute the given values to find $f$:
3. $$38 = 2(15) + f \implies 38 = 30 + f \implies f = 8$$
4. The full model is $C = 2n + 8$. Calculate cost for 25 coffees:
5. $$C = 2(25) + 8 = 50 + 8 = 58$$
6. The total cost for 25 coffees is &#36;58.

## Common pitfalls

- **Wrong:** Calculating gradient as $\frac{x_2 - x_1}{y_2 - y_1}$
  - Why it fails: Swapping numerator and denominator gives the reciprocal of the correct gradient
  - Correct: Always remember gradient is change in y over change in x: $m = \frac{\Delta y}{\Delta x}$
- **Wrong:** Reading gradient and intercept directly from general form without rearranging
  - Why it fails: The coefficients of $x$ and $y$ in general form are not the same as $m$ and $c$
  - Correct: Always rearrange general form to $y = mx + c$ before reading off gradient and intercept
- **Wrong:** Stating perpendicular lines have gradient $-m$ instead of $-\frac{1}{m}$
  - Why it fails: Confusing the negative sign with the requirement to take the reciprocal
  - Correct: Perpendicular gradients multiply to $-1$, so always take the negative reciprocal of the original gradient
- **Wrong:** Writing gradient 0 for a vertical line $x=k$
  - Why it fails: Confusing the properties of horizontal and vertical lines
  - Correct: Horizontal lines $y=k$ have gradient 0; vertical lines $x=k$ have undefined gradient
- **Wrong:** Mixing up input and output variables when calculating gradient for real-world problems
  - Why it fails: Swapping variables reverses the rate of change, leading to an incorrect gradient
  - Correct: Always explicitly define your variables at the start of the problem to avoid this mistake

## Cheatsheet

| Property | Rule/Formula | Note |
| --- | --- | --- |
| Gradient between two points | $m = \frac{y_2 - y_1}{x_2 - x_1}$ | Rise over run |
| Gradient-intercept form | $y = mx + c$ | $m$ = gradient, $c$ = y-intercept |
| Point-gradient form | $y - y_1 = m(x - x_1)$ | For known point + gradient |
| Parallel lines | $m_1 = m_2$ | Equal gradients |
| Perpendicular lines | $m_1 m_2 = -1$ | Negative reciprocal gradients |
| Horizontal line | $y = k$, $m=0$ | Parallel to x-axis |
| Vertical line | $x = k$, $m$ undefined | Parallel to y-axis |
| General form | $ax + by + c = 0$ | Rearrange to $y=mx+c$ to read values |

## What's next

Linear functions are the foundational building block for nearly all further topics in IB AA SL. The concept of constant rate of change for linear functions directly prepares you to study instantaneous rate of change for non-linear functions, which is the core idea of differential calculus. You will also apply linear functions to solve systems of linear equations, model bivariate data with linear regression in statistics, and solve kinematics problems involving constant speed or acceleration. Mastery of linear graphs and their properties is essential for interpreting and working with all other function types you will encounter, including quadratics, exponentials, and trigonometric functions.

- [Quadratic functions, roots and discriminant](https://www.owlsprep.com/study/ib-math-aa-sl-u2-quadratic-functions-roots-and-discriminant/)
- [Reciprocal and rational functions](https://www.owlsprep.com/study/ib-math-aa-sl-u2-reciprocal-and-rational-functions/)
- [Exponential and logarithmic functions and graphs](https://www.owlsprep.com/study/ib-math-aa-sl-u2-exponential-and-logarithmic-functions-and/)

---

From [OwlsPrep](https://www.owlsprep.com) — free study guides for A-Level, IB, AP and IGCSE, written against the official syllabus. Canonical page: https://www.owlsprep.com/study/ib-math-aa-sl-u2-linear-functions-and-their-graphs/
