← All notesMaths AI · Composites, transformations and linearising data⬇ Download PDF
IB DP Maths AI · Topic 2 Functions · AHL 2.7, 2.8, 2.10 · ~7 min read

Composites, transformations and linearising data

HL functions for Maths AI: composite functions, inverses with restricted domains, translations, stretches and reflections of graphs, and linearising data with semi-log and log-log graphs to decide between exponential and power models and find their parameters.

Composite functionsInverse functions & restricted domainsTranslationsStretchesReflectionsCombined transformationsLog scalesSemi-log graphs (exponential models)
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

  • Composite: (f ∘ g)(x) = f(g(x)) means "do g first, then f". Order matters.
  • Inverse: f−1 exists only if f is one-to-one. If it isn't, restrict the domain (for example to x ≥ the vertex).
  • Transformations: y = af(b(x − c)) + d stretches vertically by a, horizontally by 1b, moves c right and d up.
  • Linearising data: if ln y against x is a straight line, the model is exponential y = kax. If log y against log x is a straight line, the model is a power y = axn.
  • This note is HL only and unchanged for 2029.

By the end you can

  • Form composite functions and use them in context. HL
  • Find inverse functions, restricting the domain where necessary. HL
  • Apply and describe translations, stretches and reflections, including combinations. HL
  • Use logarithms to linearise data, choose between exponential and power models, and find their parameters. HL

1Composite functions HL

  • Context: a shop converts a price in dollars to euros with g(x) = 0.92x, then adds a 5% fee with f(x) = 1.05x. The final price is (f ∘ g)(x) = 1.05(0.92x) = 0.966x.
Worked example

f(x) = 2x + 1 and g(x) = x2. Find (f ∘ g)(x), (g ∘ f)(x) and (f ∘ g)(3).

  1. (f ∘ g)(x) = 2x2 + 1 A1
  2. (g ∘ f)(x) = (2x + 1)2 A1
  3. (f ∘ g)(3) = 2(9) + 1 = 19 A1
Common mistakeReading f ∘ g as "f first". The function next to x acts first: in f(g(x)), g goes first.

2Inverse functions and restricted domains HL

  • (f ∘ f−1)(x) = (f−1 ∘ f)(x) = x. The domain of f−1 is the range of f.
Worked example

f(x) = (x − 1)2 + 2. Find the largest domain of the form x ≥ k for which f−1 exists, and find f−1(x).

  1. the vertex is at x = 1, so x ≥ 1 A1
  2. x = (y − 1)2 + 2 ⇒ y = 1 + √(x − 2) (positive root, since y ≥ 1) M1
  3. f−1(x) = 1 + √(x − 2), x ≥ 2 A1

3Transformations of graphs HL

TransformationEffect on (x, y)
y = f(x) + dtranslation (0, d): (x, y + d)
y = f(x − c)translation (c, 0): (x + c, y)
y = af(x)vertical stretch, factor a: (x, ay)
y = f(bx)horizontal stretch, factor 1/b: (x/b, y)
y = −f(x)reflection in the x-axis: (x, −y)
y = f(−x)reflection in the y-axis: (−x, y)
Worked example

The point (4, 6) lies on y = f(x). Find its image on y = 3f(2x) − 1.

  1. x: 2x = 4 ⇒ x = 2 M1
  2. y: 3 × 6 − 1 = 17 M1
  3. (2, 17) A1
Worked example

Describe the transformations that map y = x2 onto y = 2(x − 3)2 + 5.

  1. translation 3 right A1
  2. vertical stretch, scale factor 2 A1
  3. translation 5 up (after the stretch) A1
  • In context: converting °C to °F, F = 1.8C + 32, is a vertical stretch by 1.8 followed by a translation of 32. A temperature model T(t) in °C becomes 1.8T(t) + 32 in °F.
Exam tipInside the bracket the change works "backwards": f(x − 3) moves right, f(2x) squashes towards the y-axis. Outside the bracket it works as you'd expect.

4Linearising data with logarithms HL

  • Exponential: y = kax ⇒ ln y = ln k + x ln a. Plot ln y against x: gradient ln a, intercept ln k.
  • Power: y = axn ⇒ log y = log a + n log x. Plot log y against log x: gradient n, intercept log a.
xln y1234512345ln y = 1.2 + 0.3xstraight line on (x, ln y)⇒ y = e^1.2 × e^(0.3x)y = 3.32e^(0.3x)an exponential model
A semi-log graph: when ln y against x is straight, the data is exponential.
Worked example

A line of best fit for ln y against x is ln y = 1.2 + 0.3x. Find the model for y.

  1. y = e1.2 + 0.3x = e1.2 × e0.3x M1
  2. y = 3.32e0.3x (or y = 3.32 × 1.35x) A1
log xlog y0.20.40.60.81.00.511.522.5gradient 2 = power nintercept log 3straight on (log x, log y)⇒ y = ax^nhere y = 3x²
A log-log graph: when log y against log x is straight, the data follows a power law.
Worked example

Data: x = 1, 2, 4, 8 and y = 3, 12, 48, 192. Show that y = axn fits, and find a and n.

  1. log x: 0, 0.301, 0.602, 0.903; log y: 0.477, 1.08, 1.68, 2.28 M1
  2. these lie on a straight line with gradient 2 A1
  3. n = 2, intercept log a = 0.477 ⇒ a = 3, so y = 3x2 A1A1
  • Which one? Make both graphs, or check the data: equal steps in x giving equal ratios in y means exponential; doubling x multiplying y by a fixed amount (here × 4) means a power law.
GDC (calculator) methodUse exponential regression and power regression directly on the data, then compare R2. Or transform the lists (L3 = ln(L2)) and use linear regression on the new lists.
  • Log scales on axes: when data spans many powers of ten (populations of countries, earthquake energy), plotting log y squeezes the range so every point is visible.
Linking questionTransformations explain the parameters a, b, c, d in sinusoidal models (Modelling with functions). Linearising is how regression finds exponential and power models (Statistics, correlation and regression), and logarithms come from Exponents, logarithms and equations. For transformations with more algebra (HL modulus and reciprocal graphs), see Maths AA Transformations of graphs.
Idea for your IA / explorationTest Kepler's third law with published data for planets: plot log T against log r, find the gradient (it should be 1.5) and discuss the fit. Or decide whether the growth of a real social media account is exponential or a power law.

Test yourself — cover the answers first

Quick check

  1. HL f(x) = x + 3, g(x) = 2x. Find (g ∘ f)(1).
  2. HL Why does f(x) = x² on ℝ have no inverse?
  3. HL Describe y = f(x + 4).
  4. HL Describe y = f(x/2).
  5. HL What does a straight log-log graph with gradient −1 tell you?

Exam-style

  1. HL f(x) = ex − 2 and g(x) = 3x. Find (f ∘ g)−1(x).
  2. HL Plotting ln y against ln x gives a straight line through (0, 1.5) and (2, 4.5). Find a model for y.
Show answers
  1. 8
  2. it is not one-to-one
  3. translation 4 left
  4. horizontal stretch, factor 2
  5. y ∝ 1/x (inverse variation)
  6. (f ∘ g)(x) = e3x − 2
    x = e3y − 2 ⇒ 3y = ln(x + 2)
    (f ∘ g)−1(x) = ⅓ ln(x + 2), x > −2
  7. gradient = 3/2 = 1.5 and intercept 1.5
    ln y = 1.5 + 1.5 ln x
    y = e1.5x1.5 = 4.48x1.5
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.