E ExamMaster

AP EAPCET (Engineering) · Mathematics (JEE & NDA)

Sets, Relations and Functions

Set operations and algebra, types of relations, equivalence relations, and one one, onto and composite functions.

Seven concepts from counting through maps: inclusion-exclusion and power sets, the three relation axioms and equivalence, then injectivity, surjectivity, counting functions, composition and natural domain.

  • AP EAPCET (Engineering)
  • Easy level
  • 7 concepts
  • 5 practice questions

1Inclusion-exclusion for two sets

For finite sets, the size of a union is not the sum of the sizes. Each element of the intersection would be counted twice if you added n(A) and n(B) alone, so n(A\cup B)=n(A)+n(B)-n(A\cap B). For three sets the same idea continues: add the singles, subtract the pairwise overlaps, then add back the triple overlap that was subtracted too often.

When a problem gives a universal set and asks how many elements lie in none of the named subsets, compute the union first and subtract from the total.

Figure. Partition of A\cup B into only A, the overlap A\cap B, and only B. Adding n(A)+n(B) counts the overlap twice, so subtract it once.

How it works

  1. Add the partsWrite n(A)+n(B). Every element of A\cap B has been counted twice.
  2. Subtract the overlap onceReplace the double count by a single count: subtract n(A\cap B).
  3. Neither, if askedIf a universe U is given, n(U)-n(A\cup B) is the count outside both sets.

Counting with two sets

In a class of 40 students, 25 play cricket, 20 play football and 10 play both. How many play neither game?

  • n(C\cup F)=25+20-1035
  • Neither =40-355

Pro tip. Always subtract the intersection once when adding two sets; forgetting it double-counts the overlap.

If n(A)=12, n(B)=9 and n(A\cup B)=15, then n(A\cap B) equals
  1. 6
  2. 3
  3. 21

Rearrange: n(A\cap B)=n(A)+n(B)-n(A\cup B)=12+9-15=6. The trap 21 adds instead of subtracting; 3 undercounts the overlap.

2Subsets of a finite set

A set with n elements has 2^n subsets: for each element there are two choices — include it or leave it out — and the choices multiply. That count includes the empty set and the set itself.

The number of non-empty subsets is therefore 2^n-1. "Proper subset" wording in a question needs a careful read: some papers exclude only the set itself, others also exclude the empty set — match the definition the paper is using.

Figure. A 4-element set has 2^4=16 subsets, one yes-or-no choice per element. Dropping the empty set leaves 16-1=15 non-empty subsets.

How it works

  1. One bit per elementLabel the elements 1,\ldots,n. A subset is a choice of yes/no for each label.
  2. MultiplyIndependent binary choices give 2\times 2\times\cdots\times 2=2^n subsets.
  3. Drop the empty set if askedNon-empty count is 2^n-1.

Power set of a 4-set

How many subsets does a set with 4 elements have? How many of them are non-empty?

  • Total subsets =2^416
  • Non-empty =16-115

Pro tip. Write 2^n first; subtract 1 only when the question has ruled out the empty set.

A set has 32 subsets. How many elements does it have?
  1. 5
  2. 16
  3. 32

2^n=32 forces n=5. Sixteen is half of 32, not the exponent; 32 confuses the subset count with the cardinality.

3Reflexive, symmetric, transitive

A relation R on a set A is a subset of A\times A. Three properties are examined constantly: R is reflexive if aRa for every a\in A; symmetric if aRb always forces bRa; transitive if aRb and bRc together force aRc.

Each property is independent of the others. A relation can be symmetric and not transitive, reflexive and not symmetric, and so on — the exam asks you to test the definition, not to guess from a name.

Check the three axioms on pairs: a loop at every element (reflexive), every arrow reversible (symmetric), and closed chains (transitive). The table in this concept lists all three.

How to test

  1. Fix the ground setWrite A explicitly. Reflexivity is meaningless until you know every element that must appear on the diagonal.
  2. Check each axiomFor a finite R, scan pairs for the symmetric and transitive failures; confirm every (a,a) for reflexivity.
  3. Name only what holdsReport each property that survives. Do not call it an equivalence until all three hold.
The three tests
PropertyWhat you must checkTypical failure
ReflexiveaRa for every a\in AA diagonal pair (a,a) is missing
SymmetricaRb\Rightarrow bRa(a,b) is in R but (b,a) is not
TransitiveaRb and bRc\Rightarrow aRcA chain of two pairs with no closing pair
On A=\{1,2,3\}, the relation R=\{(1,1),(2,2),(3,3),(1,2)\} fails to be
  1. Reflexive
  2. Symmetric
  3. A relation on A at all

Every diagonal pair is present, so R is reflexive, and it is a subset of A\times A. It fails symmetry because (1,2)\in R but (2,1)\notin R.

4Equivalence relations and partitions

