Home / Notes / Class 10 / Mathematics / Sets and functions

Sets and functions: Class 10 Mathematics

Written by Hassan Raza (Mathematics)

Sets and their operations, Venn diagrams, De Morgan's laws, ordered pairs and Cartesian product, relations, and functions with domain, range, types and inverse of a function.

Key points

A set is a well defined collection of distinct objects, called its elements or members. We write a ∈ A when a belongs to A. Sets are written in the tabular form, A = {1, 2, 3}, or in the set builder form, A = {x | x is a natural number, x < 4}. The empty set { } or ∅ has no element. A set with a single element is a singleton.

Types of sets and relations between sets:

  • Subset: A ⊆ B if every element of A is also in B. A proper subset also has A ≠ B.
  • Equal sets have exactly the same elements.
  • Power set P(A) is the set of all subsets of A. If A has n elements, P(A) has 2ⁿ elements.
  • Universal set U contains all elements under discussion.
  • Disjoint sets have no element in common.

Operations on sets:

  • Union A ∪ B: all elements in A or in B or in both.
  • Intersection A ∩ B: elements common to both.
  • Difference A − B: elements in A but not in B.
  • Complement A′: elements of U that are not in A, so A′ = U − A.

A Venn diagram shows sets as closed shapes, usually circles, inside a rectangle that stands for the universal set. Overlapping circles show the intersection, and shading shows the set under study. For two sets, the number of elements is given by n(A ∪ B) = n(A) + n(B) − n(A ∩ B), which avoids counting the common elements twice.

Laws of sets. For any sets A, B and C:

  • Commutative: A ∪ B = B ∪ A and A ∩ B = B ∩ A.
  • Associative: (A ∪ B) ∪ C = A ∪ (B ∪ C), and the same for intersection.
  • Distributive: A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C) and A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C).
  • De Morgan's laws: (A ∪ B)′ = A′ ∩ B′ and (A ∩ B)′ = A′ ∪ B′.

An ordered pair (a, b) is a pair in which the order matters, so (a, b) ≠ (b, a) unless a = b. Two ordered pairs are equal only if their first elements are equal and their second elements are equal. The Cartesian product A × B is the set of all ordered pairs (a, b) with a ∈ A and b ∈ B. If A has m elements and B has n elements, A × B has mn elements.

A binary relation from A to B is any subset of A × B. Its domain is the set of first elements and its range is the set of second elements. For example, take A = {1, 2, 3} and B = {2, 3, 4, 5}. The relation 'y = x + 1' is R = {(1, 2), (2, 3), (3, 4)}, with domain {1, 2, 3} and range {2, 3, 4}.

A function f from A to B is a relation in which every element of A is related to exactly one element of B. We write f : A → B and y = f(x). The set A is the domain, B is the codomain, and the set of all actual values f(x) is the range. A relation is not a function if some x has two different y values or if some x has no image. A vertical line test on a graph can check this: no vertical line may cut the graph at more than one point.

Types of functions:

  • Into function: some element of the codomain is not an image, so the range is smaller than the codomain.
  • Onto function: every element of the codomain is an image, so range equals codomain.
  • One to one (injective): different elements of A have different images.
  • Bijective function: both one to one and onto.

Only a bijective function has an inverse. If y = f(x), the inverse f⁻¹ is found by solving for x in terms of y and then exchanging the names. The inverse reverses the work of f, so f⁻¹(f(x)) = x. Its domain is the range of f and its range is the domain of f.

Study tip: Draw a Venn diagram for every word problem on sets, and fill in the intersection first. For functions, state the domain and range clearly and check the one to one and onto conditions with a small example before you claim that an inverse exists.

Definitions and flashcards

Say the meaning first, then open the card to check.

Set

A well defined collection of distinct objects.

Power set

The set of all subsets of a given set.

Cartesian product

The set of all ordered pairs with first element from A and second from B.

Relation

A subset of the Cartesian product of two sets.

Function

A relation in which each element of the domain has exactly one image.

Domain

The set of all inputs of a function.

Range

The set of all outputs of a function.

Bijective function

A function that is both one to one and onto.

Inverse function

The function that reverses a bijective function.

Formula sheet

