HomeLearning HubIB Maths AATopic 2: Functions
Topic 2

Functions

Mathematics: Analysis and Approaches · 21 hours SL / 32 hours HL

🎯What you need to be able to do

  • Move between the three forms of the equation of a straight line, and use the parallel and perpendicular conditions.
  • Use the language of functions precisely: domain, range, image, graph, and function notation.
  • Find and use composite functions and inverse functions, and know when an inverse exists.
  • Work with quadratics in all three forms and read the right information off each.
  • Solve quadratic equations and inequalities, and use the discriminant to describe the roots.
  • Sketch the reciprocal and rational functions and state their asymptotes.
  • Recognise exponential and logarithmic graphs as inverses of one another.
  • Apply transformations to any graph, and know that the order matters.
  • AHL Use the factor and remainder theorems, and the sum and product of the roots of a polynomial.
  • AHL Sketch harder rational functions, including those with an oblique asymptote.
  • AHL Classify functions as odd, even or self-inverse, and restrict a domain to force an inverse.
  • AHL Solve inequalities and modulus equations graphically and algebraically.

📚The mathematics

2.1 Straight lines

\( y = mx + c \)
\( ax + by + d = 0 \)
\( y - y_1 = m(x - x_1) \)

Gradient–intercept form is the one to read a graph from; general form is the one exam questions like to state answers in; point–gradient form is the one to build a line with, because it needs only a point and a gradient and no rearranging.

Parallel lines have \( m_1 = m_2 \). Perpendicular lines have \( m_1 \times m_2 = -1 \), so the perpendicular gradient is the negative reciprocal: a gradient of \( \tfrac{3}{4} \) gives \( -\tfrac{4}{3} \). Flip and change sign — forgetting one of the two halves is the standard error.

2.2 The language of functions

A function assigns to each input exactly one output. The domain is the set of allowed inputs; the range is the set of outputs actually produced. Unless a question restricts it, the domain is the largest set for which the rule makes sense — which in practice means excluding whatever makes a denominator zero, a square root negative, or a logarithm non-positive.

Range is harder than domain because it depends on shape, so sketch first. For \( f(x) = x^2 - 4 \) the domain is all of \( \mathbb{R} \) but the range is \( f(x) \ge -4 \), and you only see that from the vertex.

An inverse function undoes the original: \( f^{-1}(f(x)) = x \). It exists only when \( f \) is one-to-one, so that no output comes from two different inputs — the horizontal line test. Geometrically the graph of \( f^{-1} \) is the reflection of \( f \) in the line \( y = x \), which is why the domain and range swap over: the domain of \( f^{-1} \) is the range of \( f \).

\( f^{-1}(x) \) is not \( \dfrac{1}{f(x)} \). The superscript \( -1 \) means “inverse function” here, not “reciprocal”. The same notation clash appears in trigonometry, where \( \sin^{-1}x \) means \( \arcsin x \) and not \( \csc x \).

2.3 & 2.4 Graphs and their key features

Know the difference between the command terms: sketch wants the general shape with the important features labelled; draw wants an accurate plot to scale with a ruler for straight lines. Either way, label the axes and mark the features you were asked for.

The features worth naming are the intercepts, the maximum and minimum points, the vertex, any axis of symmetry, the zeros of the function (which are the roots of the equation \( f(x) = 0 \)), and the vertical and horizontal asymptotes. To find where two curves meet, either solve simultaneously or use the intersection function on your calculator — but on Paper 1 you have no calculator, so solve.

2.5 Composite and inverse functions

\( (f \circ g)(x) = f(g(x)) \): the inner function \( g \) acts first, even though it is written second. Substitute the whole of \( g(x) \) into \( f \), brackets and all.

To find an inverse algebraically: write \( y = f(x) \), swap \( x \) and \( y \), and make \( y \) the subject. State the domain of the inverse explicitly if the question asks — it is the range of the original.

2.6 & 2.7 Quadratics

