Relations and Functions

Pick up any two collections of things — a set of colours and a set of garments, a set of states and a set of licence codes, a set of students and a set of roll numbers — and ask a simple question: in how many ordered ways can you pair one item from the first set with one item from the second? That question, asked and answered precisely, is where this chapter begins. Pairing every element of a set AA with every element of a set BB, in a fixed order, produces the Cartesian product A×BA \times B, and once you can count and manipulate these ordered pairs, a much richer idea appears almost for free: a relation, which is nothing but a chosen subset of A×BA \times B — a rule that links some elements of AA to some elements of BB. Among all possible relations, one very special kind deserves its own name, because it is the one that mathematics leans on more than any other single idea: a function, a relation in which every input has exactly one output. Functions are the machines of mathematics — feed in a number, get out a number, always the same one for the same input. This chapter builds that machine from scratch: ordered pairs, then Cartesian products, then relations with their domain and range, then functions, then a gallery of standard functions (identity, constant, polynomial, rational, modulus, signum, greatest integer) whose graphs you must be able to sketch on sight, and finally an algebra for combining functions by adding, subtracting, multiplying and dividing them. Everything that follows in your mathematical life — trigonometric functions, exponential and logarithmic functions, limits, derivatives — is built on the vocabulary fixed here. Master the distinction between a relation and a function now, and the rest of calculus reads as a natural extension rather than a fresh mystery.

Key takeaways
  • An ordered pair (a,b)(a,b) has order built in: (a,b)=(c,d)(a,b) = (c,d) if and only if a=ca = c and b=db = d; in general (a,b)≠(b,a)(a,b) \neq (b,a).
  • The Cartesian product A×B={(a,b):a∈A, b∈B}A \times B = \{(a,b) : a \in A,\ b \in B\} collects every ordered pair with first entry from AA and second entry from BB; if n(A)=pn(A) = p and n(B)=qn(B) = q, then n(A×B)=pqn(A \times B) = pq.
  • Cartesian product is not commutative: A×B≠B×AA \times B \neq B \times A in general, and A×φ=φA \times \varphi = \varphi for any set AA.
  • A relation RR from AA to BB is any subset of A×BA \times B; its domain is the set of first elements used, its range is the set of second elements used, and the whole set BB is its codomain, with range ⊆\subseteq codomain always.
  • The total number of relations from a set with n(A)=pn(A)=p to a set with n(B)=qn(B)=q is 2pq2^{pq}, since a relation is any subset of the pqpq-element set A×BA \times B.
  • A function is a relation from AA to BB in which every element of AA has one and only one image in BB; if (a,b)∈f(a,b) \in f we write f(a)=bf(a) = b, with aa the preimage and bb the image.
  • A real function has both its domain and its range as subsets of R\mathbb{R}; the chapter catalogues seven standard real functions — identity, constant, polynomial, rational, modulus, signum, greatest integer — each with a signature graph.
  • The algebra of real functions lets you build new functions from old: (f±g)(x)=f(x)±g(x)(f \pm g)(x) = f(x) \pm g(x), (fg)(x)=f(x)g(x)(fg)(x) = f(x)g(x), (αf)(x)=αf(x)(\alpha f)(x) = \alpha f(x), and (f/g)(x)=f(x)/g(x)(f/g)(x) = f(x)/g(x) wherever g(x)≠0g(x) \neq 0.
  • Finding the domain of an algebraic real function usually means excluding points that make a denominator zero or a square-root argument negative; the range is found by analysing what values the formula can actually output.
  • Key idea: a relation is any chosen subset of the Cartesian product A times B, and a function is the special relation in which every element of the domain has exactly one image, so the whole chapter is a ladder from ordered pairs to Cartesian products to relations to functions to an algebra for combining them.
The core insight

A relation from AA to BB is any subset of the Cartesian product A×BA \times B, and a function is the special case where every element of AA is paired with exactly one element of BB, giving the entire chapter's ladder: ordered pairs →\to Cartesian products →\to relations (domain, codomain, range) →\to functions →\to standard real functions and their algebra.

What this chapter covers

