Sets, Relations and Functions hero

Sets, Relations and Functions

~14 min read

In 30 seconds
  • What: Sets, Relations and Functions covers set operations (union, intersection, Cartesian product), properties of relations (reflexive, symmetric, transitive, equivalence), and types of functions (injective, surjective, bijective) along with composition and invertibility.
  • Why it matters: This topic appears in nearly every NDA paper from 2010 onwards — Venn diagram counting problems, equivalence relation MCQs, and function type identification are consistent scorers that reward pattern recognition over calculation.
  • Key fact: If a set A has \(n\) elements, its power set \(P(A)\) has exactly \(2^n\) elements — a formula NDA papers test directly (e.g., \(A = \{1,3,5,7\}\) gives \(2^4 = 16\) subsets).

Sets, Relations and Functions is the entry point to abstract mathematics in the NDA syllabus. It bridges elementary set theory with the formal study of relations and functions that underlies every other topic — from Probability to Matrices and Determinants. Questions from this chapter appear consistently across NDA I and NDA II papers, often as straightforward MCQs that reward knowing definitions precisely.

Set Theory Basics

A set is a well-defined collection of distinct objects. The two standard notations are roster (listing elements) and set-builder form. For NDA, you need to instantly recognise special sets:

  • Empty set (null set) \(\emptyset\) or \(\{\,\}\) — contains no elements. NDA papers test this: \(\{x : x^2 + 1 = 0,\ x \in \mathbb{R}\}\) is a null set because no real number satisfies \(x^2 = -1\).
  • Universal set \(U\) — the reference set containing all elements under discussion.
  • Power set \(P(A)\) — the set of all subsets of \(A\), including \(\emptyset\) and \(A\) itself.
Power Set Size $$|A| = n \implies |P(A)| = 2^n$$

A PYQ from 2013-II directly asks: if \(A = \{1, 3, 5, 7\}\), what is the cardinality of \(P(A)\)? Since \(|A| = 4\), the answer is \(2^4 = 16\).

Cartesian Product $$A \times B = \{(a, b) : a \in A,\ b \in B\}, \qquad |A \times B| = |A| \cdot |B|$$

A 2013-II PYQ asks: if \(|A| = 5\) and \(|B| = 4\), what is \(|A \times B|\)? The answer is \(20\). Another classic: if \(A\) and \(B\) are two sets having \(n\) elements in common, the number of common elements in \(A \times B\) and \(B \times A\) is \(n^2\) (asked in 2012-I).

⚡ NDA Alert

NDA asks whether a described collection is a set or not — "the set of all good cricket players" is not well-defined and therefore not a set. Always check: is the membership criterion precise and unambiguous?

Set Operations

You must know these operations cold. NDA uses them both in symbolic form and in Venn diagram word problems.

Core Set Operations $$A \cup B \quad \text{— Union (in } A \text{ or } B \text{ or both)}$$ $$A \cap B \quad \text{— Intersection (in both } A \text{ and } B \text{)}$$ $$A \setminus B \quad \text{— Difference (in } A \text{ but not in } B \text{)}$$ $$A' \quad \text{— Complement of } A \text{ (in } U \text{ but not in } A \text{)}$$ $$A \,\Delta\, B = (A \setminus B) \cup (B \setminus A) \quad \text{— Symmetric difference}$$
De Morgan's Laws $$(A \cup B)' = A' \cap B'$$ $$(A \cap B)' = A' \cup B'$$
Distributive Laws $$A \cup (B \cap C) = (A \cup B) \cap (A \cup C)$$ $$A \cap (B \cup C) = (A \cap B) \cup (A \cap C)$$

A 2013-II PYQ presents both distributive laws and asks which is/are correct — both are correct. Another 2010-I question asks: if \(A\) and \(B\) are disjoint, is \(A \setminus B = A \setminus (A \cap B)\) correct? Since \(A \cap B = \emptyset\) when disjoint, \(A \setminus \emptyset = A\), which equals \(A \setminus B = A\). So yes, all options presented there hold.