Three forms, each of which hands you something different for free:

  • \( f(x) = ax^{2} + bx + c \) — the \(y\)-intercept is \( (0, c) \), and the axis of symmetry is \( x = -\dfrac{b}{2a} \).
  • \( f(x) = a(x-p)(x-q) \) — the \(x\)-intercepts are \( (p,0) \) and \( (q,0) \), and the axis of symmetry sits midway between them at \( x = \dfrac{p+q}{2} \).
  • \( f(x) = a(x-h)^{2} + k \) — the vertex is \( (h,k) \). Note the sign: \( (x-3)^{2} \) puts the vertex at \( x = +3 \).

You are expected to convert between them: expand to go from factorised or vertex form to general form, factorise or complete the square to come back. The sign of \( a \) tells you which way the parabola opens.

The quadratic formula and the discriminant \( \Delta = b^{2} - 4ac \):

\[ x = \frac{-b \pm \sqrt{b^{2}-4ac}}{2a} \]
  • \( \Delta > 0 \): two distinct real roots — the curve crosses the \(x\)-axis twice.
  • \( \Delta = 0 \): two equal real roots — the curve touches the axis; the line is tangent.
  • \( \Delta < 0 \): no real roots — the curve misses the axis entirely.

Questions asking for the values of a parameter \(k\) that give a particular number of roots are discriminant questions in disguise, and they almost always end in a quadratic inequality in \(k\). Solve it by finding the critical values and then testing which region works, or sketch the parabola in \(k\) — do not just divide through by \(k\), because you do not know its sign.

2.8 Reciprocal and rational functions

\( f(x) = \dfrac{1}{x} \) is a hyperbola with the axes as its asymptotes, and it is self-inverse: reflecting it in \( y = x \) leaves it unchanged.

For \( f(x) = \dfrac{ax+b}{cx+d} \), the vertical asymptote is where the denominator vanishes, \( x = -\dfrac{d}{c} \), and the horizontal asymptote is \( y = \dfrac{a}{c} \), the ratio of the leading coefficients. A sketch should show both asymptotes as dashed lines and both intercepts.

2.9 Exponentials and logarithms

\( f(x) = a^{x} \) (with \( a > 0 \)) passes through \( (0,1) \), has the \(x\)-axis as a horizontal asymptote, and never takes a negative value. Its inverse \( f(x) = \log_a x \) passes through \( (1,0) \), has the \(y\)-axis as a vertical asymptote, and is only defined for \( x > 0 \). Each is the other reflected in \( y = x \), which is a fast way to recall which asymptote goes where.

The two relationships worth having automatic are \( a^{x} = \mathrm{e}^{x\ln a} \) and \( \log_a a^{x} = x \).

2.10 & 2.11 Solving equations, and transformations

Some equations yield to algebra — \( \mathrm{e}^{2x} - 5\mathrm{e}^{x} + 4 = 0 \) is a hidden quadratic in \( \mathrm{e}^{x} \), so substitute \( u = \mathrm{e}^{x} \), solve, and then undo the substitution. Others have no analytic route at all, such as \( \mathrm{e}^{x} = \sin x \), and are meant to be solved graphically with technology on Paper 2.

Transformations of \( y = f(x) \):

\( y = f(x) + b \) — up \(b\)
\( y = f(x-a) \) — right \(a\)
\( y = -f(x) \) — reflect in \(x\)-axis
\( y = f(-x) \) — reflect in \(y\)-axis
\( y = p\,f(x) \) — vertical stretch \(p\)
\( y = f(qx) \) — horizontal stretch \( \tfrac{1}{q} \)

Everything outside the function acts vertically and does what it says; everything inside acts horizontally and does the opposite of what it looks like. That single rule explains why \( f(x-3) \) moves the graph right and why \( f(2x) \) squashes it. For composite transformations the order matters — a stretch then a translation is not the same as the translation then the stretch.

AHL 2.12 Polynomials

The remainder theorem: dividing \( P(x) \) by \( (x-a) \) leaves remainder \( P(a) \). The factor theorem is the special case \( P(a) = 0 \iff (x-a) \) is a factor, and it is how you find the first root of a cubic before dividing down to a quadratic.

For \( \sum_{r=0}^{n} a_r x^{r} = 0 \), the sum of the roots is \( -\dfrac{a_{n-1}}{a_n} \) and the product is \( \dfrac{(-1)^{n}a_0}{a_n} \). These let you answer questions about roots without ever finding them — and they pair naturally with the conjugate-root fact from Topic 1.