A relation that is reflexive, symmetric and transitive is an equivalence relation. Equivalence relations are exactly the relations that partition the ground set into disjoint equivalence classes: a and b lie in the same class precisely when aRb.

Counting equivalence relations on a finite set is the same as counting partitions of that set — the Bell numbers. On a 3-element set there are exactly 5 equivalence relations.

Six numbered elements drift into three colour-coded disjoint blocks that cover the set, summarised as an equivalence partition.
An equivalence relation partitions the set: classes are pairwise disjoint and their union is the whole set.

How it works

  1. Confirm all three axiomsReflexive, symmetric and transitive — miss one and it is not an equivalence.
  2. Read the classesThe class of a is \{x: aRx\}. Distinct classes are disjoint and their union is A.
  3. Count via partitionsEach partition of A is the class set of exactly one equivalence relation. For |A|=3 the Bell number is 5.
Partitions of a 3-set
Partition shapeNumberClasses
One block of three1\{\{a,b,c\}\}
One pair and a singleton3\{\{a,b\},\{c\}\} and the two swaps
Three singletons1\{\{a\},\{b\},\{c\}\}
The number of equivalence relations on a set with 3 elements is
  1. 5
  2. 3
  3. 8

Bell number B_3=5: one partition into a single triple, three into a pair-plus-singleton, and one into three singletons. Three counts only the pair-plus-singleton shape; eight is 2^3, the relation count with no axioms.

5One-one, onto and bijective

A function f:A\to B is one-one (injective) when distinct inputs give distinct outputs: f(x_1)=f(x_2) forces x_1=x_2. It is onto (surjective) when every element of B is an image. It is bijective when it is both.

Only bijections are invertible. When an inverse exists, f^{-1}(f(x))=x and f(f^{-1}(y))=y. A calculus shortcut for injectivity on an interval: if f' keeps a constant sign, f is strictly monotonic and therefore one-one.

Figure. y=x^3 is strictly increasing, hence one-one; y=x^2 fails injectivity because two x-values share each positive height. Onto depends on the chosen codomain.

How to test

  1. One-oneAssume f(x_1)=f(x_2) and deduce x_1=x_2, or show f' does not change sign on the interval.
  2. OntoFor an arbitrary y\in B, solve f(x)=y and show a solution in A always exists.
  3. InverseDeclare invertibility only after both tests pass.
Map types
TypeMeaningInverse?
One-oneDistinct inputs → distinct outputsLeft inverse on the image
OntoEvery b\in B is f(a) for some aRight inverse exists
BijectiveOne-one and ontoTwo-sided inverse f^{-1}
A function f:A\to B has an inverse f^{-1}:B\to A if and only if f is
  1. One-one, but not necessarily onto
  2. Onto, but not necessarily one-one
  3. Bijective

A two-sided inverse needs every output hit exactly once: onto for existence of a pre-image, one-one for uniqueness. Either property alone is not enough.

6Counting functions and onto maps

The number of functions from a set of m elements to a set of n elements is n^m: each of the m inputs may land on any of n outputs. The number of one-one functions, when m\le n, is \dfrac{n!}{(n-m)!} — an injection is an ordered selection of m distinct images.

Onto maps are counted by inclusion-exclusion: \sum_{r=0}^{n}(-1)^r\binom{n}{r}(n-r)^m. For a two-element codomain the formula collapses to a shortcut — 2^m-2 — total maps minus the two constant functions.

Figure. Maps from a 4-set to a 2-set: 2^4=16 functions in all. Onto maps drop the two constant functions, leaving 16-2=14.

How it works

  1. Total mapsEach of m domain elements has n choices, so n^m functions.
  2. InjectionsChoose distinct images in order: n(n-1)\cdots(n-m+1)=\dfrac{n!}{(n-m)!} for m\le n.
  3. Onto to a 2-setSubtract the two constant maps from 2^m to leave 2^m-2.

Number of onto functions

How many onto functions are there from a set of 4 elements to a set of 2 elements?

  • Total functions =2^416
  • Subtract the two constant maps16-2
  • Onto functions14

Pro tip. For a 2-element codomain, onto count is simply 2^m-2; only the two constant maps miss an element.

The number of one-one functions from a 3-element set to a 5-element set is
  1. 60
  2. 125
  3. 15

\dfrac{5!}{(5-3)!}=5\times 4\times 3=60. The option 125 is 5^3, the total function count; 15 is \binom{5}{3}, which forgets order.

7Composition and natural domain

Composition is (g\circ f)(x)=g(f(x)) — apply f first, then g. Composition is associative but generally not commutative: g\circ f and f\circ g need not even both be defined, let alone equal. Associativity still holds in the form (h\circ g)\circ f=h\circ(g\circ f) whenever both sides are defined.