For Cartesian products: a 2011-I PYQ asks what \((A \times B) \cap (C \times B)\) equals when \(A \cap C \ne \emptyset\) — the answer is \((A \cap C) \times B\).

Venn Diagram Problems

These are the highest-yield questions in this chapter. NDA consistently sets 4–6-part questions around a three-set Venn scenario. Master the inclusion-exclusion formula.

Inclusion-Exclusion (Three Sets) $$|A \cup B \cup C| = |A| + |B| + |C| - |A \cap B| - |B \cap C| - |A \cap C| + |A \cap B \cap C|$$

Work through a real NDA example. In a survey of 25 students (2014-II): 15 took Mathematics, 12 took Physics, 11 took Chemistry, 5 took Maths and Chemistry, 9 took Maths and Physics, 4 took Physics and Chemistry, 3 took all three.

  • Students taking only two subjects $$= (9 - 3) + (5 - 3) + (4 - 3) = 6 + 2 + 1 = 9.$$ The answer is 9.
  • Students taking only Physics $$= 12 - 9 - 4 + 3 = 2.$$ The answer is 2.
  • Check: "At least two subjects" = those taking exactly two + all three $$= 9 + 3 = 12 = 4 \times 3.$$ So statement 2 in the PYQ is correct.

Another pair of questions from 2013-I uses a population of \(75 \times 10^6\): 45% know Hindi, 22% know English, 18% know Sanskrit, with overlaps of 12% (Hindi + English), 8% (English + Sanskrit), 10% (Hindi + Sanskrit), and 5% know all three. Apply inclusion-exclusion: $$|H \cup E \cup S| = 45 + 22 + 18 - 12 - 8 - 10 + 5 = 60\%.$$ Those who know none = 40% of \(75 \times 10^6 = 30 \times 10^6 = 3 \times 10^7\).

⚡ NDA Alert

NDA multi-part Venn questions always give you enough data to find "all three" first. Calculate |A ∩ B ∩ C| before attempting the individual region counts — it anchors everything else in the diagram.

A simpler two-set problem from 2015-I: In a class of 60 students, 45 like music, 50 like dancing, 5 like neither. Those who like both $$= 45 + 50 - (60 - 5) = 95 - 55 = 40.$$

Types of Relations

A relation \(R\) in a set \(A\) is any subset of \(A \times A\). Two extremes are the empty relation (\(R = \emptyset\)) and the universal relation (\(R = A \times A\)). NDA tests whether a given relation is reflexive, symmetric, or transitive — learn the definitions as hard rules, not vague intuitions.

Three Core Properties Reflexive: \((a, a) \in R\) for every \(a \in A\)
Symmetric: \((a, b) \in R \implies (b, a) \in R\)
Transitive: \((a, b) \in R\) and \((b, c) \in R \implies (a, c) \in R\)

Work through NDA PYQs systematically. Consider \(R = \{(1,2), (1,3), (2,1), (3,1), (2,2), (3,3), (2,3)\}\) on \(\{1,2,3\}\) (2012-II): Is \((1,1) \in R\)? No, so not reflexive. Is \((1,2) \in R\) and \((2,1) \in R\)? Yes, so symmetric. Check transitivity: \((1,2)\) and \((2,3)\) gives \((1,3)\) ✓; \((3,1)\) and \((1,2)\) gives \((3,2)\) ✓. It is symmetric and transitive but not reflexive.

The relation "has the same father as" over the set of children (2012-II) is an equivalence relation — it is reflexive (you have the same father as yourself), symmetric (if \(x\) shares a father with \(y\), then \(y\) shares with \(x\)), and transitive (if \(x\) and \(y\) share a father and \(y\) and \(z\) share a father, then \(x\) and \(z\) do too).

A 2014-II PYQ: the relation \(S\) on integers where \(a\,S\,b\) iff \(a\) divides \(b\) — is this an equivalence relation? No. It is reflexive (every integer divides itself) and transitive (if \(a \mid b\) and \(b \mid c\) then \(a \mid c\)), but not symmetric (\(2 \mid 6\) but \(6\) does not divide \(2\)). Answer: only reflexive and transitive.

