Relations and Functions: From Ordered Pairs to Well-Behaved Machines

A from-scratch, NCERT-aligned guide to ordered pairs, Cartesian products, relations, domain, range and codomain, and the different types of functions, built up with everyday Indian analogies and fully worked examples so you truly understand the ideas that power JEE, NEET and CUET maths.

By the PadhoDost Team · 📖 8 min read · Updated 4 August 2026

Part of Class 11 (CBSE) prep

🧠 Think of a classroom attendance register

Imagine your Class 11 attendance register. On the left is a column of roll numbers (1, 2, 3, ...), and on the right is a column of student names. The register PAIRS each roll number with a name. That simple idea, pairing things from one collection with things from another, is the heart of this whole chapter. Relations and functions are just careful, mathematical ways of writing down such pairings. Padho, dost, and you will see it is far friendlier than it looks!

Ordered pairs: order matters

An ordered pair is just two things written in a fixed order, inside brackets, like (2, 5). The first thing is called the first component, the second is the second component. The word 'ordered' is the whole point: (2, 5) is NOT the same as (5, 2), exactly like the seat 'row 2, column 5' in a cinema is a different seat from 'row 5, column 2'. Two ordered pairs are equal only when their first components match AND their second components match.

(a, b) = (c, d) if and only if a = c and b = d

📝 Using equality of ordered pairs

Question: If (x + 1, y - 2) = (3, 1), find x and y.

Match first components: x + 1 = 3, so x = 2.

Match second components: y - 2 = 1, so y = 3.

Answer: x = 2 and y = 3.

Cartesian product: pairing every element with every element

Given two sets A and B, the Cartesian product A x B (read 'A cross B') is the set of ALL ordered pairs where the first element comes from A and the second comes from B. You take each element of A and pair it with every element of B, one by one, leaving nothing out.

A x B = { (a, b) : a is in A and b is in B }

📝 Building a Cartesian product

Let A = {1, 2} and B = {x, y}.

Pair 1 with each element of B: (1, x), (1, y).

Pair 2 with each element of B: (2, x), (2, y).

So A x B = {(1, x), (1, y), (2, x), (2, y)}.

Count check: A has 2 elements, B has 2 elements, so A x B has 2 x 2 = 4 pairs.

💡 Counting rule: if set A has m elements and set B has n elements, then A x B has exactly m x n ordered pairs. This is why, if a set A has n elements, the number of possible relations from A to A is 2 raised to the power (n x n), because a relation is any subset of the n x n pairs in A x A.

Relations: choosing some pairs by a rule

A relation R from set A to set B is simply any subset of A x B. In plain words: out of all the possible pairs, a relation picks the ones that obey some rule. The domain of R is the set of all first components that actually appear; the range is the set of all second components that appear; and B is called the codomain (the full 'target' set B, whether or not every element gets used).

📝 A relation defined by a rule

Let A = {1, 2, 3, 4} and define R = {(a, b) : b = a + 1, with a and b both in A}.

Test each a: a = 1 gives b = 2 (valid), a = 2 gives b = 3 (valid), a = 3 gives b = 4 (valid), a = 4 gives b = 5 (5 is not in A, reject).

So R = {(1, 2), (2, 3), (3, 4)}.

Domain of R = {1, 2, 3} (the first components that appear).

Range of R = {2, 3, 4} (the second components that appear).

Codomain = A = {1, 2, 3, 4} (the whole target set).

Functions: the special, well-behaved relations

A function f from A to B is a relation in which EVERY element of A is paired with exactly one element of B. Two conditions must hold: (1) no element of A is left out, and (2) no element of A points to two different outputs. Go back to the attendance register: each roll number has one and only one name beside it, that is a function. If one roll number somehow had two names, the register would be broken, and so is the function.

🧠 A function is like a vending machine

Press the button for a cold drink and you always get that same cold drink, never sometimes a drink and sometimes a samosa. One input, one fixed output, every single time. That reliability is exactly what makes a relation a function. If pressing one button could give two different things on different days, it would fail the function test, just like a relation that maps one input to two outputs.

⚠️ Common mistake: students think 'one output per input' means every input must give a DIFFERENT output. Not true! A function is allowed to send many inputs to the same output (for example f(x) = 5 for all x is a perfectly valid constant function). The rule only forbids one input having two outputs, not two inputs sharing one output.
Type of functionRule in simple wordsQuick example
One-one (injective)Different inputs always give different outputsf(x) = 2x on real numbers
Many-oneAt least two different inputs share the same outputf(x) = x squared (since -2 and 2 both give 4)
Onto (surjective)Every element of the codomain is actually hitf(x) = x + 1 from reals to reals
IntoAt least one codomain element is never hitf(x) = x squared from reals to reals (negatives never appear)

How to check if a given relation is a function

  1. 1List the domain set A (all allowed inputs).
  2. 2For each element of A, find how many pairs in the relation start with it.
  3. 3If any element of A appears zero times, it is NOT a function (an input was left out).
  4. 4If any element of A appears two or more times with different second components, it is NOT a function (one input, many outputs).
  5. 5If every element of A appears exactly once as a first component, it IS a function.

Chapter in a nutshell

  • Ordered pair: (a, b), order matters; equal only if both components match.
  • Cartesian product A x B: all pairs (a, b) with a in A, b in B; has m x n elements.
  • Relation: any subset of A x B, chosen by a rule.
  • Domain = first components used; Range = second components used; Codomain = the whole target set B.
  • Function: every input has exactly one output; range is a subset of the codomain.
  • Types: one-one vs many-one (about inputs), onto vs into (about covering the codomain).

⚡ Quick check

Let A = {1, 2, 3}. Which of these relations from A to A is a FUNCTION?

Ready to test yourself? 🎯

Lock it in with the practice test for this chapter.

Take the practice test →

Keep studying

See all Class 11 (CBSE) study material →