Sets and functions

NUST NET Maths · Maths · Numbers, sets and functions. The idea in plain words, the rules to remember, the mistake to avoid and a worked example, written and checked by Mega Lecture.

Test this topic freeAll NUST NET Maths topics

The idea

Set questions are counting questions. A Venn diagram shows the union A ∪ B (in A or B or both), the intersection A ∩ B (in both) and the complement A′ (not in A). When two groups overlap, the overlap is counted twice unless you subtract it once.

A function gives each input exactly one output. Its domain is the set of allowed inputs and its range is the set of outputs it actually produces. To find a domain, look for what must be avoided: a zero denominator, or a negative number under a square root.

A composite f∘g means g acts first, then f. An inverse undoes the function and exists only when the function is one-one.

In simpler words

A set is just a collection of things. The union is everything in either group. The intersection is only what is in both. If you count two overlapping groups by adding their sizes, the overlap gets counted twice, so take it away once. A function is a machine: put a number in, get exactly one number out. The domain is the list of numbers you are allowed to put in.

An everyday comparison

Think of two clubs, football and chess. The union is everyone in at least one club. The intersection is the students in both. If you add the two membership lists, the students in both clubs are counted twice, so you subtract them once. A function is like a vending machine: one button always gives one item. The comparison stops with the inverse: you cannot push the item back to get your coin, but a one-one function can be undone.

Rules to remember

Common mistake

Working out f∘g in the wrong order. (f∘g)(x) means f(g(x)), so g is applied first; f(x) × g(x) and g(f(x)) are different things.

In the exam

For counting, write n(A ∪ B) = n(A) + n(B) − n(A ∩ B), substitute the numbers, then state the answer, drawing a Venn diagram if the question has several regions. For a domain, write the condition first (denominator ≠ 0, or the expression under the root ≥ 0), solve it, and give the domain in set or interval form. For a composite, write (f∘g)(x) = f(g(x)), substitute g(x) into f, then simplify. For an inverse, write y = f(x), swap x and y, solve for y.

Worked example

If f(x) = 2x + 3 and (f∘g)(x) = 6x − 1, then g(x) is

  1. (f∘g)(x) = f(g(x)) = 2g(x) + 3.
  2. Set this equal to 6x − 1: 2g(x) + 3 = 6x − 1, so 2g(x) = 6x − 4.
  3. Divide by 2: g(x) = 3x − 2. Check: 2(3x − 2) + 3 = 6x − 1.

Answer: g(x) = 3x − 2

Ask about this

Type what you are stuck on. The helper finds the explanation, worked examples and the notes to read, free and instant.

Read the full notes

Keep going

← Complex numbersMatrices and determinants →Take a NUST NET Maths test