IB MATHEMATICS: ANALYSIS AND APPROACHES • FUNCTIONS

Linear Functions — SL 2.1 Linear functions and equations of a line

Master the equations, graphs, and applications of the most fundamental relationship in mathematics.

Historical Context & Motivation

The idea that two quantities can change at a constant rate relative to each other is one of the oldest and most powerful concepts in mathematics. Ancient civilizations noticed linear relationships everywhere — from the proportional exchange rates in trade to the predictable motion of shadows across sundials. Long before anyone wrote y = mx + b, merchants, architects, and astronomers relied on the principle that equal changes in one quantity produce equal changes in another.

The formal study of lines grew alongside the development of coordinate geometry, which unified algebra and geometry into a single framework. This fusion allowed mathematicians to describe geometric shapes with equations, and equations with geometric shapes — a breakthrough that underpins nearly every branch of modern science and engineering.

~300 BCE
Euclid's Elements
Euclid formalized the geometry of lines, angles, and parallel lines in his Elements, establishing foundational properties still used today — but without any algebraic notation.
1637
Descartes Invents Coordinate Geometry
René Descartes published La Géométrie, introducing the Cartesian plane. For the first time, points could be described by ordered pairs (x, y), and geometric shapes could be represented as algebraic equations.
1748
Euler Formalizes Function Notation
Leonhard Euler popularized the notation f(x) and systematically studied linear equations of the form y = ax + b, treating them as functions that map each input to exactly one output.
1800s–Present
Linear Models in Science & Data
Linear functions became the backbone of physics (constant velocity), economics (supply and demand), and statistics (lines of best fit). Today, linear algebra powers machine learning and computer graphics.

The central question of SL 2.1 is this: how do we precisely describe, graph, and manipulate the equation of a straight line? By the end of this lesson, you will be able to move fluently between different forms of a linear equation, calculate slopes and intercepts, and apply these skills to real-world problems.

Core Principles & Definitions

A linear function is a function whose graph is a straight line. It has the general form f(x) = mx + c, where m and c are constants. The defining feature of a linear function is its constant rate of change — for every unit increase in x, the output changes by exactly the same amount. This predictability is what makes linear functions so useful in modeling real-world situations.

1

Gradient (Slope)

The gradient (m) measures the steepness and direction of a line. It is calculated as the ratio of the vertical change (rise) to the horizontal change (run) between any two points on the line.
2

y-Intercept

The y-intercept (c) is the point where the line crosses the y-axis. It represents the output value when x = 0, giving you the starting value of the function.
3

x-Intercept

The x-intercept is the point where the line crosses the x-axis, meaning y = 0. It can be found by setting f(x) = 0 and solving for x, giving x = −c/m.
4

Domain & Range

For a linear function (with m ≠ 0), the domain and range are both all real numbers (ℝ). The line extends infinitely in both directions.
5

Parallel & Perpendicular Lines

Two lines are parallel if they share the same gradient (m₁ = m₂). They are perpendicular if the product of their gradients equals −1 (m₁ × m₂ = −1).
KEY TAKEAWAY
Think of a linear function like driving on a highway at cruise control. Your speed (the gradient) stays constant — if you travel at 80 km/h, you cover exactly 80 km every hour, no more, no less. The y-intercept is like the distance you had already covered before you started timing. The equation y = 80x + 20 would mean you were already 20 km along when you began your clock, and you add 80 km for each hour after that.

Visual Explanation — Anatomy of a Linear Graph

The diagram below shows the graph of the linear function f(x) = 2x + 3, annotated with all the key features you need to identify in SL 2.1. Study how the gradient, y-intercept, and x-intercept appear visually on the Cartesian plane.

The graph of f(x) = 2x + 3 on the Cartesian plane. The y-intercept at (0, 3) is marked in purple, the x-intercept at (−1.5, 0) is in pink, and the rise-over-run triangle is shown in amber, illustrating how the gradient of 2 means the line rises 2 units for every 1 unit to the right.

Notice how the rise-over-run triangle can be drawn between any two points on the line and will always produce the same gradient value. This is the defining property of a linear function — the rate of change is constant everywhere. The y-intercept tells you where the line crosses the vertical axis, which corresponds to the value of c in the equation y = mx + c. Meanwhile, the x-intercept represents the input value where the output equals zero.

Mathematical Framework

In the IB syllabus, you need to be comfortable with several forms of linear equations and the formulas that connect them. Each form is useful in different situations, and converting between them is a core skill.

