Skip to content
MathsCBSE Class 11 · Relations and Functions

Cartesian Products, Relations, Functions and Their Algebra (Class 11)

Updated 17 October 2026 · Fact-checked

The Cartesian product A × B is the set of all ordered pairs (a, b) with a in A and b in B, so n(A × B) = n(A) × n(B). A relation from A to B is any subset of A × B; there are 2^(n(A)n(B)) of them. A function is a relation in which each element of the domain has exactly one image; there are n(B)^n(A) functions from A to B. For f ± g, fg and f/g, the domain is the common domain, with f/g also excluding the zeros of g.

A function gives every input exactly one arrow; with n(A)=2 and n(B)=3 there are 3² = 9 functions but 2⁶ = 64 relations.

Illustration drawn for QuestionBuddy.

Understand Cartesian Products, Relations and Counting Functions

Ordered pairs and Cartesian product. exactly when and (so ). For sets ,
$$
In general . If is given, is the set of first entries and the set of second entries.

Relations. A relation from to is a subset of , defined by a rule such as . The domain is the set of first entries, the codomain is , and the range is the set of second entries that actually occur. Since has elements (, ), the number of relations from to is (the empty relation included).

Functions. A relation from to is a function if every appears as a first entry exactly once. So a vertical-line test or a list check works: an element with two images, or with no image, fails. The number of functions from to is (each of the elements picks one of images). The domain of a function is all of ; the range is a subset of . Different pairs may share the same second entry (like at ).

Reading a rule. To list , express one variable and substitute allowed values: give ; gives .

Algebra of real functions. For with domains :

  • and on ;
  • on excluding with ;
  • on .

Decide the domain before simplifying: with and , the quotient simplifies to , but its domain still excludes because is not defined there.

Equality of ordered pairs. Equate corresponding entries to get equations: gives and , so , .

Cartesian Products, Relations and Counting Functions: formulas to remember

Size of the product
Order of A and B matters.
Number of relations
m = n(A), n = n(B).
Number of functions
Each element of A has n choices.
Algebra of functions
Domain before simplifying.
Equal ordered pairs
Gives two equations.

How to solve Cartesian Products, Relations and Counting Functions questions

Use these steps for products, relations, functions and their algebra.

  1. 1List the elements of each set; for write every pair with the first entry from .
  2. 2For a rule-defined relation, substitute each element of the domain into the rule and keep the pairs that satisfy it.
  3. 3Write the domain (first entries) and range (second entries that occur).
  4. 4To test for a function, check that every element of the stated domain has exactly one image.
  5. 5For counting, use for relations and for functions.
  6. 6For , , , find the common domain first and exclude zeros of for the quotient.

Cartesian Products, Relations and Counting Functions in real life

Each concept, met in an everyday situation. Read the situation, try the problem, then check the solution. The one-line hook is what to remember.

Counting relations and functions

Suppose two students, Ria and Sam, and three subjects: Maths, Physics and Art.

How many relations "studies" are possible from the students to the subjects, and how many of them are functions in which each student studies exactly one subject?

Try it first, then show the solutionSolution
  1. has pairs.
  2. Each pair may be present or absent: relations.
  3. A function sends each student to one of 3 subjects: .

Answer: 64 relations; 9 functions.

Memory hook: Relation: pairs in or out. Function: each input picks one output.

Functions from a rule

Suppose 4 customers each choose exactly one of 3 delivery slots.

How many ways can the choices be made, and why is the arrangement a function?

Try it first, then show the solutionSolution
  1. Each customer (input) has exactly one slot (output): a function from 4 customers to 3 slots.
  2. Number of functions .
  3. Two customers may share a slot; that is allowed because a function can repeat outputs.

Answer: 81 ways.

Memory hook: Many inputs can share one output; one input never has two outputs.

Tricks to remember Cartesian Products, Relations and Counting Functions

Short memory aids. Say each one aloud once, then use it on a question the same day.

  • Pairs in or out

    Every pair of A × B is either in the relation or out: 2 choices each, so 2^(mn) relations.

    Use it when: Counting relations.

  • Each input picks one

    A function chooses one image for each element of the domain: n^m.

    Use it when: Counting functions.

  • Domain first

    Take the domain of f/g from f and g separately before cancelling.

    Use it when: Algebra of functions.

  • Rule then list

    Substitute allowed values to list a rule-based relation.

    Use it when: Writing relations in roster form.

Cartesian Products, Relations and Counting Functions: solved examples

Ordered from board level to HOTS. Try each one before you open the solution.

Example 1: A relation from a rule · 2 marks · Very short answerBoard level

Let , and . Write , , and the domain and range of .

Try it first, then show the solutionSolution
  1. (6 pairs). (½ mark)
  2. . (½ mark)
  3. Domain ; range . (1 mark)

Answer: ; domain ; range

Example 2: Is it a function? · 3 marks · Short answerBoard level

Let . Show that is a function, and find its domain and range. Is every element of the range obtained from only one ?

Try it first, then show the solutionSolution
  1. . (1 mark)
  2. Every in the domain occurs once as a first entry, so is a function; range . (1 mark)
  3. No: comes from and from . A function may map different inputs to the same output. (1 mark)

Answer: A function; domain ; range

Example 3: Counting relations and functions · 3 marks · Short answerHarder board level