AHL 2.13–2.16 Further functions

Rational functions of the form \( \dfrac{ax+b}{cx^{2}+dx+e} \) and \( \dfrac{ax^{2}+bx+c}{dx+e} \). The second type has an oblique asymptote: divide out to write it as a linear term plus a proper fraction, and the linear term is the asymptote.

A function is even if \( f(-x) = f(x) \) — symmetric about the \(y\)-axis — and odd if \( f(-x) = -f(x) \) — rotationally symmetric about the origin. Most functions are neither. A function is self-inverse if \( f^{-1} = f \), which shows up as symmetry in the line \( y = x \).

Restricting the domain can force an inverse to exist: \( f(x) = x^{2} \) has no inverse over \( \mathbb{R} \), but restricted to \( x \ge 0 \) it does.

For the graphs of \( |f(x)| \), \( f(|x|) \), \( \dfrac{1}{f(x)} \) and \( [f(x)]^{2} \), work from the original graph rather than from algebra: \( |f(x)| \) reflects anything below the \(x\)-axis upwards; \( f(|x|) \) keeps the right half and mirrors it to the left; \( \dfrac{1}{f(x)} \) turns zeros into vertical asymptotes and vice versa. For modulus equations, solving \( |g(x)| = k \) means solving both \( g(x) = k \) and \( g(x) = -k \), then checking each answer against the original.

✏️Worked example

Let \( f(x) = 2x - 5 \) and \( g(x) = \dfrac{x}{x-3},\ x \ne 3 \). (a) Find \( (f \circ g)(x) \) and state its domain. (b) Find \( f^{-1}(x) \). (c) The line \( y = kx - 1 \) is tangent to the curve \( y = x^{2} + 3x + 5 \). Find the possible values of \(k\).

(a) The inner function acts first, so substitute \( g \) into \( f \):

\[ (f \circ g)(x) = 2\left(\frac{x}{x-3}\right) - 5 = \frac{2x}{x-3} - 5 = \frac{2x - 5(x-3)}{x-3} = \frac{15 - 3x}{x-3} \]

The domain is inherited from \( g \): the composite is undefined wherever \( g \) is, so \( x \in \mathbb{R},\ x \ne 3 \). Simplifying the algebra does not un-break that point.

(b) Write \( y = 2x - 5 \), swap the letters to get \( x = 2y - 5 \), and make \( y \) the subject: \( f^{-1}(x) = \dfrac{x+5}{2} \).

(c) Tangency means the line meets the curve exactly once, so setting them equal must give a quadratic with a repeated root:

\[ x^{2} + 3x + 5 = kx - 1 \;\Longrightarrow\; x^{2} + (3-k)x + 6 = 0 \]

Tangent \( \Rightarrow \Delta = 0 \), so \( (3-k)^{2} - 4(1)(6) = 0 \), giving \( (3-k)^{2} = 24 \) and \( 3 - k = \pm 2\sqrt{6} \). Hence \( k = 3 \mp 2\sqrt{6} \), that is \( k = 3 + 2\sqrt{6} \) or \( k = 3 - 2\sqrt{6} \).

Check it. Two answers is what you should expect: a parabola has two tangent lines through most directions, one touching on each side. Numerically \( k \approx 7.90 \) or \( k \approx -1.90 \), symmetric about 3 — and 3 is exactly the gradient term in the original quadratic, which is a reassuring piece of structure rather than a coincidence.
“Tangent” means \( \Delta = 0 \), not \( \Delta \ge 0 \). Students who read “the line meets the curve” and set up an inequality lose the whole part. Read the geometry into the discriminant: meets twice is \( \Delta > 0 \), is tangent to or touches is \( \Delta = 0 \), and never meets is \( \Delta < 0 \). On Paper 1 leave the surd exact — do not convert to 7.90.

📝Practise

Work through these, then reveal the answer. Each question targets a different objective from the list above.