GRADIENT FORMULA
m = (y₂ − y₁) / (x₂ − x₁)
where (x₁, y₁) and (x₂, y₂) are any two distinct points on the line. The gradient m tells you how many units y changes for each one-unit increase in x. A positive m means the line rises from left to right; a negative m means it falls.
GRADIENT-INTERCEPT FORM
y = mx + c
where m is the gradient and c is the y-intercept. This is the most common form in IB Mathematics. It immediately tells you the slope and where the line crosses the y-axis.
POINT-GRADIENT FORM
y − y₁ = m(x − x₁)
where m is the gradient and (x₁, y₁) is any known point on the line. This form is especially useful when you know the slope and one point but not the y-intercept directly.
GENERAL FORM
ax + by + d = 0
where a, b, and d are integers (with a ≥ 0 by convention). This form is symmetric in x and y and is useful for certain algebraic manipulations. The gradient is −a/b and the y-intercept is −d/b.
📌 IB Notation Note
The IB uses c for the y-intercept (y = mx + c), while many textbooks use b (y = mx + b). The IB also prefers the term gradient over "slope." Be aware of these differences when consulting different resources.

Two important relationships between lines appear frequently in IB exam questions. Parallel lines have identical gradients (m₁ = m₂), meaning they never intersect. Perpendicular lines meet at right angles, and their gradients satisfy the condition m₁ × m₂ = −1. In other words, the gradient of the perpendicular line is the negative reciprocal of the original gradient.

Comparing Forms of Linear Equations

Choosing the right form of a linear equation depends on the information you are given and what you need to find. The diagram below compares the three main forms and shows how they relate to each other.

A comparison of the three main forms of a linear equation and how to convert between them. The gradient-intercept form is best for reading off the gradient and y-intercept, while the point-gradient form is the go-to when you know a point and a gradient.
Strategy guide for choosing the right form based on given information
Given InformationRecommended FormStrategy
Gradient and y-intercepty = mx + cSubstitute m and c directly
Gradient and one pointy − y₁ = m(x − x₁)Plug in m and the point coordinates
Two pointsGradient formula → point-gradientCalculate m first, then use either point
Parallel to a given line, through a pointy − y₁ = m(x − x₁)Use same gradient as the given line
Perpendicular to a given line, through a pointy − y₁ = m(x − x₁)Use m = −1/m₁ (negative reciprocal)

Worked Example

Let's work through a typical IB-style problem that combines several of the skills from this lesson.

📝 Problem
Line L₁ passes through the points A(−1, 4) and B(3, −2). Find: (a) the gradient of L₁, (b) the equation of L₁ in the form y = mx + c, and (c) the equation of line L₂ that is perpendicular to L₁ and passes through the point C(2, 5).
Full Solution
1
Step 1 — Find the gradient of L₁Using the gradient formula with A(−1, 4) and B(3, −2): m = (y₂ − y₁) / (x₂ − x₁) = (−2 − 4) / (3 − (−1)) = (−6) / (4) = −3/2. The negative value tells us the line falls from left to right.
m = −3/2
2
Step 2 — Write the equation of L₁ using point-gradient formUsing point A(−1, 4) and m = −3/2: y − 4 = −3/2 × (x − (−1)), which gives y − 4 = −3/2 × (x + 1). Expanding: y − 4 = −3x/2 − 3/2. Adding 4 to both sides: y = −3x/2 − 3/2 + 4 = −3x/2 + 5/2.
y = −(3/2)x + 5/2
3
Step 3 — Find the gradient of L₂ (perpendicular to L₁)For perpendicular lines, m₁ × m₂ = −1. Since m₁ = −3/2, we solve: (−3/2) × m₂ = −1, so m₂ = −1 / (−3/2) = 2/3. The perpendicular gradient is the negative reciprocal of the original.
m₂ = 2/3
4
Step 4 — Write the equation of L₂Using point C(2, 5) and m₂ = 2/3 in point-gradient form: y − 5 = (2/3)(x − 2). Expanding: y − 5 = 2x/3 − 4/3. Adding 5 to both sides: y = 2x/3 − 4/3 + 15/3 = 2x/3 + 11/3.
y = (2/3)x + 11/3
5
Step 5 — VerifyCheck that m₁ × m₂ = (−3/2) × (2/3) = −1 ✓. Check that C(2, 5) lies on L₂: y = (2/3)(2) + 11/3 = 4/3 + 11/3 = 15/3 = 5 ✓. Both conditions are satisfied.
Both checks pass ✓

