Skip to content

LearnMathematics

Mathematics · NCERT Class 12 Mathematics Part I, Chapter 1Free · full access

Relations and Functions

CUET (UG) Mathematics 319, Section B1 · 63 min read · 23 worked examples · 12 practice questions

1.1 Introduction

The symbols of this chapter

Every symbol below comes up again and again. Read the table once, then come back to it whenever a line looks strange.

SymbolRead it asExample
a∈Aa \in Aaa belongs to AA2∈{2,3}2 \in \{2, 3\}
a∉Aa \notin Aaa does not belong to AA5∉{2,3}5 \notin \{2, 3\}
n(A)n(A)the number of elements of AAn({2,3})=2n(\{2, 3\}) = 2
(a,b)(a, b)an ordered pair: aa first, bb second(2,4)≠(4,2)(2, 4) \ne (4, 2)
ϕ\phithe empty set, with no element{x∈N:x<1}=ϕ\{x \in \mathbb{N} : x < 1\} = \phi
N\mathbb{N}, Z\mathbb{Z}, R\mathbb{R}natural numbers, integers, real numbersN={1,2,3,… }\mathbb{N} = \{1, 2, 3, \dots\}
⇒\Rightarrow"implies": if the left is true, so is the rightx=3⇒x2=9x = 3 \Rightarrow x^2 = 9
⇔\Leftrightarrow"if and only if": each side gives the other2x=6⇔x=32x = 6 \Leftrightarrow x = 3
{x:… }\{x : \dots\}the set of all xx such that ...{x∈N:x<4}={1,2,3}\{x \in \mathbb{N} : x < 4\} = \{1, 2, 3\}
∣x∣\lvert x\rvertthe modulus of xx: its distance from 0, never negative∣−3∣=∣3∣=3\lvert -3\rvert = \lvert 3\rvert = 3; ∣x∣=2⇒x=±2\lvert x\rvert = 2 \Rightarrow x = \pm 2

The Cartesian product A×BA \times B

  • A×BA \times B, read "A cross B", is the Cartesian product: every ordered pair whose first entry is from AA and second entry is from BB.
  • The colon ":" reads "such that".
  • When to use it: every relation is cut out of A×BA \times B. On small sets, list A×BA \times B first.
  • Tiny use: A={1,2}A = \{1, 2\}, B={p,q,r}B = \{p, q, r\} give A×B={(1,p),(1,q),(1,r),(2,p),(2,q),(2,r)}A \times B = \{(1, p), (1, q), (1, r), (2, p), (2, q), (2, r)\}, which is 2×3=62 \times 3 = 6 pairs.
  • The common slip: putting (p,1)(p, 1) in A×BA \times B. The first entry must come from AA.

A relation

  • ⊆\subseteq reads "is a subset of": every pair in RR is also a pair of A×BA \times B.
  • a R ba\,R\,b reads "aa is related to bb". (a,b)∉R(a, b) \notin R means aa is not related to bb.
  • When to use it: a rule such as "aa divides bb" picks the pairs. Go through A×BA \times B and keep the pairs that obey the rule.
  • The common slip: thinking a relation needs a pattern. Any set of pairs from A×BA \times B is a relation, even {(3,4)}\{(3, 4)\} alone.

Take A={2,3}A = \{2, 3\} and B={4,6,8,9}B = \{4, 6, 8, 9\}. A×BA \times B has 2×4=82 \times 4 = 8 pairs. Keep the pairs where aa divides bb, that is, where b=a×b = a \times (a whole number):

a in A b in B 4 6 8 9 2 (2, 4) (2, 6) (2, 8) (2, 9) 3 (3, 4) (3, 6) (3, 8) (3, 9) A × B has 8 pairs; the 5 ringed ones make R
Figure 1.1 A × B for A = {2, 3} and B = {4, 6, 8, 9}: all eight ordered pairs. The ringed pairs, where a divides b, form the relation R
PairIs bb a multiple of aa?In RR?
(2,4)(2, 4)4=2×24 = 2 \times 2yes
(2,6)(2, 6)6=2×36 = 2 \times 3yes
(2,8)(2, 8)8=2×48 = 2 \times 4yes
(2,9)(2, 9)9=2×4.59 = 2 \times 4.5, not wholeno
(3,4)(3, 4)4=3×1.33…4 = 3 \times 1.33\dots, not wholeno
(3,6)(3, 6)6=3×26 = 3 \times 2yes
(3,8)(3, 8)8=3×2.66…8 = 3 \times 2.66\dots, not wholeno
(3,9)(3, 9)9=3×39 = 3 \times 3yes
R={(2,4),(2,6),(2,8),(3,6),(3,9)}R = \{(2, 4), (2, 6), (2, 8), (3, 6), (3, 9)\}