1. A line passes through \( (2, -1) \) and is perpendicular to \( 3x + 4y = 12 \). Find its equation in the form \( ax + by + d = 0 \).
Rearrange the given line: \( y = -\tfrac{3}{4}x + 3 \), so \( m = -\tfrac{3}{4} \). The perpendicular gradient is the negative reciprocal, \( \tfrac{4}{3} \). Using point–gradient form, \( y + 1 = \tfrac{4}{3}(x - 2) \). Multiply by 3: \( 3y + 3 = 4x - 8 \), so \( 4x - 3y - 11 = 0 \).
2. \( f(x) = \dfrac{2x+1}{x-4} \). State the domain and range, and the equations of both asymptotes.
The denominator vanishes at \( x = 4 \), so the domain is \( x \in \mathbb{R},\ x \ne 4 \) and the vertical asymptote is \( x = 4 \). The horizontal asymptote is the ratio of leading coefficients, \( y = \dfrac{2}{1} = 2 \). The curve approaches but never reaches that value, so the range is \( f(x) \in \mathbb{R},\ f(x) \ne 2 \). A rational function of this form always excludes exactly one value from each of the domain and the range.
3. Write \( f(x) = 2x^{2} - 12x + 23 \) in the form \( a(x-h)^{2} + k \), and hence state the vertex and the range.
Take the 2 out of the \(x\) terms first: \( 2(x^{2} - 6x) + 23 \). Complete the square inside: \( x^{2} - 6x = (x-3)^{2} - 9 \). So \( f(x) = 2\left[(x-3)^{2} - 9\right] + 23 = 2(x-3)^{2} - 18 + 23 = 2(x-3)^{2} + 5 \). The vertex is \( (3, 5) \), and since \( a = 2 > 0 \) the parabola opens upwards, so the range is \( f(x) \ge 5 \). The most common slip is forgetting to multiply the \( -9 \) by the 2.
4. The graph of \( y = f(x) \) is transformed to \( y = 3f(x-2) - 1 \). Describe the transformations in order, and state the image of the point \( (5, 4) \).
Inside the function: \( x - 2 \) translates 2 units to the right. Outside: multiply by 3 is a vertical stretch of scale factor 3, then \( -1 \) translates 1 unit down. The point \( (5,4) \) moves to \( x = 5 + 2 = 7 \), and \( y = 3(4) - 1 = 11 \), so the image is \( (7, 11) \). Note the vertical stretch is applied to the \(y\)-value before the vertical translation — doing it the other way round gives \( (7, 9) \), which is wrong.
5. AHL Given that \( (x - 2) \) is a factor of \( P(x) = x^{3} + ax^{2} - 5x + 6 \), find \(a\) and fully factorise \(P(x)\).
By the factor theorem \( P(2) = 0 \): \( 8 + 4a - 10 + 6 = 0 \), so \( 4a = -4 \) and \( a = -1 \). Then \( P(x) = x^{3} - x^{2} - 5x + 6 \). Dividing by \( (x-2) \) gives \( x^{2} + x - 3 \), which does not factorise over the rationals (its discriminant is \( 1 + 12 = 13 \)). So \( P(x) = (x-2)\left(x^{2} + x - 3\right) \), and the remaining roots are \( x = \dfrac{-1 \pm \sqrt{13}}{2} \).
6. AHL Solve \( |2x - 1| = x + 4 \).
Split into the two cases. If \( 2x - 1 \ge 0 \): \( 2x - 1 = x + 4 \), so \( x = 5 \). Check: \( |9| = 9 \) and \( 5 + 4 = 9 \). Valid. If \( 2x - 1 < 0 \): \( -(2x-1) = x + 4 \), so \( 1 - 2x = x + 4 \), giving \( -3 = 3x \) and \( x = -1 \). Check: \( |-3| = 3 \) and \( -1 + 4 = 3 \). Valid. Both solutions stand: \( x = -1 \) and \( x = 5 \). Always substitute back — squaring or case-splitting can manufacture roots that do not satisfy the original equation.

🔗Go deeper — other people’s work

These are external resources, not mine. If one stops working, tell me and everything above it on this page still stands.

  • Desmos — build a slider for each parameter and watch the transformations happen live
  • Khan Academy — functions, quadratics and transformations
  • GeoGebra — reflect a function in \( y = x \) to see the inverse appear