The chapter climbs a short, tight ladder of ideas. It opens with the ordered pair and the rule for when two ordered pairs are equal, then builds the Cartesian product A×BA \times B of two sets, counts its elements, and records how it interacts with union, intersection and the empty set. On top of that foundation sits the relation: any subset of A×BA \times B, described either by roster or set-builder form, together with the vocabulary of domain, codomain and range and the count of all possible relations between two finite sets. The chapter then isolates the function as the relation obeying the strict "one image per input" rule, and works through a gallery of standard real functions — identity, constant, polynomial, rational, modulus, signum and greatest integer — each defined algebraically and sketched graphically. It closes with the algebra of real functions, the rules for adding, subtracting, scaling, multiplying and dividing two functions defined on a common domain.

The core ideas

Ordered pairs and the Cartesian product

An ordered pair is a pair of elements written in a fixed order and grouped in brackets, (p,q)(p,q), with pp coming from one set and qq from another. Order matters absolutely: the licence code (DL,01)(\text{DL}, 01) is not the same object as (01,DL)(01, \text{DL}). This gives the defining rule for equality of ordered pairs, and from it the formal definition of the Cartesian product.

(a,b)=(c,d)  ⟺  a=c and b=d.(1)(a,b) = (c,d) \iff a = c \text{ and } b = d. \qquad (1)
A×B={(a,b):a∈A, b∈B}.(2)A \times B = \{(a,b) : a \in A,\ b \in B\}. \qquad (2)

where: in equation (1)(1), a,ca,c are the first entries and b,db,d the second entries of two ordered pairs, and the double arrow means the two conditions on the right are both necessary and sufficient for the pair equality on the left. In equation (2)(2), AA and BB are any two non-empty sets, and A×BA \times B (read "AA cross BB") is the set of every ordered pair with first coordinate in AA and second coordinate in BB. For A={red,blue}A = \{\text{red}, \text{blue}\} and B={b,c,s}B = \{b, c, s\}, listing all such pairs gives A×B={(red,b),(red,c),(red,s),(blue,b),(blue,c),(blue,s)}A \times B = \{(\text{red},b), (\text{red},c), (\text{red},s), (\text{blue},b), (\text{blue},c), (\text{blue},s)\} — six pairs in all, one for every way of picking a colour and then an object. If either AA or BB is empty, there is nothing to pair, so A×φ=φA \times \varphi = \varphi for every set AA. The product does not commute: swapping the roles of AA and BB generally gives a genuinely different set of pairs, since (a,b)(a,b) and (b,a)(b,a) are equal only in the special case a=ba = b. The idea extends naturally to three sets: A×A×A={(a,b,c):a,b,c∈A}A \times A \times A = \{(a,b,c) : a,b,c \in A\}, whose members are called ordered triplets, and R×R={(x,y):x,y∈R}\mathbb{R} \times \mathbb{R} = \{(x,y): x,y \in \mathbb{R}\} is precisely the set of coordinates of every point in the Cartesian plane — the reason this construction is named after Descartes.

Figure
A rectangular grid of dots showing the Cartesian product of a two element set and a three element set with six ordered pairs marked in rows and columns
A cross B — every element of A paired with every element of B, in order A = {a1, a2} B = {b1, b2, b3} a1 a2 b1 b2 b3 (a1,b1) (a2,b1) (a1,b2) (a2,b2) (a1,b3) (a2,b3) n(A) = 2, n(B) = 3 n(A x B) = 2 x 3 = 6 one dot for every ordered pair Six rows-and-columns dots, exactly pq pairs for p elements in A and q elements in B

Relations: domain, codomain and range

A relation turns a raw Cartesian product into something meaningful by selecting only the pairs that satisfy some rule.

Definition. A relation RR from a non-empty set AA to a non-empty set BB is a subset of the Cartesian product A×BA \times B. The subset is picked out by describing a relationship between the first element and the second element of each ordered pair. If (x,y)∈R(x,y) \in R, we say yy is the image of xx under RR, and xx is a preimage of yy.