A 2015-I PYQ: persons \(x, y\) in a city are related if \(|\text{age}(x) - \text{age}(y)| \le 5\). This is reflexive (\(|a - a| = 0 \le 5\)) and symmetric (\(|a - b| = |b - a|\)), but not transitive: if \(x\) is 20, \(y\) is 24, \(z\) is 28 — then \(x\) is related to \(y\) and \(y\) to \(z\) but \(|20 - 28| = 8 > 5\), so \(x\) is not related to \(z\).

⚠ Common Trap

The three properties are independent — reflexive \(\ne\) symmetric \(\ne\) transitive. A relation can be symmetric without being reflexive (e.g., \(R = \{(1,2),(2,1)\}\) on \(\{1,2,3\}\) lacks \((1,1)\)) and transitive without being symmetric ("\(a\) divides \(b\)" is transitive but not symmetric). Never assume one property implies another; check all three separately every time.

Equivalence Relations

A relation that is reflexive, symmetric, and transitive is an equivalence relation. It partitions the set into mutually disjoint equivalence classes.

Equivalence Relation Definition \(R\) is an equivalence relation \(\iff\) \(R\) is reflexive AND symmetric AND transitive

Key NCERT result: the relation \(R = \{(a, b) : 2 \text{ divides } (a - b)\}\) on \(\mathbb{Z}\) is an equivalence relation. It partitions \(\mathbb{Z}\) into exactly two classes: even integers (related to \(0\)) and odd integers (related to \(1\)). Similarly, \(R = \{(a, b) : 5 \text{ divides } (a - b)\}\) on \(\mathbb{Z}\) (NDA 2013-II PYQ, 2015-I PYQ) partitions \(\mathbb{Z}\) into exactly five equivalence classes.

A direct NDA question (2013-II): the relation \(R\) in \(\mathbb{Z}\) given by \(R = \{(a, b) : a - b \text{ is divisible by } 5\}\) is an equivalence relation. The PYQ then states: (1) \(R\) partitions \(\mathbb{Z}\) into five equivalence classes; (2) any two equivalence classes are either equal or disjoint. Both statements are correct.

From the NCERT chapter summary: an equivalence class \([a]\) for equivalence relation \(R\) in \(X\) is the subset of \(X\) containing all elements \(b\) related to \(a\). For finite sets, the number of equivalence relations containing \((1,2)\) and \((2,1)\) in the set \(\{1,2,3\}\) is exactly two — the smallest such relation \(\{(1,1),(2,2),(3,3),(1,2),(2,1)\}\) and the universal relation.

⚡ NDA Alert

Empty relation and universal relation are both equivalence relations — they satisfy all three properties trivially. NDA occasionally asks whether the empty or universal relation has a particular property; always check all three separately.

Types of Functions

A function \(f : X \to Y\) assigns each element of \(X\) to exactly one element of \(Y\). The NDA syllabus specifically tests one-one (injective), onto (surjective), and bijective functions. Get the definitions right — this is where many candidates lose marks by confusing domain, co-domain, and range.

Function Type Definitions One-one (Injective): \(f(x_1) = f(x_2) \implies x_1 = x_2\)
Onto (Surjective): For every \(y \in Y\), there exists \(x \in X\) with \(f(x) = y\)
Bijective: Both one-one and onto

NCERT result that NDA uses: \(f(x) = 2x\) from \(\mathbb{N} \to \mathbb{N}\) is one-one but not onto (odd naturals like \(1\) are never hit). \(f(x) = 2x\) from \(\mathbb{R} \to \mathbb{R}\) is both one-one and onto. \(f(x) = x^2\) from \(\mathbb{R} \to \mathbb{R}\) is neither (\(f(-1) = f(1)\), and \(-1\) has no preimage).

⚠ Common Trap

"Function" has a strict definition: every element of the domain must map to exactly one element of the co-domain. One element with two images disqualifies the relation; one element with no image also disqualifies it. NDA loves giving an arrow-diagram with one stray element in \(A\) pointing nowhere — that is not a function.