Let and . Find the number of (i) relations from to , (ii) non-empty relations, (iii) functions from to , (iv) functions from to .

Try it first, then show the solutionSolution
  1. . (½ mark)
  2. (i) . (½ mark)
  3. (ii) Remove the empty relation: . (½ mark)
  4. (iii) Each of 3 elements has 2 choices: . (½ mark)
  5. (iv) Each of 2 elements has 3 choices: . (1 mark)

Answer: (i) 64 (ii) 63 (iii) 8 (iv) 9

Example 4: A relation from an equation · 3 marks · Short answerHarder board level

Let . Write in roster form, give its domain and range, and decide whether it is a function.

Try it first, then show the solutionSolution
  1. must be a natural number: give ; gives . (1 mark)
  2. . Domain ; range . (1 mark)
  3. Each of appears once as a first entry, so is a function from . (1 mark)

Answer: ; a function

Example 5: Algebra of functions · 5 marks · Long answerHOTS / competency

Let and . Find , and with their domains, and evaluate .

Try it first, then show the solutionSolution
  1. , , so the common domain is . (1 mark)
  2. and , both on . (1 mark)
  3. . Also need : is never . (1 mark)
  4. Domain of is still , because is undefined at , although the simplified polynomial is defined there. (1 mark)
  5. . (1 mark)

Answer: Domain for all three;

Where students lose marks in Cartesian Products, Relations and Counting Functions

The slips examiners see most often, and what to write instead.

  • Mistake: Writing A × B as unordered pairs

    (a, b) and (b, a) are different.

    Wrong working

    with and treated as one pair.

    Right working

    First entry from , second from : .

    Do this: Write each pair with the first entry from .

    Usually costs: The listing mark.

  • Mistake: Calling a relation a function when an element has two images

    One input must have one output.

    Wrong working

    is a function.

    Right working

    Not a function: 1 has two images.

    Do this: Scan the first entries for repeats.

    Usually costs: The conclusion.

  • Mistake: Counting functions as m^n

    The base is the codomain size.

    Wrong working

    Functions from (3 elements) to (2 elements): .

    Right working

    .

    Do this: Each element of the domain picks an image: (choices)^(number of elements).

    Usually costs: The answer.

  • Mistake: Taking the domain of f/g from the simplified formula

    g being undefined at a point excludes it.

    Wrong working

    , domain .

    Right working

    Domain .

    Do this: Intersect , and remove the zeros of first.

    Usually costs: The domain mark.

Exam tips

  • List ordered pairs systematically (first element fixed, second varying) to avoid missing any.
  • When asked "is it a function?" write which element, if any, has no image or two images.
  • For counting, write "m = ..., n = ..." and then the power.
  • Give the domain of f/g from the original f and g.
  • Remember the range can be smaller than the codomain.

Practice questions on Cartesian Products, Relations and Counting Functions

Write each answer on paper first. Open the hint only if you are stuck, and the answer only when you have finished.

  1. Q1 · 1 mark · MCQBoard level

    If and , then is:
    (a) 7
    (b) 12
    (c) 81
    (d) 64

    Hint

    Multiply the sizes.

    Answer

    (b). .

  2. Q2 · 1 mark · MCQHarder board level

    If , the number of relations on (from to ) is:
    (a) 9
    (b) 81
    (c) 512
    (d) 18

    Hint

    has 9 pairs.

    Answer

    (c). .

  3. Q3 · 3 marks · Short answerHarder board level

    For and , state whether each is a function from to , giving reasons: , , . For the functions give the range.

    Hint

    Check that every element of has exactly one image.

    Answer

    : function, range . : not a function, since has two images and has none. : function (a constant function), range .

  4. Q4 · 1 mark · Assertion-reasonHarder board level

    Assertion (A): The relation is not a function.
    Reason (R): The element 1 has two different images.
    (a) Both A and R are true and R is the correct explanation of A.
    (b) Both A and R are true but R is not the correct explanation of A.
    (c) A is true but R is false.
    (d) A is false but R is true.

    Hint

    Check how often 1 occurs as a first entry.

    Answer

    (a). 1 is paired with both 2 and 3.

  5. Q5 · 4 marks · Short answerHOTS / competency

    Let and . Find the domains of and , and the value of .

    Hint

    Domains: and .

    Answer

    Common domain , so . For exclude , i.e. : . .

Test your recall

Answer in your head or on paper first, then open the card. Pulling an answer out of memory makes it stick far better than re-reading.

  1. 1.What is n(A × B)?Show answer

    n(A) × n(B).

  2. 2.How many relations from A to B?Show answer

    2 raised to n(A) n(B).

  3. 3.How many functions from A to B?Show answer

    n(B) raised to n(A).

  4. 4.What is the range of a relation?Show answer

    The set of second entries that actually occur.

  5. 5.What extra condition does f/g need?Show answer

    g(x) is not zero.

Cartesian Products, Relations and Counting Functions: frequently asked questions

Is every relation a function?

No. A function is a relation in which every element of the domain has exactly one image.

Can two inputs share an output?

Yes. That is allowed for a function (like x² at 2 and −2). Two outputs for one input is not allowed.

Why is the number of relations 2 to the power mn?

Each of the mn pairs of A × B is either in the relation or not, giving two choices per pair.

Is the algebra of real functions in the syllabus?

Yes, the chapter covers sum, difference, product, quotient and scalar multiple of real functions.