01 / 21

Linear Functions
Equations of a Line

Master the building blocks of algebra: slope, intercepts, and every form of the equation of a line you need for IB Mathematics.

IB Mathematics: Analysis and Approaches

What Is a Linear Function?

A linear function is a function whose graph is a straight line. It has the general form \( f(x) = mx + c \), where every input \( x \) maps to exactly one output. The key property: the rate of change between any two points is always constant.

\(x\) \(y\) \(1\) \(2\) \(3\) \(0\) \(2\) \(4\) \((0, 0.5)\) \(\text{run}\) \(\text{rise}\) \( y = 1.5x + 0.5 \)

The Gradient \( m \)

The gradient (slope) of a line passing through two points \( (x_1, y_1) \) and \( (x_2, y_2) \) is defined as:

Positive \( m \)
Line rises from left to right. As \( x \) increases, \( y \) increases.
Negative \( m \)
Line falls from left to right. As \( x \) increases, \( y \) decreases.
Zero \( m \)
Horizontal line. No change in \( y \) regardless of \( x \).

Intercepts: Where Lines Cross Axes

y-intercept \( (0, c) \)
Set \( x = 0 \) in the equation. The value of \( c \) in \( y = mx + c \) is the y-intercept.
x-intercept
Set \( y = 0 \) and solve for \( x \). This gives the point where the line crosses the x-axis.
\(x\) \(y\) \((0, 3)\) \((-1.5, 0)\) \( y = 2x + 3 \)

Slope-Intercept Form

This is the most common form in the IB syllabus. You can read off the gradient and y-intercept directly from the equation. Every linear function can be written in this form (except vertical lines).

1
\( m \) controls the steepness and direction of the line.
2
\( c \) shifts the line up or down along the y-axis.
3
Two lines with the same \( m \) but different \( c \) are parallel.

Point-Gradient Form

Use this form when you know one point and the gradient, or when you have already calculated \( m \) from two points. It is equivalent to slope-intercept form but often more convenient to write down first.

The General Form

The general form can represent every line, including vertical lines (where \( b = 0 \)). To convert to slope-intercept form, solve for \( y \):

Parallel vs Perpendicular Lines

Parallel Lines
Same gradient: \( m_1 = m_2 \). They never intersect and are always the same distance apart.
Perpendicular Lines
Gradients are negative reciprocals: \( m_1 \cdot m_2 = -1 \). They meet at right angles (\( 90^\circ \)).
\(x\) \(y\) \( y = x + 1 \) \( y = x - 2 \) \( y = -x + 2 \) Parallel: same slope Perpendicular: \( m_1 \cdot m_2 = -1 \)

How to Find the Equation

1
Identify what you know: Two points? A point and a gradient? A parallel/perpendicular line?
2
Calculate \( m \): Use \( m = \dfrac{y_2 - y_1}{x_2 - x_1} \) if given two points.
3
Substitute into a form: Use point-gradient \( y - y_1 = m(x - x_1) \) with one known point.
4
Simplify: Rearrange to \( y = mx + c \) or \( ax + by + d = 0 \) as required.
5
Check: Substitute your original point(s) back in to verify.

Example 1: Two Points

Find the equation of the line through \( A(1, 3) \) and \( B(4, 9) \).

1
Gradient: \( m = \dfrac{9 - 3}{4 - 1} = \dfrac{6}{3} = 2 \)
2
Point-gradient form using \( A(1,3) \): \( y - 3 = 2(x - 1) \)
3
Simplify: \( y = 2x + 1 \)

Example 2: Perpendicular Line

Find the equation of the line perpendicular to \( y = 3x - 4 \) passing through \( (6, 2) \).

1
Original gradient: \( m_1 = 3 \)
2
Perpendicular gradient: \( m_2 = -\dfrac{1}{m_1} = -\dfrac{1}{3} \)
3
Point-gradient: \( y - 2 = -\dfrac{1}{3}(x - 6) \)
4
Simplify: \( y = -\dfrac{1}{3}x + 4 \)

Example 3: General Form

Express the line through \( (-2, 5) \) and \( (3, -1) \) in the form \( ax + by + d = 0 \) where \( a, b, d \in \mathbb{Z} \).

1
Gradient: \( m = \dfrac{-1 - 5}{3 - (-2)} = \dfrac{-6}{5} \)
2
Point-gradient: \( y - 5 = -\dfrac{6}{5}(x + 2) \)
3
Multiply by 5: \( 5y - 25 = -6x - 12 \)
4
Rearrange: \( 6x + 5y - 13 = 0 \)

Visualising Different Gradients

\(x\) \(y\) \(1\) \(2\) \(3\) \(-1\) \(-2\) \(1\) \(2\) \(-1\) \( m = 2 \) \( m = 1 \) \( m = \frac{1}{2} \) \( m = 0 \) \( m = -1 \)

Intersection of Two Lines

To find where two lines meet, set their equations equal and solve. If \( y = m_1 x + c_1 \) and \( y = m_2 x + c_2 \), then:

Example: \( y = 2x + 1 \) and \( y = -x + 7 \):

Common Mistakes to Avoid

✕ Swapping Rise and Run
Writing \( m = \frac{x_2 - x_1}{y_2 - y_1} \) instead of \( m = \frac{y_2 - y_1}{x_2 - x_1} \). Remember: \( y \) difference on top.
✕ Sign Errors with Negatives
Forgetting that \( y_2 - y_1 \) when \( y_1 \) is negative becomes \( y_2 - (-y_1) = y_2 + y_1 \). Track your signs carefully.
✕ Perpendicular = Negative Slope
Using \( m_2 = -m_1 \) instead of \( m_2 = -\frac{1}{m_1} \). Perpendicular requires the negative reciprocal.

Forms at a Glance

Form Equation Best Used When
Slope-Intercept \( y = mx + c \) Reading off \( m \) and \( c \) directly
Point-Gradient \( y - y_1 = m(x - x_1) \) Given a point and gradient
General Form \( ax + by + d = 0 \) Integer coefficients needed; vertical lines
Two-Point \( \frac{y - y_1}{y_2 - y_1} = \frac{x - x_1}{x_2 - x_1} \) Given two points, single-step formula

Question 1 of 5

What is the gradient of the line passing through the points \( (2, -1) \) and \( (5, 8) \)?

Question 2 of 5

A line has the equation \( 3x - 2y + 8 = 0 \). What are the gradient and y-intercept?

Question 3 of 5

The line \( L_1 \) has gradient \( 4 \). What is the gradient of a line perpendicular to \( L_1 \)?

Question 4 of 5

Find the equation of the line passing through \( (3, -2) \) with gradient \( m = -5 \).

Question 5 of 5

Two lines \( y = 2x - 1 \) and \( y = -x + 5 \) intersect. What are the coordinates of the intersection?