← All notesMaths AI · Lines, functions and graphs⬇ Download PDF
IB DP Maths AI · Topic 2 Functions · SL 2.1–2.4 · ~6 min read

Lines, functions and graphs

Gradients and equations of straight lines, parallel and perpendicular lines, what a function is, domain and range, inverse functions as reflections, and using the GDC to find the key features of a graph: intercepts, maxima, minima, asymptotes and intersections.

Gradienty = mx + c and other formsParallel & perpendicular linesFunctions, domain & rangeInverse functionsKey features of graphsGDC zero, max, min & intersectAsymptotes
RSby Riyaz Sir
mentorriyaz.in
No tag = SL and HLHL ONLY HL students onlyFORMULA BOOKLET given in the examM1A1 how marks are awardedhighlight = comes up again and againTest yourself at the end

In 30 seconds

  • Gradient m = y2 − y1x2 − x1 is the rate of change. In context it has units: dollars per km, litres per minute.
  • Lines: y = mx + c, ax + by + d = 0 and y − y1 = m(x − x1). Parallel lines have equal gradients; perpendicular gradients multiply to −1.
  • A function gives exactly one output for each input. The domain is the set of inputs; the range is the set of outputs.
  • The inverse f−1 undoes f; its graph is the reflection of y = f(x) in the line y = x.
  • On the GDC: zero (roots), maximum, minimum and intersect give you every key feature. Copy coordinates to 3 s.f.

By the end you can

  • Find gradients and equations of lines, and interpret gradient and intercept in context.
  • Find equations of parallel and perpendicular lines.
  • Use function notation and find the domain and range of a function.
  • Understand inverse functions, find f−1(x) for simple functions and sketch it by reflection.
  • Sketch graphs from a GDC with their key features, and solve equations by finding intersections.

1Straight lines

m = y2 − y1x2 − x1 FORMULA BOOKLET
gradient
y = mx + c, ax + by + d = 0, y − y1 = m(x − x1) FORMULA BOOKLET
three forms of a line
Worked example

Find the equation of the line through (2, 5) and (6, 13).

  1. m = 13 − 56 − 2 = 2 A1
  2. y − 5 = 2(x − 2) M1
  3. y = 2x + 1 A1
Worked example

Find the line through (4, 1) perpendicular to y = 2x + 1. Give it in the form ax + by + d = 0.

  1. perpendicular gradient = −½ A1
  2. y − 1 = −½(x − 4) M1
  3. x + 2y − 6 = 0 A1
d (km)C ($)246810125101520intercept 3.5: fixed charge+2.4 per 2 km(10, 15.5)C = 3.5 + 1.2dgradient 1.2 = $ per km
In a linear model, the intercept is the starting (fixed) value and the gradient is the rate.
Worked example

A taxi charges C = 3.5 + 1.2d dollars for d km. Interpret 3.5 and 1.2, and find the distance for a $15.50 fare.

  1. 3.5: the fixed charge in dollars, before any distance R1
  2. 1.2: the cost in dollars per km R1
  3. 15.5 = 3.5 + 1.2d ⇒ d = 10 km A1
Common mistakeSaying "the gradient is 1.2" without context. In AI the interpretation mark needs units and meaning: "the fare increases by $1.20 for every extra km".

2Functions, domain and range

  • Notation: f(x) = 3x − 5 means "f takes x, multiplies by 3, subtracts 5". f(4) = 7.
  • Domain in context: a model for the height of a ball only makes sense from launch until it lands. A model for the number of people can't have negative values.
f(x)DomainRange
3x − 5x ∈ ℝf(x) ∈ ℝ
√(x − 2) + 1x ≥ 2f(x) ≥ 1
200x + 4x ≠ −4f(x) ≠ 0
x2 − 3x ∈ ℝf(x) ≥ −3
GDC (calculator) methodFor the range, graph the function on its domain and look for the lowest and highest y-values (minimum, maximum or end points), and for any asymptote the curve gets close to but never reaches.

3Inverse functions

  • f−1 reverses f: if f(2) = 9 then f−1(9) = 2. Domain and range swap.
  • Finding it: write y = f(x), swap x and y, then make y the subject.
Worked example

f(x) = 3x − 5. Find f−1(x) and f−1(10).

  1. x = 3y − 5 M1
  2. f−1(x) = x + 53 A1
  3. f−1(10) = 5 A1
  • In context: the inverse of C = 3.5 + 1.2d is d = C − 3.51.2: it turns a fare back into a distance.
Exam tipOn a graph, (a, b) on f means (b, a) on f−1. Sketch y = x first, then reflect key points.

4Key features of graphs

xy(−1, −2)min (0, −3)−1.731.73(3, 6)blue: y = x² − 3red: y = 2xGDC: zero, min,max, intersect
Every key feature on this graph comes from one GDC tool.
  • Key features to label on a sketch: intercepts with both axes, maximum and minimum points, asymptotes (as dashed lines with equations), and end points of the domain.
Worked example

Solve x2 − 3 = 2x using the GDC.

  1. graph y = x2 − 3 and y = 2x and use intersect M1
  2. x = −1 or x = 3 A1A1
Worked example

The function f(x) = 200x + 4 has domain x ≥ 0. State the equations of its asymptotes and its range.

  1. vertical asymptote x = −4 (outside the domain), horizontal asymptote y = 0 A1
  2. f(0) = 50, and f decreases towards 0 R1
  3. range 0 < f(x) ≤ 50 A1
Common mistakeCopying the GDC's default window. Change the window so every key feature you need is on screen, then sketch with labelled axes and coordinates.
Linking questionLinear functions are the simplest models in Modelling with functions, and the line of best fit in Statistics, correlation and regression uses exactly the same y = mx + c. For the algebra of functions and inverses in Maths AA, see Functions, inverses and composites.
Idea for your IA / explorationFit a linear model to real data you collect (phone battery over time, price against size), and explain what the gradient and intercept mean in the context and over what domain the model is valid.

Test yourself — cover the answers first

Quick check

  1. Find the gradient between (−1, 4) and (3, −4).
  2. Find the gradient of a line perpendicular to y = −3x + 2.
  3. State the domain of f(x) = 1/(x − 5).
  4. f(x) = 2x + 7. Find f−1(x).
  5. Which line is y = f−1(x) a reflection of y = f(x) in?

Exam-style

  1. A phone plan costs $12 a month plus $0.05 per minute. Write a model for the monthly cost C in terms of minutes m, find the cost for 300 minutes, and find m when C = $30.
  2. Find the coordinates of the points where y = x3 − 4x meets y = x + 2.
Show answers
  1. −2
  2. ⅓
  3. x ≠ 5
  4. (x − 7)/2
  5. y = x
  6. C = 12 + 0.05m
    C(300) = $27
    30 = 12 + 0.05m ⇒ m = 360 minutes
  7. graph both and use intersect
    (−2, 0), (−0.414, 1.59), (2.41, 4.41)
Stuck on a question?

Send it to me on WhatsApp. I read every message.

Want regular help? Send this to your parent →
Share with a friendAsk Riyaz Sir

Independent notes written by Riyaz Sir. Not produced, endorsed or approved by the International Baccalaureate Organization. Syllabus codes refer to the IB DP subject guides.