NameFormulaWhat it means
Union countn(A ∪ B) = n(A) + n(B) − n(A ∩ B)For two finite sets.
Number of subsets2ⁿA set with n elements.
Size of productn(A × B) = n(A) × n(B)Number of ordered pairs.
De Morgan(A ∪ B)′ = A′ ∩ B′, (A ∩ B)′ = A′ ∪ B′Complement of union and intersection.

Short questions with model answers

These are the kind of questions asked for 2, 3 and 5 marks. Try each one before opening the answer.

Write the number of subsets of a set with 4 elements. (2 marks)

A set with n elements has 2ⁿ subsets. For n = 4 the number is 2⁴ = 16.

What is the difference between a relation and a function? (2 marks)

A relation is any set of ordered pairs. A function is a relation in which every element of the domain is paired with exactly one element of the codomain.

State De Morgan's laws. (2 marks)

For any sets A and B in a universal set U, (A ∪ B)′ = A′ ∩ B′ and (A ∩ B)′ = A′ ∪ B′.

Distinguish between an into function and an onto function. (3 marks)

In an onto function every element of the codomain has at least one pre-image in the domain, so the range equals the codomain. In an into function at least one element of the codomain is not an image of any element, so the range is a proper subset of the codomain.

If A = {1, 2} and B = {a, b, c}, write A × B and find n(A × B). (3 marks)

A × B = {(1, a), (1, b), (1, c), (2, a), (2, b), (2, c)}. The number of ordered pairs is n(A) × n(B) = 2 × 3 = 6.

Explain with an example when a function has an inverse. (5 marks)

A function has an inverse only if it is one to one and onto, because each output must come from exactly one input. Take f(x) = 2x + 3 on the real numbers. It is one to one and onto. Put y = 2x + 3, so x = (y − 3)/2. Exchanging the names gives f⁻¹(x) = (x − 3)/2. For example f(4) = 11 and f⁻¹(11) = 4, so the inverse reverses the function. The function f(x) = x² on all real numbers has no inverse because f(2) = f(−2) = 4, so it is not one to one.

Numericals with worked steps

Let U = {1, 2, ..., 10}, A = {1, 2, 3, 4, 5} and B = {4, 5, 6, 7}. Find A ∪ B, A ∩ B, A − B, A′ and verify (A ∪ B)′ = A′ ∩ B′.
  1. A ∪ B = {1, 2, 3, 4, 5, 6, 7}.
  2. A ∩ B = {4, 5}.
  3. A − B = {1, 2, 3}.
  4. A′ = {6, 7, 8, 9, 10}.
  5. (A ∪ B)′ = {8, 9, 10}.
  6. B′ = {1, 2, 3, 8, 9, 10}, so A′ ∩ B′ = {8, 9, 10}.
  7. Both sides are equal.

Answer: (A ∪ B)′ = A′ ∩ B′ = {8, 9, 10}

If n(A) = 20, n(B) = 15 and n(A ∩ B) = 8, find n(A ∪ B).
  1. n(A ∪ B) = n(A) + n(B) − n(A ∩ B).
  2. = 20 + 15 − 8 = 27.

Answer: 27

In a class of 60 students, 35 play cricket, 28 play hockey and 10 play both. How many play neither game?
  1. n(C ∪ H) = 35 + 28 − 10 = 53.
  2. Neither = 60 − 53 = 7.

Answer: 7 students

For f(x) = 2x + 3 find f(4) and f⁻¹(x), then find f⁻¹(11).
  1. f(4) = 2(4) + 3 = 11.
  2. Let y = 2x + 3, so 2x = y − 3 and x = (y − 3)/2.
  3. f⁻¹(x) = (x − 3)/2.
  4. f⁻¹(11) = (11 − 3)/2 = 4.

Answer: f(4) = 11, f⁻¹(x) = (x − 3)/2, f⁻¹(11) = 4

Common mistakes

  • Writing (a, b) and (b, a) as the same ordered pair.
  • Counting the common elements twice in n(A ∪ B).
  • Forgetting the empty set and the set itself when listing subsets.
  • Calling every relation a function. Check that each element of the domain has exactly one image.
  • Finding an inverse for a function that is not one to one.

Practise this chapter

Practice questions and timed test Printable worksheet

Previous: Partial fractions Next: Basic statistics