Skip to content
spmaddmath.com.my
Tuition

Study

SyllabusFormulasMethodsExam & PapersTools
LocationsPricingBlogOur TeachersContact
EN

Worked examples · Functions

Functions, Worked Examples (easy)

These easy Functions examples work through the four core moves, finding an image, finding an object, reading a range from a listed domain, and forming a simple composite fg(x)=f(g(x))fg(x)=f(g(x)). Try each one on paper first, then check every line against our full solution.

What these examples cover

These easy Functions examples build the four moves the whole chapter rests on: finding an image, finding an object, reading a range from a listed domain, and forming a simple composite. Each one uses small, clean numbers so you can follow every line without a calculator getting in the way.

The best way to use the set is to cover the solution, attempt the question in full on paper, and only then check line by line against our working. If your answer differs, find the exact step where the two solutions part company, that single line is usually where the real learning is.

Treat every substitution as a place to slow down, and these turn into quick, reliable marks.

Worked examples

Work through all four. Attempt each fully before you read the matching solution, and pay attention to how the same discipline, substitute carefully, keep brackets, simplify one step at a time, runs through every one.

Q1[3 marks]

Given the function f(x)=2x+3f(x)=2x+3, find (a) the image of 55, and (b) the object whose image is 2121.

Show worked solution

(a) The image of 55 is the output f(5)f(5). Substitute the object x=5x=5 into the rule:

f(5)=2(5)+3=10+3=13f(5)=2(5)+3=10+3=13

(b) An object whose image is 2121 is a value of xx with f(x)=21f(x)=21. Set the rule equal to 2121 and solve for xx:

2x+3=21    2x=18    x=92x+3=21 \;\Rightarrow\; 2x=18 \;\Rightarrow\; x=9

Answer

The image of 55 is 1313, and the object is 99. Check part (b) by substituting back: f(9)=2(9)+3=21f(9)=2(9)+3=21, as required.

Q2[3 marks]

A function is defined by g(x)=x24xg(x)=x^{2}-4x. Find (a) g(3)g(3) and (b) g(2)g(-2).

Show worked solution

(a) Substitute x=3x=3 into the rule and simplify:

g(3)=(3)24(3)=912=3g(3)=(3)^{2}-4(3)=9-12=-3

(b) Substitute x=2x=-2, and keep the negative object inside brackets before you square or multiply:

g(2)=(2)24(2)=4+8=12g(-2)=(-2)^{2}-4(-2)=4+8=12

Answer

g(3)=3g(3)=-3 and g(2)=12g(-2)=12. The brackets around 2-2 are what keep both signs correct: (2)2=4(-2)^{2}=4, not 4-4, and 4(2)=+8-4(-2)=+8.

Q3[3 marks]

The function ff is defined by f:x52xf:x \mapsto 5-2x with domain {1,0,2,4}\{-1, 0, 2, 4\}. Find the range.

Show worked solution

The range is the set of images produced by the four objects in the domain. Evaluate ff at each object in turn:

f(1)=52(1)=5+2=7f(-1)=5-2(-1)=5+2=7
f(0)=52(0)=5f(0)=5-2(0)=5
f(2)=52(2)=54=1f(2)=5-2(2)=5-4=1
f(4)=52(4)=58=3f(4)=5-2(4)=5-8=-3

Answer

The range is {7,5,1,3}\{7, 5, 1, -3\}. Because the domain here is a short list, the range is simply the list of outputs, one image for each object, with no interval to describe.

Q4[4 marks]

Two functions are defined by f(x)=x+4f(x)=x+4 and g(x)=3xg(x)=3x. Find (a) the composite function fg(x)fg(x), and (b) the value of gf(2)gf(2).

Show worked solution

(a) fg(x)fg(x) means f(g(x))f(g(x)), so gg acts first. Replace the input of ff with the whole of g(x)=3xg(x)=3x:

fg(x)=f(3x)=3x+4fg(x)=f(3x)=3x+4

(b) gf(x)gf(x) means g(f(x))g(f(x)), so now ff acts first. Work inside-out: find f(2)f(2), then apply gg to that result.

f(2)=2+4=6f(2)=2+4=6
gf(2)=g(6)=3(6)=18gf(2)=g(6)=3(6)=18

Answer

fg(x)=3x+4fg(x)=3x+4 and gf(2)=18gf(2)=18. Check part (b) the other way: gf(x)=g(x+4)=3(x+4)=3x+12gf(x)=g(x+4)=3(x+4)=3x+12, so gf(2)=3(2)+12=18gf(2)=3(2)+12=18, which agrees.

Q5[2 marks]

A relation is defined by the ordered pairs {(1,3),(2,3),(3,5),(4,7)}\{(1,3),(2,3),(3,5),(4,7)\}. State whether this relation is a function, and identify its type.

Show worked solution

A relation is a function only when every object has exactly one image. List each object with its image:

13,23,35,471\to3,\quad 2\to3,\quad 3\to5,\quad 4\to7