A 2014-I PYQ asks about relations listed from \(A = \{u,v,w,x,y,z\}\) to \(B = \{p,q,r,s\}\) — which are not functions? A relation fails to be a function if any element of \(A\) maps to more than one element of \(B\), or maps to no element. Identify such cases by checking each element of \(A\).

For finite sets, NCERT proves: a one-one function \(f : X \to X\) is necessarily onto, and an onto function \(f : X \to X\) is necessarily one-one. This is NOT true for infinite sets — \(f(x) = 2x\) on \(\mathbb{N}\) is one-one but not onto. NDA can ask this as a true/false pair of statements.

Counting One-One Functions The number of one-one functions from \(A\) to itself (permutations) \(= n!\) where \(|A| = n\).
For \(A = \{1,2,3\}\): \(3! = 6\) bijective functions.

The range of \(f(x) = x/|x|\) for \(x \ne 0\) (2015-I PYQ) — this function equals \(+1\) for positive \(x\) and \(-1\) for negative \(x\). So the range is \(\{-1, 1\}\), a set with exactly two elements.

Composition and Inverse Functions

The composition of \(f : A \to B\) and \(g : B \to C\) is \((g \circ f) : A \to C\) defined by \((g \circ f)(x) = g(f(x))\). Composition is associative but generally not commutative — \(g \circ f \ne f \circ g\).

Composition Rule $$(g \circ f)(x) = g(f(x))$$ If \(f\) and \(g\) are both one-one, then \(g \circ f\) is one-one.
If \(f\) and \(g\) are both onto, then \(g \circ f\) is onto.

NCERT example: \(f(x) = \cos x\) and \(g(x) = 3x^2\). Then \((g \circ f)(x) = 3\cos^2 x\) and \((f \circ g)(x) = \cos(3x^2)\). These are not equal, confirming \(g \circ f \ne f \circ g\) in general.

A function \(f : X \to Y\) is invertible if and only if it is bijective. The inverse \(f^{-1}\) satisfies \(f^{-1}(f(x)) = x\) for all \(x \in X\), and \(f(f^{-1}(y)) = y\) for all \(y \in Y\). To find the inverse algebraically, write \(y = f(x)\), solve for \(x\) in terms of \(y\), and that expression is \(f^{-1}(y)\).

NCERT example: \(f(x) = 4x + 3\) from \(\mathbb{N} \to Y\) where \(Y = \{y \in \mathbb{N} : y = 4x + 3 \text{ for some } x \in \mathbb{N}\}\). This is bijective, so $$f^{-1}(y) = \frac{y - 3}{4}.$$

⚠ Common Trap

An inverse exists only when the function is bijective — being one-one alone is not enough. \(f(x) = 2x\) on \(\mathbb{N} \to \mathbb{N}\) is one-one but not onto, so \(f^{-1}\) does not exist on \(\mathbb{N}\). NDA exploits this by giving a one-one function and asking for the inverse without restricting the co-domain — the correct answer is "inverse does not exist".

This topic connects directly to Quadratic Equations (finding domain restrictions for invertibility) and Complex Numbers (where functions on ℂ require special treatment). Understanding bijections also underpins counting arguments in Permutations and Combinations.

Worked Examples

Example 1 — Three-Set Venn Word Problem

Q: In a survey of 60 people, 25 read newspaper H, 26 read T, 26 read I, 9 read both H and I, 11 read both H and T, 8 read both T and I, and 3 read all three. How many read exactly one newspaper?

  • Apply inclusion-exclusion: $$|H \cup T \cup I| = 25 + 26 + 26 - 11 - 8 - 9 + 3 = 52.$$
  • Readers of "exactly two" $$= (11 - 3) + (8 - 3) + (9 - 3) = 8 + 5 + 6 = 19.$$
  • Readers of "all three" \(= 3\).
  • Readers of "exactly one" = total readers − exactly two − all three $$= 52 - 19 - 3 = 30.$$
  • Answer: 30 people read exactly one newspaper.

Example 2 — Equivalence Relation Check