Strengths & Limitations of Linear Models

Linear functions are powerful tools, but they are not always the right model for every real-world situation. Understanding when a linear model is appropriate — and when it breaks down — is a crucial part of mathematical literacy in the IB.

When linear models work well and when they don't
StrengthsLimitations
Simple and easy to work with algebraicallyCannot model curves, exponential growth, or cyclical behaviour
Only two parameters (m and c) needed to define the functionAssumes a constant rate of change, which rarely holds indefinitely
Easy to interpret: gradient = rate, intercept = starting valueExtrapolation outside the data range can be unreliable
Excellent for approximating other functions over small intervalsCan oversimplify complex systems with multiple influencing factors
Foundation for more complex models (piecewise, regression)Does not capture maximum/minimum turning points
KEY TAKEAWAY
A linear model is like using a straight ruler to trace a curved road on a map. For short sections, the ruler does an excellent job — the road looks almost straight. But over a long distance, the curve becomes obvious and the ruler fails. In the IB, always ask yourself: does the situation involve a constant rate of change? If yes, reach for a linear model. If not, consider quadratics, exponentials, or other function families.

Connection to Advanced Topics

The concepts you learn in SL 2.1 are not an isolated topic — they serve as the foundation for many advanced areas of the IB Mathematics course and beyond. The gradient of a line, for example, is the seed of the derivative in calculus. The idea of finding where two lines intersect connects directly to solving systems of equations.

How SL 2.1 connects to the broader IB curriculum
SL 2.1 ConceptWhere It LeadsIB Topic
Gradient (constant rate of change)Derivative as the instantaneous rate of changeSL 5.1–5.4 (Calculus)
Equation of a lineTangent lines to curves, linear approximationSL 5.4 (Tangents & Normals)
Intersection of two linesSystems of linear equations, matricesSL 1.8 (Systems of Equations)
Linear function f(x) = mx + cQuadratic, polynomial, and rational functionsSL 2.2–2.7 (Functions)
Line of best fit (informal)Regression lines, correlation, r-valuesSL 4.4 (Statistics)

When you eventually study calculus, you will discover that the gradient of a curve at any point is found by zooming in until the curve looks like a straight line — and then calculating the gradient of that line. This means every skill you build now with linear functions will transfer directly to more advanced work. Mastering the basics here pays dividends throughout the rest of the course.

Practice Problems

Test your understanding with these five problems. They progress from conceptual reasoning to multi-step applications. Try each one on paper before checking the answer.

PROBLEM 1CONCEPTUAL
Explain why a horizontal line has a gradient of 0, while a vertical line has an undefined gradient. Use the gradient formula in your reasoning.
PROBLEM 2BASIC CALCULATION
Find the equation of the line passing through the points (2, 7) and (6, −1). Give your answer in the form y = mx + c.
PROBLEM 3INTERMEDIATE
Line L₁ has the equation 3x − 2y + 8 = 0. Find the equation of the line L₂ that is perpendicular to L₁ and passes through the point (−4, 1). Give your answer in general form.
PROBLEM 4APPLIED
A phone plan charges a fixed monthly fee plus a per-minute rate for calls. In January, Ayla made 120 minutes of calls and was charged €38. In February, she made 200 minutes and was charged €54. Find the fixed monthly fee and the cost per minute. Write a linear function C(t) that gives the total charge in euros for t minutes of calls.
PROBLEM 5CRITICAL THINKING
Triangle PQR has vertices P(1, 5), Q(7, 3), and R(3, −1). Find the equation of the perpendicular bisector of side PQ. Explain why the perpendicular bisectors of all three sides of a triangle intersect at a single point (you do not need to find this point).

Summary & Key Concepts

A linear function has a constant rate of change and produces a straight-line graph. The gradient (m) measures the steepness and direction of the line, calculated as m = (y₂ − y₁) / (x₂ − x₁). The three essential forms are gradient-intercept form y = mx + c, point-gradient form y − y₁ = m(x − x₁), and general form ax + by + d = 0. Choose the form that best matches the information you are given.

Parallel lines share the same gradient (m₁ = m₂), while perpendicular lines have gradients whose product is −1 (m₁ × m₂ = −1). The y-intercept is where the line crosses the y-axis (x = 0), and the x-intercept is where it crosses the x-axis (y = 0). These skills form the foundation for calculus, systems of equations, and statistical regression throughout the IB course.

Varsity Tutors • IB Mathematics: Analysis and Approaches • Linear Functions — SL 2.1 Linear functions and equations of a line