Every object above gives exactly one image, so this relation is a function. The objects 11 and 22 share the same image 33, which is the sign of a many-to-one relation.

Answer

This relation is a function, and it is many-to-one. A relation fails to be a function only when some object produces more than one image.

Q6[2 marks]

The function h(x)=3xkh(x)=3x-k is such that h(4)=7h(4)=7. Find the value of kk.

Show worked solution

Substitute x=4x=4 into the rule, using the given image 77:

h(4)=3(4)k=12k=7h(4)=3(4)-k=12-k=7

Solve this equation for kk:

12k=7    k=512-k=7 \;\Rightarrow\; k=5

Answer

k=5k=5. Check: h(4)=3(4)5=125=7h(4)=3(4)-5=12-5=7, which matches the given image.

Q7[3 marks]

The function ff is defined by f(x)=2x5f(x)=2x-5. Find f1(x)f^{-1}(x), and hence find f1(3)f^{-1}(3).

Show worked solution

Write y=f(x)y=f(x), then rearrange to make xx the subject:

y=2x5    x=y+52y=2x-5 \;\Rightarrow\; x=\dfrac{y+5}{2}

Replace yy with xx to state the inverse function, then substitute x=3x=3:

f1(x)=x+52,f1(3)=3+52=4f^{-1}(x)=\dfrac{x+5}{2}, \qquad f^{-1}(3)=\dfrac{3+5}{2}=4

Answer

f1(x)=x+52f^{-1}(x)=\dfrac{x+5}{2} and f1(3)=4f^{-1}(3)=4. Check by working forward: f(4)=2(4)5=3f(4)=2(4)-5=3, which confirms 33 is the image of 44.

Q8[3 marks]

Given g(x)=x+2g(x)=x+2 and the composite function fg(x)=3x+1fg(x)=3x+1, find f(x)f(x).

Show worked solution

Since fg(x)=f(g(x))fg(x)=f(g(x)), replace g(x)g(x) with x+2x+2 inside ff, and set this equal to the given composite:

f(x+2)=3x+1f(x+2)=3x+1

Let u=x+2u=x+2, so x=u2x=u-2. Substitute to write the right side in terms of uu:

f(u)=3(u2)+1=3u5    f(x)=3x5f(u)=3(u-2)+1=3u-5 \;\Rightarrow\; f(x)=3x-5

Answer

f(x)=3x5f(x)=3x-5. Check: fg(x)=f(x+2)=3(x+2)5=3x+65=3x+1fg(x)=f(x+2)=3(x+2)-5=3x+6-5=3x+1, which matches the given composite.

Notice how different these four questions look on the surface, yet how similar the discipline is underneath: read exactly what is asked, substitute carefully with brackets, and simplify one step at a time. That steadiness is what turns Functions from a source of small slips into a reliable opening block of marks.

Key method points

These four examples rehearse the everyday skills that open almost every Functions question in Add Math. Keep the following points in mind as you practise more.

  • To find an image, substitute the object into the rule; to find an object, set the rule equal to the image and solve.
  • Always wrap a negative object in brackets before you square or multiply, so every sign stays correct.
  • With a listed domain, the range is just the set of images, evaluate the rule at each object and collect the outputs.
  • In a composite fg(x)fg(x), the function nearest xx acts first: fg(x)=f(g(x))fg(x)=f(g(x)).
  • Check a composite value inside-out as an independent second route to the same answer.
  • Because marking is analytic, a clear substitution line can still earn method marks even if the final arithmetic slips.

How a teacher helps

When a student loses a mark on questions like these, it is almost always a small, fixable habit, a missing bracket around a negative object, or a composite read in the wrong order. In a one-to-one lesson our teacher watches the exact line where the slip happens and corrects it on the spot, before it settles into a routine.

Because our teachers are experienced, you work with someone who explains the why behind each step, not just the what. Lessons are taught in English, while SPM papers are set in both Malay and English, so we make sure the notation reads the same to you either way.

Get 1-to-1 help.

Book a Trial Class

Frequently asked questions

What is the difference between an object and an image?

The object is the input you put into the function; the image is the output it produces. For f(x)=2x+3f(x)=2x+3, the object 55 has image f(5)=13f(5)=13.

How do I find the range when the domain is given as a list?

Substitute each value in the domain into the rule, then collect the results. Those outputs, listed once each, form the range.

There is no interval to describe when the domain is a short set.

In fg(x)fg(x), which function do I use first?

The one written closest to xx. So fg(x)=f(g(x))fg(x)=f(g(x)) applies gg first, then ff.

Reading the letters right to left keeps the order straight.

What is the fastest way to check a composite value like gf(2)gf(2)?

Do it two ways. Find gf(x)gf(x) and substitute, and also work inside-out by computing f(2)f(2) first.

If both routes give the same number, your answer is secure.

Source:SRC-DSKP-EN

Written by the spmaddmath.com.my editorial team.· Last updated 5 September 2026

Ready to get started?

Book a Trial Classfrom RM50/hr · One-hour paid trial · Same-day reply
Book a Trial ClassOne-hour paid trial · Same-day reply