Q: On the set \(A = \{1, 2, 3\}\), is \(R = \{(1,1), (2,2), (3,3), (1,2), (2,1)\}\) an equivalence relation?

  • Reflexive? Check \((1,1), (2,2), (3,3)\) — all present. Yes.
  • Symmetric? \((1,2) \in R\) and \((2,1) \in R\). All other off-diagonal pairs are absent on both sides. Yes.
  • Transitive? \((1,2)\) and \((2,1)\) give \((1,1)\) ✓; \((2,1)\) and \((1,2)\) give \((2,2)\) ✓. No new pair fails the rule. Yes.
  • All three properties hold, so \(R\) is an equivalence relation.
  • Equivalence classes: \([1] = [2] = \{1, 2\}\) and \([3] = \{3\}\).

Example 3 — Composite Function Evaluation

Q: If \(f(x) = 2x\) and \(g(x) = x + 3\), find \((g \circ f)(x)\) and \((f \circ g)(x)\). Are they equal?

  • $$(g \circ f)(x) = g(f(x)) = g(2x) = 2x + 3.$$
  • $$(f \circ g)(x) = f(g(x)) = f(x + 3) = 2(x + 3) = 2x + 6.$$
  • Compare: \(2x + 3 \ne 2x + 6\) for any \(x\). Composition is not commutative.
  • Answer: \((g \circ f)(x) = 2x + 3\), \((f \circ g)(x) = 2x + 6\) — they are not equal.

Exam Shortcuts (Pro-Tips)

Sets and relations questions reward pattern recognition over calculation. The three shortcuts below collapse the most-tested NDA patterns into one-line drills — memorise them cold.

Shortcut 1 — Always Draw a Venn Diagram for Word Problems

For any problem of the form "X students play cricket, Y play football, Z play both…", do not attempt algebra. Sketch a two- or three-circle Venn, write the "all three" value in the centre first, then fill outward by subtracting overlaps. NDA word problems are designed to be solved in under 60 seconds once the diagram is drawn.

Shortcut 2 — Two-Set Cardinality Formula

Guaranteed to appear in some form every paper. Commit it to muscle memory:

Two-Set Inclusion-Exclusion $$n(A \cup B) = n(A) + n(B) - n(A \cap B)$$

Rearranged form for the most common "how many like both" question: $$n(A \cap B) = n(A) + n(B) - n(A \cup B).$$

Shortcut 3 — Three-Set Extended Formula

Plus signs on the single terms and the triple intersection; minus signs on every pairwise intersection. The sign pattern is +, −, + — easy to recall as "alternating by overlap depth".

Three-Set Inclusion-Exclusion $$n(A \cup B \cup C) = n(A) + n(B) + n(C) - n(A \cap B) - n(B \cap C) - n(A \cap C) + n(A \cap B \cap C)$$

Shortcut 4 — Power Set Size at a Glance

If \(|A| = n\), then \(|P(A)| = 2^n\). NDA tests this with small \(n\) (usually 3, 4, or 5) — answer in 2 seconds:

Power Set Counts \(n = 3 \to 8\)  ·  \(n = 4 \to 16\)  ·  \(n = 5 \to 32\)  ·  \(n = 6 \to 64\)

Shortcut 5 — Equivalence Class Count from "Divisible by k"

The relation $$R = \{(a,b) : k \text{ divides } (a-b)\}$$ on \(\mathbb{Z}\) is always an equivalence relation, and it partitions \(\mathbb{Z}\) into exactly \(\boldsymbol{k}\) equivalence classes (residue classes mod \(k\)). NDA 2013-II asked this for \(k = 5\) — answer is 5 classes, no derivation needed.

How NDA Tests This Topic

NDA PYQ Pattern: Sets, Relations and Functions

This topic has appeared in every NDA paper from 2010 through 2015 in the extracted PYQs, typically contributing 6–10 questions per paper. Three consistent question types:

  • Venn diagram counting (3–5 questions in multi-part sets): Always involve three overlapping sets, inclusion-exclusion, and finding "only one", "exactly two", or "all three" regions.
  • Relation classification (1–3 questions): Identify whether a given relation on a specific set is reflexive, symmetric, transitive, or an equivalence relation.
  • Function type identification (1–2 questions): Given f(x) and its domain/co-domain, determine one-one, onto, or neither.