The natural domain of a real function is the largest subset of \mathbb{R} on which the expression makes sense. Exclude values that make a denominator zero or a square-root argument negative. For f(x)=\sqrt{x} the domain is x\ge 0; for \log x it is x>0.

Figure. y=\sqrt{x} is drawn only for x\ge 0: the curve starts at the origin and never enters x<0. That missing half-line is the natural-domain cut.

How it works

  1. Read inside-outIn g\circ f, evaluate f(x) first; that output must lie in the domain of g.
  2. Do not swapCheck whether f\circ g is even defined before claiming equality with g\circ f.
  3. Carve the domainFor a formula, strike out points where a denominator vanishes or a root/log argument leaves its allowed set.
The natural domain of f(x)=\sqrt{x} is
  1. x>0
  2. x\ge 0
  3. All real x

A real square root needs a non-negative argument, and 0 is allowed: \sqrt{0}=0. The strict inequality x>0 is the domain of \log x, not of \sqrt{x}.

Notes

  • Set operations and counting: For finite sets, n(A\cup B)=n(A)+n(B)-n(A\cap B) and for three sets the inclusion-exclusion principle adds back the triple overlap. A set with n elements has 2^n subsets and 2^n-1 proper non-empty subsets counted appropriately.
  • Relations: A relation R on set A is reflexive if aRa for all a, symmetric if aRb\Rightarrow bRa, and transitive if aRb, bRc\Rightarrow aRc. A relation that is all three is an equivalence relation and partitions A into disjoint equivalence classes.
  • Functions and their types: A function f:A\to B is one-one (injective) if distinct inputs give distinct outputs, onto (surjective) if every element of B is an image, and bijective if both. Only bijections are invertible, with f^{-1}(f(x))=x.
  • Composition and counting maps: Composition (g\circ f)(x)=g(f(x)) is associative but generally not commutative. The number of functions from a set of m elements to one of n elements is n^m, and the number of one-one functions (m\le n) is \dfrac{n!}{(n-m)!}.
  • Domain and range basics: The natural domain excludes values making a denominator zero or a square-root argument negative. For f(x)=\sqrt{x} the domain is x\ge0; for \log x it is x>0.

Formulas

  • Inclusion-exclusion: n(A\cup B)=n(A)+n(B)-n(A\cap B)
  • Subsets: number of subsets of an n-set =2^n
  • Functions: total maps =n^m, injective maps =\dfrac{n!}{(n-m)!}
  • Onto maps (m\to n): \sum_{r=0}^{n}(-1)^r\binom{n}{r}(n-r)^m
  • Composition: (g\circ f)(x)=g(f(x))
  • Inverse: f^{-1}\circ f=I (exists iff f is a bijection)

Exam traps & shortcuts

  • To check if a function is one-one, either show f'(x) keeps a constant sign (monotonic) or verify f(x_1)=f(x_2)\Rightarrow x_1=x_2 algebraically.
  • The number of equivalence relations on a set equals the number of ways to partition it (the Bell number); for a 3-element set there are 5.
  • For onto functions from an m-set to a 2-set, the count is 2^m-2 (total minus the two constant maps) - a quick shortcut for small n.

Reference tables

Counts and composition identities used across the topic.

Formula sheet
NameStatementWatch
Inclusion-exclusionn(A\cup B)=n(A)+n(B)-n(A\cap B)Subtract the overlap once
Subsets2^n subsets of an n-setNon-empty: 2^n-1
All mapsn^m functions m\to nEach input chooses freely
Injections\dfrac{n!}{(n-m)!} for m\le nOrder matters
Onto (m\to n)\sum_{r=0}^{n}(-1)^r\binom{n}{r}(n-r)^mFor n=2: 2^m-2
Composition(g\circ f)(x)=g(f(x))Associative, not commutative
Inversef^{-1}\circ f=IExists iff f is bijective

Recap

Read only this the night before.

Union
n(A\cup B)=n(A)+n(B)-n(A\cap B). Neither is total minus the union.
Subsets
An n-set has 2^n subsets; drop one for non-empty.
Relations
Reflexive, symmetric, transitive — test each axiom. All three means equivalence, and that partitions the set.
Bell
Equivalence relations on a 3-set: five, one per partition.
Maps
One-one, onto, both. Only bijections invert. Total maps n^m; injections \dfrac{n!}{(n-m)!}; onto to a 2-set is 2^m-2.
Compose
(g\circ f)(x)=g(f(x)) is associative, not commutative. Domain of \sqrt{x} is x\ge 0; of \log x, x>0.

Practise Sets, Relations and Functions

Reading is free and needs no account. Practice, mocks and progress live in the app.

  • 5 exam-style questions on this topic, with explanations
  • A 6-question practice set that ends the chapter
  • Timed mocks scored with the real marking scheme
  • Readiness tracked per topic, kept on your device
Continue with Google — freeNo card, no trial. Works offline once installed.