Functions are the fundamental building blocks of mathematics, mapping inputs to outputs like a machine that transforms raw materials into products. The domain is what you feed in, the codomain is what you could get, and the range is what you actually get. Composite functions chain machines together, while inverse functions reverse the process. Transformations shift, stretch, and flip graphs, providing a geometric interpretation of algebraic changes. Understanding functions is essential because they model relationships between quantities in every area of mathematics and science.
A function is a rule that assigns to each element in one set exactly one element in another set. Functions are central to the DSE Mathematics compulsory syllabus and underpin topics including polynomials, logarithms, sequences, and inequalities.
Functions and Relations
Definition of a Function
A function f from a set A to a set B Written f:A→B Is a rule that assigns to Every element x∈Aexactly one element y∈B. The element y is called the image Of x under f Written y=f(x).
The set A is called the domain of f.
The set B is called the codomain of f.
The set of all images {f(x):x∈A} is called the range of f. The range is always a subset of the codomain: range(f)⊆B.
A relation is any subset of A×B. A function is a special type of relation where each Element of A appears as the first component of exactly one ordered pair.
Mapping Diagrams
A mapping diagram represents a function by drawing arrows from each element of the domain to the Corresponding element(s) in the codomain. For a valid function, every element in the domain must have exactly one arrow leaving it.
Vertical Line Test
For a graph in the xy-plane, the vertical line test states that a curve represents a function of x if and only if no vertical line intersects the curve more than once.
Types of Functions
A function f:A→B is:
Injective (one-to-one) if f(x1)=f(x2)⟹x1=x2. Equivalently, distinct inputs produce distinct outputs. This can be checked using the horizontal line test: no horizontal line intersects the graph more than once.
Surjective (onto) if for every y∈B There exists x∈A such that f(x)=y. In other words, the range equals the codomain.
Bijective (one-to-one correspondence) if f is both injective and surjective.
Examples
f(x)=2x+1 with domain R is injective (linear, non-constant) and surjective onto R Hence bijective.
f(x)=x2 with domain R is neither injective (f(2)=f(−2)=4) nor surjective onto R (range is [0,∞)).
f(x)=x2 with domain [0,∞) and codomain [0,∞) is bijective.
f(x)=x1 with domain R∖{0} is injective but not surjective onto R (range is R∖{0}).
Composite Functions
Definition
Given two functions f and g The composite functionf∘g (read ”f of g”) is Defined by:
(f∘g)(x)=f(g(x))
For (f∘g)(x) to be defined at a particular value of x Two conditions must hold:
x must be in the domain of g.
g(x) must be in the domain of f.
The domain of f∘g is therefore:
dom(f∘g)={x∈dom(g):g(x)∈dom(f)}
Order of Composition
f∘g=g∘f. The order of composition matters because the inner function Is evaluated first.
Inverse Functions
If f is a bijection, then the inverse functionf−1 exists and satisfies:
F−1(f(x))=xforallx∈dom(f)
F(f−1(y))=yforally∈dom(f−1)=range(f)
The graphs of y=f(x) and y=f−1(x) are reflections of each other in the line y=x.
To find f−1(x) Set y=f(x) Solve for x in terms of y Then interchange x and y.
A necessary condition for a function to have an inverse is that it is one-to-one (injective). If the Original function is not injective on its given domain, one may restrict the domain to make it Injective.
Examples
Let f(x)=2x+3 and g(x)=x2. Then:
(f∘g)(x)=f(g(x))=f(x2)=2x2+3
(g∘f)(x)=g(f(x))=g(2x+3)=(2x+3)2=4x2+12x+9
Note that (f∘g)(1)=5 but (g∘f)(1)=25 Confirming f∘g=g∘f.
Find the inverse of f(x)=x−32x+1 (x=3):
Set y=x−32x+1
y(x−3)=2x+1⟹yx−3y=2x+1
x(y−2)=3y+1⟹x=y−23y+1
Therefore f−1(x)=x−23x+1 With domain R∖{2}.
Let f(x)=x−1 and g(x)=x2+1. Find the domain of f∘g:
dom(g)=R
dom(f)={x:x≥1} So we require g(x)≥1 I.e. x2+1≥1⟹x2≥0 Which holds for all real x.
Therefore dom(f∘g)=R.
Quadratic Functions
A quadratic function has the general form:
F(x)=ax2+bx+c,a=0
Where a, b And c are real constants.
Vertex Form
By completing the square, the quadratic can be rewritten in vertex form:
F(x)=a(x+2ab)2+4a4ac−b2
The vertex is at (−2ab,4a4ac−b2).
The axis of symmetry is the vertical line x=−2ab.
If a>0 The parabola opens upward (minimum at the vertex).
If a<0 The parabola opens downward (maximum at the vertex).
Discriminant
The discriminant of a quadratic ax2+bx+c=0 is defined as:
Δ=b2−4ac
The discriminant determines the nature of the roots of the equation f(x)=0:
Condition
Roots
Δ>0
Two distinct real roots
Δ=0
One repeated real root
Δ<0
No real roots
The roots are given by the quadratic formula:
X=2a−b±b2−4ac
See also Polynomials for connections between quadratic functions and polynomial Equations.
Completing the Square
To complete the square for ax2+bx+c:
Factor out a from the first two terms: a(x2+abx)+c.
Add and subtract (2ab)2 inside the brackets: a[(x+2ab)2−(2ab)2]+c.
Simplify to obtain the vertex form.
This technique is also essential in solving Inequalities involving quadratic Expressions.
Examples
Express f(x)=2x2−12x+22 in vertex form:
f(x)=2(x2−6x)+22=2[(x−3)2−9]+22=2(x−3)2+4
Vertex: (3,4) Axis of symmetry: x=3 Minimum value: 4.
Determine the nature of roots of 3x2−5x+2=0:
Δ=(−5)2−4(3)(2)=25−24=1>0
Two distinct real roots: x=65±1 I.e. x=1 or x=32.
Find the range of f(x)=−x2+4x−7:
f(x)=−(x2−4x)−7=−[(x−2)2−4]−7=−(x−2)2−3
Since −(x−2)2≤0 for all x The maximum value is −3.
For a>1: f(x)=ax is strictly increasing. The graph passes through (0,1) Approaches the x-axis as x→−∞ (horizontal asymptote at y=0), and rises steeply as x→∞.
For 0<a<1: f(x)=ax is strictly decreasing. The graph is a reflection of y=(a1)x in the y-axis.
Exponential Equations
Equations of the form af(x)=ag(x) can be solved by equating exponents: f(x)=g(x) (provided a>0, a=1).
For equations of the form af(x)=b Take logarithms of both sides. See logarithms for the full treatment of logarithmic techniques.
Examples
Solve 4x=2x+3:
Rewrite: (22)x=2x+3⟹22x=2x+3
Equate exponents: 2x=x+3⟹x=3
Solve 52x−1=3x+2:
Take logarithms: (2x−1)ln5=(x+2)ln3
2xln5−ln5=xln3+2ln3
x(2ln5−ln3)=ln5+2ln3
x=2ln5−ln3ln5+2ln3
The half-life of a substance is 8 hours. If the initial amount is 100 g, find the amount remaining after 24 hours:
A(t)=100×(21)t/8
A(24)=100×(21)3=12.5g
Logarithmic Functions
The logarithmic function is the inverse of the exponential function. If ay=x (where a > 0$$a \neq 1$$x > 0), then:
Y=logax
This means logax is the exponent to which a must be raised to obtain x.
The function f(x)=logax has domain (0,∞) and range R. See logarithms for further details.
When solving logarithmic equations, the following steps are typical:
Use the laws of logarithms to combine or expand logarithmic terms.
Convert the logarithmic equation to its equivalent exponential form, or equate arguments when the logarithms have the same base.
Always verify that solutions satisfy the domain condition (arguments of all logarithms must be positive).
Examples
Solve log2(x+3)+log2(x−1)=4:
Product law: log2[(x+3)(x−1)]=4
Convert: (x+3)(x−1)=24=16
x2+2x−3=16⟹x2+2x−19=0
x=2−2±4+76=−1±25
Domain requires x+3>0 and x−1>0 I.e. x>1.
−1+25≈3.47>1 (accepted); −1−25<0 (rejected).
Solution: x=−1+25.
Evaluate log320 in terms of ln:
log320=ln3ln20
Solve 2log5x−log5(x−1)=log54:
Power law: log5x2−log5(x−1)=log54
Quotient law: log5x−1x2=log54
x−1x2=4⟹x2=4x−4⟹x2−4x+4=0
(x−2)2=0⟹x=2
Check: x=2>0 and x−1=1>0. Valid.
Graph Transformations
Given the graph of y=f(x) The graph of y=af(x+b)+c is obtained by applying a sequence Of transformations. The general form can be broken down as:
Y=a⋅f(x−(−b))+c
Use the sliders to explore how the parameters a$$b And c transform the parent function, and Observe the order in which each transformation is applied.
Individual Transformations
Transformation
Effect
y=f(x)+c
Vertical translation upward by c units (c>0) or downward by c units (c<0)
y=f(x−h)
Horizontal translation to the right by h units (h>0) or to the left by h units (h<0)
y=af(x)
Vertical stretch by factor a (a>1) or vertical compression by factor a (0<a<1); reflection in the x-axis if a<0
y=f(kx)
Horizontal stretch by factor k1 (0<k<1) or horizontal compression by factor k1 (k>1); reflection in the y-axis if k<0
Order of Transformations
For y=af(x+b)+c The recommended order of application (from the graph of y=f(x)) is:
Horizontal translation by −b units (shift left if b>0 Right if b<0): replace x with x+b.
Vertical stretch/compression (and possible x-axis reflection) by factor ∣a∣: multiply the function by a.
Vertical translation by c units: add c.
Alternatively, one may think of this as working from the “inside out”: apply the horizontal shift First, then the vertical scaling, then the vertical shift.
Examples
Describe the transformation from y=x2 to y=2(x−3)2+1:
Starting from y=x2:
Shift right by 3 units: y=(x−3)2
Vertical stretch by factor 2: y=2(x−3)2
Shift up by 1 unit: y=2(x−3)2+1
The vertex moves from (0,0) to (3,1).
The graph of y=f(x) passes through (2,5). Find the corresponding point on y=−f(2x)+3:
Start with (2,5) on y=f(x) Meaning f(2)=5.
For y=−f(2x)+3 Set 2x=2⟹x=1.
Then y=−f(2)+3=−5+3=−2.
The point is (1,−2).
Given f(x)=x Sketch y=−x+4−2:
Rewrite as y=f(−(x−4))−2=f(−x+4)−2.
From y=x: reflect in the y-axis to get y=−x Then shift right by 4 to get y=−(x−4)=−x+4 Then shift down by 2.
Domain: −x+4≥0⟹x≤4. Range: [−2,∞).
Modulus Function
Definition
The modulus (or absolute value) function is defined piecewise:
F(x)=∣x∣={x−xifx≥0ifx<0
The graph of y=∣x∣ is V-shaped, with its vertex at the origin. It is symmetric about the y-axis, making it an even function: ∣−x∣=∣x∣ for all x.
Properties
For all a,b∈R:
Proposition (Multiplicativity).∣ab∣=∣a∣⋅∣b∣.
Proof. By cases on the signs of a and b:
If a≥0 and b≥0: ∣ab∣=ab=∣a∣⋅∣b∣.
If a≥0 and b<0: ∣ab∣=∣a⋅b∣=∣−(ab)∣=ab=a⋅(−b)=∣a∣⋅∣b∣.
The remaining cases are symmetric. \qed
Proposition (Triangle Inequality).∣a+b∣≤∣a∣+∣b∣.
Proof. We have −∣a∣≤a≤∣a∣ and −∣b∣≤b≤∣b∣ for all a,b. Adding: −(∣a∣+∣b∣)≤a+b≤∣a∣+∣b∣ Which means ∣a+b∣≤∣a∣+∣b∣. \qed
Solving Modulus Equations
The equation ∣f(x)∣=a (where a≥0) is equivalent to f(x)=a or f(x)=−a. If a<0 There is no solution.
Solving Modulus Inequalities
Inequality
Equivalent Form
Condition
∥f(x)∥<a
−a<f(x)<a
a>0
∥f(x)∥>a
f(x)<−a or f(x)>a
a≥0
∥f(x)∥≤a
−a≤f(x)≤a
a≥0
∥f(x)∥≥a
f(x)≤−a or f(x)≥a
a≥0
Proof of ∥f(x)∥<a⟺−a<f(x)<a (for a>0):
(⇒) If ∣f(x)∣<a Then by definition of modulus, −a<f(x)<a.
(⇐) If −a<f(x)<a Then f(x)<a and −f(x)<a So ∣f(x)∣<a. \qed
Graphs Involving Modulus
y=∣f(x)∣: Reflect any part of the graph of y=f(x) that lies below the x-axis above it. The portion above the axis remains unchanged.
y=f(∣x∣): The graph for x≥0 is the same as y=f(x). The graph for x<0 is the reflection of the x≥0 portion in the y-axis (i.e., f(∣x∣) is always an even function).
Examples
Solve ∣2x−3∣=7:
2x−3=7⟹x=5 Or 2x−3=−7⟹x=−2.
Solutions: x=−2 or x=5.
Solve ∣3x+1∣<5:
−5<3x+1<5⟹−6<3x<4⟹−2<x<34.
Solution: x∈(−2,34).
Solve ∣x2−5x∣≥6:
Case 1: x2−5x≥6⟹x2−5x−6≥0⟹(x−6)(x+1)≥0⟹x≤−1 or x≥6.
Case 2: x2−5x≤−6⟹x2−5x+6≤0⟹(x−2)(x−3)≤0⟹2≤x≤3.
Solution: x≤−1 or 2≤x≤3 or x≥6.
Sketch y=∣x2−4x−5∣:
Factor: y=∣(x−5)(x+1)∣.
The quadratic x2−4x−5 has roots at x=−1 and x=5 With vertex at x=2 giving f(2)=4−8−5=−9.
Below the x-axis on (−1,5); above on (−∞,−1]∪[5,∞).
Reflect the portion on (−1,5) upward. The minimum on (−1,5) becomes a maximum at (2,9).
Inequalities with Functions
Quadratic Inequalities
To solve ax2+bx+c>0 (or <\geq≤), use the discriminant and the shape of the Parabola:
Find the roots of ax2+bx+c=0 (if they exist).
Sketch the parabola (opens upward if a>0 Downward if a<0).
Read off the intervals where the inequality is satisfied.
For a vertical asymptote at x=a The sign of f(x) on each side depends on the signs of the Remaining factors. Analyse using a sign chart or by evaluating test points on each side.
Sketching Rational Functions
Factor numerator and denominator; cancel common factors (these produce “holes,” not asymptotes).
Determine the domain.
Find vertical asymptotes (zeros of denominator after cancellation).
Find horizontal/oblique asymptotes.
Find x- and y-intercepts.
Use sign analysis to determine behaviour near asymptotes.
Sketch.
Examples
Sketch f(x)=x−32x+1:
Domain: x=3. Vertical asymptote: x=3.
Degrees equal (both 1), so horizontal asymptote at y=12=2.
y-intercept: f(0)=−31=−31.
x-intercept: 2x+1=0⟹x=−21.
Sign analysis: f(x)>0 for x<−21 or x>3; f(x)<0 for −21<x<3.
As x \to 3^+$$f(x) \to +\infty; as x \to 3^-$$f(x) \to -\infty.
Sketch f(x)=x2−4x2−1:
Factor: f(x)=(x−2)(x+2)(x−1)(x+1).
Domain: x=±2. Vertical asymptotes: x=2 and x=−2.
Degrees equal (both 2), horizontal asymptote at y=11=1.
x-intercepts: x=±1. y-intercept: f(0)=−4−1=41.
As x→2+ Numerator →3>0 Denominator →0+ So f(x)→+∞.
As x→−2+ Numerator →−3<0 Denominator →0− So f(x)→+∞.
Graphical Methods for Solving Equations
Using Graph Intersection
The solutions to f(x)=g(x) correspond to the x-coordinates of the intersection points of the Curves y=f(x) and y=g(x).
This is particularly useful when:
An exact algebraic solution is difficult or impossible (e.g., ex=x+2).
You need to determine the number of solutions rather than their exact values.
Number of Solutions from Graph Features
For the equation f(x)=k (where k is a constant), the number of solutions equals the number of Times the horizontal line y=k intersects the graph of y=f(x).
Key observations:
At a local maximum or minimum of f A small change in k can change the number of solutions.
If k equals the maximum or minimum value, the corresponding intersection point is a tangency (double root).
Since f(−1)=3>0 and f(1)=−1<0 The graph crosses the x-axis three times.
Three distinct real solutions.
The equation 2x=x+3 has exactly two solutions:
f(x)=2x is strictly increasing and concave up; g(x)=x+3 is a straight line.
At x=0: 20=1<3=g(0).
At x=2: 22=4<5=g(2).
At x=3: 23=8>6=g(3).
By the intermediate value theorem, there is a root in (2,3).
For large negative x: 2x→0 and x+3→−∞ So 2x>x+3.
Since 2x grows faster than any linear function, there is exactly one more crossing for some x<0.
Total: exactly 2 solutions.
Common Pitfalls
Modulus function errors
Forgetting both cases. When solving ∣f(x)∣=a You must consider f(x)=a AND f(x)=−a. Dropping one case loses solutions.
Wrong inequality direction.∥f(x)∥<a means f(x) is between−a and a (a single interval). ∥f(x)∥>a means f(x) is outside this range (two disjoint intervals). Confusing these produces wrong solution sets.
Squaring both sides carelessly. Squaring ∣f(x)∣=∣g(x)∣ to get f(x)2=g(x)2 is valid, But squaring f(x)=g(x) can introduce extraneous solutions (e.g., x=x squares to x2=x Giving x=0 or x=1 But x=1 is extraneous).
Rational function errors
Cancelling factors blindly.x−2x2−4=x+2 only for x=2. The point x=2 is a hole, not a point on the graph.
Confusing holes and asymptotes. If a factor cancels from both numerator and denominator, the result is a hole (removable discontinuity), not a vertical asymptote.
Wrong horizontal asymptote. The horizontal asymptote depends on the leading terms only. Do Not set the entire numerator equal to the entire denominator.
Inequality errors
Multiplying by a variable. Multiplying g(x)f(x)>0 by g(x) flips the inequality when g(x)<0. Always use a sign chart instead.
Including excluded values. For g(x)f(x)≥0 Values where g(x)=0 are still excluded from the domain, even though the inequality is non-strict.
Wrong discriminant analysis. A negative discriminant with a>0 means the quadratic is Always positive, not always negative.
Wrap-up Questions
Wrap-up Questions
Question: Let f(x)=x+12x−6 and g(x)=x2−4. Find (f∘g)(x) and state its domain.
Let u=3x (note u>0). The equation becomes u2−10u+9=0.
(u−1)(u−9)=0⟹u=1 or u=9.
Case 1: 3x=1⟹x=0.
Case 2: 3x=9=32⟹x=2.
Solutions: x=0 or x=2.
Question: Solve log3(x−2)+log3(x+6)=2.
Answer
Product law: log3[(x−2)(x+6)]=2.
Convert: (x−2)(x+6)=32=9.
x2+4x−12=9⟹x2+4x−21=0.
(x+7)(x−3)=0⟹x=−7 or x=3.
Domain: x−2>0⟹x>2. Therefore x=−7 is rejected.
Solution: x=3.
Question: The graph of y=f(x) passes through the points (1,4) and (3,10). State the Coordinates of the corresponding points on the graph of y=2f(x−1)+3.
Answer
For a point (a,b) on y=f(x) (so f(a)=b), the corresponding point on y=2f(x−1)+3 is found by setting x−1=a I.e. x=a+1 And y=2b+3.
(1,4)↦(1+1,2×4+3)=(2,11).
(3,10)↦(3+1,2×10+3)=(4,23).
Question: Given f(x)=log2(x+3) and g(x)=2x−1 Show that f and g are Inverse functions of each other, and state the domain and range of f−1.