NDA PYQ Sample Questions by Year
Year Question Type Key Concept Tested
2010-I Set cardinality: \(A \times (B \cap C)\) Cartesian product with intersection
2011-I Multi-part: three languages, 28 learn none Inclusion-exclusion, region counting
2012-II Relation \(R\) on \(\{1,2,3\}\): classify \(R\) Reflexive/symmetric/transitive check
2013-II Power set \(|P(A)|\) for \(A = \{1,3,5,7\}\) \(2^n\) formula
2014-I Which listed relations are NOT functions? Function definition check
2015-I Range of \(f(x) = x/|x|\), \(x \ne 0\) Piecewise function range
2015-II Persons related if age difference \(\le 5\) Equivalence relation (fails transitivity)

For a structured drill on all variants, try the topic-specific mock on the mock test platform. Time pressure in NDA means you need to classify relations in under 90 seconds — that speed comes from repeated practice with real questions.

Test Your Sets, Relations and Functions

Work through timed NDA-pattern questions on Venn diagrams, equivalence relations, and function types. Identify your gaps before exam day.

Start Free Mock Test

Frequently Asked Questions

What is the difference between a relation and a function in NDA context?

A relation from \(A\) to \(B\) is any subset of \(A \times B\) — one element of \(A\) can map to multiple elements of \(B\), or to none. A function is a special relation where every element of \(A\) maps to exactly one element of \(B\). In NDA PYQs, you identify non-functions by spotting an element with two outputs or an element with no output.

How do I quickly check if a relation is an equivalence relation?

Run three checks in order: (1) Reflexive — is \((a, a)\) in \(R\) for every \(a\)? (2) Symmetric — whenever \((a, b)\) is in \(R\), is \((b, a)\) also in \(R\)? (3) Transitive — whenever \((a, b)\) and \((b, c)\) are both in \(R\), is \((a, c)\) in \(R\)? All three must hold. If any one fails, the relation is not an equivalence relation.

Why is f(x) = x/|x| range equal to {−1, 1} and not all reals?

For any \(x > 0\), \(f(x) = x/x = 1\). For any \(x < 0\), \(f(x) = x/(-x) = -1\). The function only produces two distinct output values regardless of input — so the range is the two-element set \(\{-1, 1\}\). This appeared directly in the NDA 2015-I paper.

How many subsets does a set with n elements have?

A set with \(n\) elements has exactly \(2^n\) subsets, including the empty set and the set itself. These subsets form the power set \(P(A)\). For \(A = \{1,3,5,7\}\) with 4 elements: \(2^4 = 16\) subsets. NDA tested this directly in a 2013-II question asking for the cardinality of \(P(A)\).

What is the formula for three-set Venn problems and how do I use it?

Use $$|A \cup B \cup C| = |A| + |B| + |C| - |A \cap B| - |B \cap C| - |A \cap C| + |A \cap B \cap C|.$$ For NDA multi-part questions, first find \(|A \cap B \cap C|\) from the given data, then compute each pairwise intersection minus the triple, and finally find "only" regions by subtracting all overlaps from each individual set size.

Is the relation "x is 5 years older than y" an equivalence relation?

No. It is not reflexive (you cannot be 5 years older than yourself), not symmetric (if \(x\) is 5 years older than \(y\), then \(y\) is younger than \(x\), not older), and it is transitive (if \(x\) is 5 years older than \(y\) and \(y\) is 5 years older than \(z\), then \(x\) is 10 years older than \(z\) — but the relation requires exactly 5 years, so transitivity also fails in that formulation). NDA 2014-I tested a similar question with the answer "symmetric but neither reflexive nor transitive".

What is a bijective function and why does it matter for inverse functions?

A bijective function is both one-one (injective) and onto (surjective). It matters because a function is invertible if and only if it is bijective. One-one ensures the inverse is well-defined (no two \(x\) values share the same \(y\)). Onto ensures every \(y\) in the co-domain has an \(x\) to map back to. Only bijective functions have a true inverse function.