That is a relation from AA to BB. We write 2 R 82\,R\,8 because (2,8)∈R(2, 8) \in R. And (3,4)∉R(3, 4) \notin R.

  • The domain of a relation is the set of its first entries. For this RR: {2,3}\{2, 3\}.
  • Its range is the set of its second entries. For this RR: {4,6,8,9}\{4, 6, 8, 9\}.
  • For a relation from AA to BB, BB is the codomain. The range is only the second entries actually used; here it happens to be all of BB.

How many relations?

  • mm and nn are the numbers of elements of AA and of BB; mnmn is the number of pairs in A×BA \times B. The letter nn does two jobs here: n(B)n(B) means "the number of elements of BB", and nn is that number.
  • Why 2mn2^{mn}: a relation is made by deciding, for each pair, "in" or "out". That is 2 choices, mnmn times.
  • When to use it: "how many relations from AA to BB", in an MCQ or the first part of a case study.
  • Tiny use: A={1,2}A = \{1, 2\}, B={p}B = \{p\}. A×B={(1,p),(2,p)}A \times B = \{(1, p), (2, p)\}, so there are 22=42^2 = 4 relations: ϕ\phi, {(1,p)}\{(1, p)\}, {(2,p)}\{(2, p)\} and {(1,p),(2,p)}\{(1, p), (2, p)\}.
  • The common slip: answering mnmn. That counts the pairs, not the relations.

For A={2,3}A = \{2, 3\} and B={4,6,8,9}B = \{4, 6, 8, 9\}: mn=2×4=8mn = 2 \times 4 = 8 pairs, so 28=2562^8 = 256 relations, from the empty set ϕ\phi up to the whole of A×BA \times B.

A B 2 3 4 6 8 9 relation: a divides b A B 2 3 4 6 8 9 function: b = a², one arrow each
Figure 1.2 A relation is any set of arrows from A to B. In a function every element of A sends exactly one arrow: here 2 sends three, so 'divides' is not a function

A function is a special relation

  • f:A→Bf: A \to B reads "ff from AA to BB". We write y=f(x)y = f(x): xx is the input, yy its output.
  • f(a)f(a) is the image of aa, and aa is a preimage of f(a)f(a).
  • The domain is AA, the set ff starts from. The codomain is BB, where the images must lie.
  • The range is the set of images actually used, {f(a):a∈A}\{f(a) : a \in A\}. It always sits inside the codomain.
  • When to use it: to test a listed relation, take the elements of AA one by one and count the pairs that start with each.
  • The common slip: rejecting a function because two inputs share an image. That is allowed; one input with two images is not.

Example 1Basic

A={2,3}A = \{2, 3\}, B={4,6,8,9}B = \{4, 6, 8, 9\}. Is R={(2,4),(2,6),(2,8),(3,6),(3,9)}R = \{(2, 4), (2, 6), (2, 8), (3, 6), (3, 9)\} a function from AA to BB? Is f={(2,4),(3,9)}f = \{(2, 4), (3, 9)\}? For the function, write its domain, codomain and range.

See the solution

Step 1: In RR, the pairs that start with 2 are (2,4),(2,6),(2,8)(2, 4), (2, 6), (2, 8): three images

a function gives exactly one image

Step 2: So RR is not a function

one input with two or more images is enough

Step 3: In ff, 2 has one pair, (2,4)(2, 4); so f(2)=4f(2) = 4

exactly one image of 2

Step 4: 3 has one pair, (3,9)(3, 9); so f(3)=9f(3) = 9

exactly one image of 3

Step 5: Every element of AA has exactly one image, so ff is a function; in fact f(x)=x2f(x) = x^2

the meaning of a function

Step 6: Domain {2,3}\{2, 3\}, codomain {4,6,8,9}\{4, 6, 8, 9\}, range {f(2),f(3)}={4,9}\{f(2), f(3)\} = \{4, 9\}

range = images actually used

Answer: RR is not a function; ff is, with range {4,9}\{4, 9\}

WordMeaningFor this ff
Domainthe set ff starts from{2,3}\{2, 3\}
Codomainthe set the images must lie in{4,6,8,9}\{4, 6, 8, 9\}
Rangethe images actually used{4,9}\{4, 9\}

In this chapter you will:

  • test a relation: reflexive, symmetric, transitive, equivalence
  • find an equivalence class
  • decide if a function is one-one, onto or bijective, and prove it
  • count relations and functions on small sets
  • read composition g∘fg \circ f and the inverse f−1f^{-1}

Try it

Is {(1,p),(2,q),(3,p)}\{(1, p), (2, q), (3, p)\} a function from {1,2,3}\{1, 2, 3\} to {p,q,r}\{p, q, r\}? What is its range?

Try it

How many relations are there in a set with 2 elements?

Loading the rest of the chapter…