domain(R)={x:(x,y)∈R},range(R)={y:(x,y)∈R}⊆B=codomain(R).(3)\text{domain}(R) = \{x : (x,y) \in R\}, \qquad \text{range}(R) = \{y : (x,y) \in R\} \subseteq B = \text{codomain}(R). \qquad (3)

where: the domain collects every first element actually used by some pair in RR, the range collects every second element actually used, and the codomain is the entire target set BB, whether or not every element of BB gets used. Range is always a subset of codomain, and it can be a proper subset — an element of BB that no pair points to simply sits in the codomain unused. For A={1,2,3,4,5,6}A = \{1,2,3,4,5,6\} and R={(x,y):y=x+1}R = \{(x,y): y = x+1\}, the roster form is R={(1,2),(2,3),(3,4),(4,5),(5,6)}R = \{(1,2),(2,3),(3,4),(4,5),(5,6)\}, so the domain is {1,2,3,4,5}\{1,2,3,4,5\} (element 66 has no partner and drops out), the range is {2,3,4,5,6}\{2,3,4,5,6\}, and the codomain remains the full set {1,2,3,4,5,6}\{1,2,3,4,5,6\} by definition, regardless of what is actually hit. A relation can be written in roster form (listing pairs), in set-builder form (stating the rule), or drawn as an arrow diagram, with arrows running from each element of AA to its image or images in BB. Since a relation is any subset of A×BA \times B, and a set with nn elements has 2n2^n subsets, the total number of relations from a set of size pp to a set of size qq is 2pq2^{pq} — proved in full in the third derivation below.

Functions: the relations that behave

Among all 2pq2^{pq} possible relations from AA to BB, functions are the ones that behave like reliable machines: put in an input, always get exactly one predictable output.

Definition. A relation ff from a non-empty set AA to a non-empty set BB is a function if every element of AA has one and only one image in BB. Equivalently, ff is a function if its domain is all of AA, and no two distinct ordered pairs in ff share the same first element. If (a,b)∈f(a,b) \in f, we write f(a)=bf(a) = b, calling bb the image of aa and aa the preimage of bb, and denote the function f:A→Bf : A \to B.

∀ a∈A, ∃! b∈B such that (a,b)∈f.(4)\forall\, a \in A,\ \exists! \, b \in B \text{ such that } (a,b) \in f. \qquad (4)

where: the symbol ∀\forall reads "for every," ∃!\exists! reads "there exists exactly one," so equation (4)(4) is the precise translation of the definition: every single element of AA, with no exception, must be matched to exactly one element of BB — not zero, not two or more. This single sentence is the sharpest possible test of "is this relation a function?" Two failure modes cover every non-function you will ever meet: some element of AA has no image at all (domain is not all of AA), or some element of AA has two or more images (the "one and only one" clause is violated). A real valued function is one whose range is R\mathbb{R} or a subset of R\mathbb{R}; if its domain is also R\mathbb{R} or a subset of R\mathbb{R}, it is called a real function — the kind this chapter graphs.

Standard real functions and their graphs

Seven functions recur so often that you must recognise their formulas and their graphs on sight.

identity: f(x)=x,constant: f(x)=c,polynomial: f(x)=a0+a1x+⋯+anxn,rational: f(x)=p(x)q(x), q(x)≠0,modulus: f(x)=∣x∣={x,x≥0−x,x<0,signum: f(x)={1,x>00,x=0−1,x<0,greatest integer: f(x)=[x]=greatest integer≤x.(5)\begin{aligned} &\text{identity: } f(x) = x, &&\text{constant: } f(x) = c,\\ &\text{polynomial: } f(x) = a_0 + a_1x + \cdots + a_nx^n, &&\text{rational: } f(x) = \dfrac{p(x)}{q(x)},\ q(x) \neq 0,\\ &\text{modulus: } f(x) = |x| = \begin{cases} x, & x \ge 0 \\ -x, & x < 0 \end{cases}, &&\text{signum: } f(x) = \begin{cases} 1, & x>0 \\ 0, & x=0 \\ -1, & x<0 \end{cases},\\ &\text{greatest integer: } f(x) = [x] = \text{greatest integer} \le x. && \end{aligned} \qquad (5)

where: in the polynomial function nn is a non-negative integer and a0,a1,…,an∈Ra_0, a_1, \ldots, a_n \in \mathbb{R} are constants; in the rational function p(x)p(x) and q(x)q(x) are polynomial functions with q(x)q(x) never allowed to vanish. The identity function graphs as the straight line y=xy=x through the origin at 45°45°; the constant function f(x)=cf(x)=c graphs as a horizontal line at height cc, with domain R\mathbb{R} but range the single value {c}\{c\}. The modulus function folds the negative xx-axis up onto the positive yy-values, producing a symmetric "V" with vertex at the origin; the signum function collapses every positive input to 11 and every negative input to −1-1, with a single defined value 00 exactly at the origin, so its range is the three-point set {−1,0,1}\{-1,0,1\}. The greatest integer function [x][x] (also called the floor function) stays constant at each integer value nn across the half-open interval n≤x<n+1n \le x < n+1, then jumps up by exactly 11 at the next integer — so [2.3]=2[2.3] = 2, [−0.5]=−1[-0.5] = -1 and [4]=4[4] = 4; its graph is a staircase, rising in unit steps and constant between consecutive integers, with each step including its left endpoint but not its right.

Figure
Two graphs side by side one showing the modulus function as a symmetric V shape and the other showing the greatest integer function as an ascending staircase with filled left endpoints and open right endpoints
Two signature graphs — modulus function and greatest integer function y = |x| vertex at origin, V shape y = [x] constant on each step, jumps by 1 at every integer Filled dot means the value is included there; open dot means it is not.

Algebra of real functions

Two real functions defined on the same domain X⊆RX \subseteq \mathbb{R} can be combined pointwise — evaluate each function at xx separately, then combine the two numbers with ordinary arithmetic.

(f+g)(x)=f(x)+g(x),(f−g)(x)=f(x)−g(x),(αf)(x)=αf(x),(fg)(x)=f(x)g(x),(fg)(x)=f(x)g(x).(6)(f+g)(x) = f(x)+g(x), \quad (f-g)(x) = f(x)-g(x), \quad (\alpha f)(x) = \alpha f(x), \quad (fg)(x) = f(x)g(x), \quad \left(\frac{f}{g}\right)(x) = \frac{f(x)}{g(x)}. \qquad (6)

where: f,g:X→Rf, g : X \to \mathbb{R} are real functions sharing the common domain XX, α\alpha is any real scalar, and every combined function is again defined for x∈Xx \in X, except the quotient, which additionally needs g(x)≠0g(x) \neq 0 — so the domain of f/gf/g is XX with the zeros of gg removed. Each rule is simply "do the arithmetic operation to the two output numbers, at every input separately" — nothing here is new arithmetic, only new bookkeeping about where the resulting function is defined. For f(x)=x2f(x) = x^2 and g(x)=2x+1g(x) = 2x+1: (f+g)(x)=x2+2x+1(f+g)(x) = x^2+2x+1, (f−g)(x)=x2−2x−1(f-g)(x) = x^2-2x-1, (fg)(x)=x(2x+1)=2x2+x(fg)(x) = x(2x+1) = 2x^2+x, and (f/g)(x)=x22x+1(f/g)(x) = \dfrac{x^2}{2x+1} for x≠−12x \neq -\tfrac12 — the one point where the quotient's domain shrinks relative to ff and gg individually.

Two worked derivations and one counting proof

Derivation ACounting the ordered pairs in a Cartesian product

The chapter states, as a remark rather than a proved theorem, that if n(A)=pn(A) = p and n(B)=qn(B) = q then n(A×B)=pqn(A \times B) = pq. This is worth proving properly, because the same counting argument reappears almost unchanged when counting the total number of relations later in this chapter. The goal is to show, by a simple counting argument, that the number of ordered pairs built from a pp-element set and a qq-element set is exactly pqpq, with no pair counted twice and none missed.

Step 1. List AA as a1,a2,…,apa_1, a_2, \ldots, a_p and BB as b1,b2,…,bqb_1, b_2, \ldots, b_q. Every ordered pair in A×BA \times B has the form (ai,bj)(a_i, b_j) for some index i∈{1,…,p}i \in \{1,\ldots,p\} and j∈{1,…,q}j \in \{1,\ldots,q\}, and every such choice of indices gives exactly one pair. So counting A×BA \times B is the same as counting choices of the index pair (i,j)(i,j).

Step 2. Arrange the count as a grid. Fix i=1i=1: the pairs (a1,b1),…,(a1,bq)(a_1,b_1), \ldots, (a_1,b_q) give exactly qq pairs, one per choice of jj. The same holds for every other fixed ii: each of the pp choices of aia_i contributes its own row of qq pairs.

Step 3. No pair is shared between two rows, because pairs from different rows have different first coordinates (ai≠aka_i \neq a_k for i≠ki \neq k), so by the equality rule in equation (1)(1) they can never coincide. The rows are disjoint, so the total is the sum of pp rows of size qq: q+q+⋯+q⏟p times=pq\underbrace{q + q + \cdots + q}_{p \text{ times}} = pq.

Step 4. Hence n(A×B)=pqn(A \times B) = pq exactly, since every pair falls into exactly one row and every row contributes exactly qq new pairs. This is exactly the rectangular array in the Cartesian-product figure above: pp columns, qq rows, one dot per pair, pqpq dots total.

Go deeper · Derivation B · 1 minThe distributive law of Cartesian product over intersection
Derivation BThe distributive law of Cartesian product over intersection

NCERT's own worked example verifies, for one specific choice of AA, BB and CC, that A×(B∩C)=(A×B)∩(A×C)A \times (B \cap C) = (A \times B) \cap (A \times C). A single numerical check is not a proof — it only shows the claim did not fail for that triple. The goal here is to establish the identity for arbitrary sets, using the standard double-inclusion technique: show an arbitrary element of the left side lies in the right side, and vice versa, which together force the two sets to be identical.

Step 1. Take an arbitrary (x,y)∈A×(B∩C)(x,y) \in A \times (B \cap C). By definition of the Cartesian product, x∈Ax \in A and y∈B∩Cy \in B \cap C; by definition of intersection, y∈By \in B and y∈Cy \in C simultaneously.

Step 2. We now have x∈Ax \in A, y∈By \in B, and y∈Cy \in C. Combining x∈Ax \in A with y∈By \in B gives (x,y)∈A×B(x,y) \in A \times B; combining x∈Ax \in A with y∈Cy \in C gives (x,y)∈A×C(x,y) \in A \times C.

Step 3. Since (x,y)(x,y) belongs to both A×BA \times B and A×CA \times C, it belongs to their intersection: (x,y)∈(A×B)∩(A×C)(x,y) \in (A \times B) \cap (A \times C). This proves A×(B∩C)⊆(A×B)∩(A×C)A \times (B \cap C) \subseteq (A \times B) \cap (A \times C).

Step 4. Run the argument in reverse for the other inclusion. Take arbitrary (x,y)∈(A×B)∩(A×C)(x,y) \in (A \times B) \cap (A \times C), so x∈A,y∈Bx \in A, y \in B and x∈A,y∈Cx \in A, y \in C; hence y∈B∩Cy \in B \cap C, and with x∈Ax \in A this gives (x,y)∈A×(B∩C)(x,y) \in A \times (B \cap C). The two inclusions together force equality: A×(B∩C)=(A×B)∩(A×C)A \times (B \cap C) = (A \times B) \cap (A \times C), for every choice of AA, BB, CC, not merely the one triple NCERT checks numerically.

Go deeper · Derivation C · 1 minCounting the total number of relations from A to B
Derivation CCounting the total number of relations from A to B

The chapter records, as a side note, that the total number of relations from a set AA with n(A)=pn(A)=p to a set BB with n(B)=qn(B)=q is 2pq2^{pq}. The goal is to justify this from first principles, using only the definition of a relation as "any subset of A×BA \times B" and the basic fact that a finite set with nn elements has 2n2^n subsets, reducing the relation-count to that more familiar counting fact.

Step 1. By definition, a relation from AA to BB is any subset of A×BA \times B, with no further restriction. So the number of possible relations equals the number of subsets of A×BA \times B.

Step 2. By the counting derivation above, n(A×B)=pqn(A \times B) = pq, so the question becomes: how many subsets does a pqpq-element set have?

Step 3. Label the pqpq elements e1,e2,…,epqe_1, e_2, \ldots, e_{pq}. Building any subset means making an independent yes/no decision for each element — is e1e_1 included (2 choices), is e2e_2 included (2 choices), and so on. Each element contributes an independent factor of 22, since one element's decision never restricts another's.

Step 4. Multiplying the pqpq independent factors of 22 gives 2pq2^{pq} subsets in total, so the number of relations from AA to BB is 2pq2^{pq}. Check: for A={1,2}A=\{1,2\}, B={3,4}B=\{3,4\}, n(A×B)=4n(A \times B)=4, so relations number 24=162^4=16 — every subset of {(1,3),(1,4),(2,3),(2,4)}\{(1,3),(1,4),(2,3),(2,4)\}, from the empty relation to all of A×BA \times B, counts as one distinct relation.

Worked examples

Board level - equal ordered pairs and the size of a Cartesian product (Example 1 pattern)

If (x+1,y−2)=(3,1)(x+1, y-2) = (3,1), find the values of xx and yy. Also, if a set AA has 33 elements and B={3,4,5}B = \{3,4,5\}, find the number of elements in A×BA \times B.

Step 1. Since the two ordered pairs are equal, their corresponding entries must be equal individually, by equation (1)(1): x+1=3x+1 = 3 and y−2=1y-2 = 1.

Step 2. Solve each small equation on its own: from x+1=3x+1=3, x=2x = 2; from y−2=1y-2=1, y=3y=3.

Step 3. For the second part, n(A)=3n(A) = 3 and n(B)=3n(B) = 3 (since B={3,4,5}B=\{3,4,5\} has three listed elements). By equation (2)(2) and the counting derivation above, n(A×B)=n(A)×n(B)=3×3=9n(A \times B) = n(A) \times n(B) = 3 \times 3 = 9.

Step 4. No further simplification is needed; both parts are independent applications of the two basic rules of this section. Answer: x = 2, y = 3, and n(A × B) = 9.

Board level - testing relations for the function property (Example 11 pattern)

Examine each relation below and state, with reasons, whether it is a function. For each one that is, give its domain and range. (i) R1={(2,1),(3,1),(4,2)}R_1 = \{(2,1),(3,1),(4,2)\} (ii) R2={(2,2),(2,4),(3,3),(4,4)}R_2 = \{(2,2),(2,4),(3,3),(4,4)\} (iii) R3={(1,2),(2,3),(3,4),(4,5),(5,6),(6,7)}R_3 = \{(1,2),(2,3),(3,4),(4,5),(5,6),(6,7)\}.

Step 1. Apply the function test from equation (4)(4) to R1R_1: the first elements used are 2,3,42, 3, 4, all distinct, and each is paired with exactly one image (1,1,21, 1, 2 respectively — note that two different inputs, 22 and 33, are allowed to share the same output 11; the rule only forbids one input having two outputs). So R1R_1 is a function, with domain {2,3,4}\{2,3,4\} and range {1,2}\{1,2\}.

Step 2. Apply the same test to R2R_2: the first element 22 appears twice, once paired with 22 and once paired with 44. A single input cannot have two different images and still satisfy "one and only one image," so R2R_2 fails the function test — it is a relation, but not a function.

Step 3. Apply the test to R3R_3: the first elements 1,2,3,4,5,61,2,3,4,5,6 are all distinct, and each is paired with exactly one image. So R3R_3 is a function, with domain {1,2,3,4,5,6}\{1,2,3,4,5,6\} and range {2,3,4,5,6,7}\{2,3,4,5,6,7\}.

Step 4. Collect the verdicts: two of the three relations qualify as functions, and one does not, purely because of a repeated first element with conflicting images. Answer: R1 is a function (domain {2,3,4}, range {1,2}); R2 is not a function (2 has two images); R3 is a function (domain {1,2,3,4,5,6}, range {2,3,4,5,6,7}).

Competitive level (JEE / NEET) - domain of a function combining a square root and a factorable denominator

Find the domain of the real function f(x)=x−1x2−5x+6f(x) = \dfrac{\sqrt{x-1}}{x^2 - 5x + 6}.

Step 1. Two separate restrictions apply simultaneously, and the domain is the set of xx satisfying both at once. The square root in the numerator forces its argument to be non-negative: x−1≥0x - 1 \ge 0, i.e. x≥1x \ge 1.

Step 2. The denominator must never be zero. Factorise it exactly as in Example 21 of the chapter: x2−5x+6=(x−2)(x−3)x^2 - 5x + 6 = (x-2)(x-3), which vanishes when x=2x=2 or x=3x=3. So x≠2x \neq 2 and x≠3x \neq 3 are required, on top of the condition from Step 1.

Step 3. Combine both restrictions on the real line: start with x≥1x \ge 1 (a closed ray from 11 onward), then delete the two isolated points x=2x=2 and x=3x=3 that would make the denominator vanish. This is the classic JEE domain pattern — an inequality restriction from an even root, intersected with finitely many excluded points from a factorable denominator.

Step 4. Write the resulting domain in interval notation as a union of intervals: [1,2)∪(2,3)∪(3,∞)[1,2) \cup (2,3) \cup (3,\infty). Answer: domain of f = [1, 2) ∪ (2, 3) ∪ (3, ∞). Timing note: budget about ninety seconds. The efficient order is always "handle the root's inequality first, then factor the denominator for excluded points, then intersect" — doing the factoring before the inequality wastes no time either, but skipping the inequality altogether (a very common slip when a numerator also has algebraic structure) silently admits values like x=0x=0 that make the square root undefined. Always write the final domain as an explicit interval, since JEE and NEET options are frequently designed to catch a student who reports "all reals except 2 and 3" and forgets the x≥1x \ge 1 restriction entirely.

Common traps

The single most frequent error in this chapter is treating "relation" and "function" as interchangeable — every function is a relation, but most relations are not functions, and examiners exploit this by presenting a relation with a repeated or missing first element and asking whether it qualifies. A related slip is forgetting that codomain and range differ: the codomain is the whole target set BB fixed by the problem, while the range is only the part actually hit, and range ⊊\subsetneq codomain is normal, not an error. Students also mishandle A×BA \times B versus B×AB \times A, assuming commutativity that fails except in trivial cases. In the algebra of real functions, the common oversight is forgetting that f/gf/g needs its own smaller domain — every point where g(x)=0g(x)=0 must be excluded even if ff is defined there. With the greatest integer function, students round [x][x] to the nearest integer instead of always rounding down: [−1.2]=−2[-1.2] = -2, not −1-1.

You should be able to…

  • State the precise rule for when two ordered pairs are equal, and use it to solve for unknowns inside ordered pairs.
  • Define the Cartesian product A×BA \times B, compute n(A×B)=pqn(A \times B) = pq, and explain why A×B≠B×AA \times B \neq B \times A in general.
  • Write a relation in roster form, set-builder form, and as an arrow diagram, and correctly identify its domain, codomain and range.
  • Count the total number of relations between two finite sets as 2pq2^{pq}, and explain why this counts subsets of A×BA \times B.
  • State the precise definition of a function, and correctly classify any given relation as a function or not, with a stated reason.
  • Recognise and sketch the graphs of the identity, constant, polynomial, rational, modulus, signum and greatest integer functions.
  • Evaluate [x][x] correctly for negative non-integer inputs, without confusing "greatest integer ≤x\le x" with simple truncation.
  • Combine two real functions using the algebra of functions — sum, difference, scalar multiple, product, quotient — including the extra domain restriction for a quotient.
  • Find the domain of an algebraic real function by combining even-root non-negativity conditions with denominator-nonzero conditions.
  • Prove simple set-theoretic identities about Cartesian products, such as distributivity over intersection, using the element-chasing double-inclusion method.

Ask the tutor: Want to work through classifying a tricky relation as a function, or finding the domain of a harder algebraic function, step by step together?

What exactly is the difference between codomain and range?

The codomain is announced upfront as part of the definition of the relation or function — it is the entire target set BB that outputs are allowed to land in, whether or not every element of it is actually used. The range is discovered afterward: it is only the elements of BB that some input actually maps to. So range is always a subset of codomain, and it is completely normal for the range to be strictly smaller. For instance, if f:R→Rf: \mathbb{R} \to \mathbb{R} is defined by f(x)=x2f(x) = x^2, the codomain is announced as all of R\mathbb{R}, but the range turns out to be only the non-negative reals, since a square can never be negative. Neither number is "wrong" — they answer different questions, one about the stated target and one about the actual output.

Why is A times B generally not equal to B times A?

Because the Cartesian product remembers order, and swapping which set supplies the first coordinate versus the second genuinely changes almost every pair. Take P={a,b,c}P=\{a,b,c\} and Q={r}Q=\{r\}: then P×Q={(a,r),(b,r),(c,r)}P \times Q = \{(a,r),(b,r),(c,r)\} while Q×P={(r,a),(r,b),(r,c)}Q \times P = \{(r,a),(r,b),(r,c)\}, and by the ordered-pair equality rule (a,r)≠(r,a)(a,r) \neq (r,a) unless a=ra=r. The two sets do have the same number of elements, since n(P×Q)=n(Q×P)=pqn(P \times Q) = n(Q \times P) = pq either way — counting doesn't care about order — but the actual pairs listed are different objects. Cartesian product is commutative only in special coincidental cases, such as A=BA=B, or when one of the sets is empty (both products are then empty).

How do I quickly decide whether a set of ordered pairs is a function without drawing an arrow diagram every time?

List only the first coordinates of every pair. If any value appears more than once in that list, check whether it is paired with the same second coordinate every time or with different ones; if it is ever paired with two genuinely different second coordinates, the relation is not a function, immediately. If every first coordinate in the list is distinct (no repeats at all), the relation is automatically a function, because there is no possibility of one input having two outputs. This first-coordinates check is exactly the arrow-diagram test in algebraic form: an arrow diagram fails to be a function only when some starting point sends out two or more arrows, which is precisely "the same first coordinate with two different second coordinates."

Is the greatest integer function the same as simply chopping off the decimal part of a number?

Only for non-negative numbers — for negative numbers, chopping the decimal part and taking the greatest integer give different results, and this is a very common source of error. For x=3.7x = 3.7, both "chop the decimal" and "[x][x]" give 33. But for x=−3.7x = -3.7, chopping the decimal naively gives −3-3, while the greatest integer function requires the greatest integer that is still less than or equal to −3.7-3.7, which is −4-4, not −3-3 (since −3>−3.7-3 > -3.7, it fails the "less than or equal to" requirement). The safe method for negative inputs is to move left on the number line to the nearest integer at or below the given value, never toward zero.

Why does the quotient of two functions need its own separate domain restriction?

Because division by zero is undefined in ordinary arithmetic, and the quotient function (f/g)(x)=f(x)/g(x)(f/g)(x) = f(x)/g(x) performs an actual division at every input. Even if both ff and gg are individually defined everywhere on some domain XX, the moment g(x)=0g(x)=0 for some particular xx in XX, the expression f(x)/g(x)f(x)/g(x) becomes meaningless at that one point, so it must be excluded from the domain of f/gf/g specifically, even though it remains perfectly fine in the domains of ff and gg separately. For f(x)=x2f(x)=x^2 and g(x)=2x+1g(x)=2x+1, both are defined for every real xx, yet (f/g)(x)=x2/(2x+1)(f/g)(x) = x^2/(2x+1) is undefined exactly at x=−12x=-\tfrac12, the single point excised from an otherwise unrestricted domain.

Before this

Where this leads