📘 CodingMarble Learn

Relations and Functions (Class 12)

A relation R on a set A is any set of pairs (a, b) taken from A × A. R is reflexive if every element is related to itself, symmetric if (a, b) in R always brings (b, a), and transitive if (a, b) and (b, c) always bring (a, c). A relation with all three is an equivalence relation; it cuts A into separate equivalence classes. A function f: A → B sends every element of A to exactly one element of B. It is one-one (injective) if different inputs give different outputs, onto (surjective) if every element of B is hit, and bijective if it is both.

🎬 Step-by-step story

  1. Meet the set A = {1, 2, 3}. Each arrow is one pair (a, b). All the arrows together form a relation R. Here R has two arrows: 1 → 2 and 2 → 3.
  2. Reflexive means every element points to itself. Watch three red loops appear, one on each ball. Now (1,1), (2,2) and (3,3) are in R.
  3. Symmetric means every arrow has a return arrow. 1 → 2 gets 2 → 1. 2 → 3 gets 3 → 2. The new arrows glow red.
  4. Transitive means a two-step trip needs a shortcut. 1 → 2 and 2 → 3, so 1 → 3 must appear. Now all three rules hold: an equivalence relation. Balls of one colour form one class.
  5. Now a function. Every element of A must send exactly one arrow into B. Tap the buttons: one-one means no dot in B gets two arrows. Onto means no dot in B is left alone.
  6. Your turn. Tap pairs like (1, 2) to add or remove arrows. The readout tells you which rules hold and which pair is missing.

Tip: drag the 3D scene to turn it. Use two fingers to zoom.

🤔 Common doubts, cleared

Can a relation be symmetric but not reflexive?

Yes. R = {(1,2), (2,1)} on {1, 2, 3} is symmetric, but the loops are missing. In free play, add only (1, 2) and (2, 1) and read the result.

Why is one missing loop enough to break reflexive?

The rule says every element, so a single element without its loop fails it. In step 1 all three loops appear; remove one in free play and the readout names the missing pair.

For transitive, what if the chain goes back, like (1,2) and (2,1)?

Then the shortcut is (1,1). It must be present. Many students forget this. Try (1,2), (2,1) in free play without loops: the readout asks for (1,1) and (2,2).

What exactly is an equivalence class?

It is a group of elements that are all related to each other. In step 3 all three balls turn one colour because they all join into one class.

How is one-one different from onto?

One-one looks at sharing: no output gets two arrows (no red dot). Onto looks at leftovers: no output gets zero arrows (no orange dot). Use the buttons in step 4.

Why is 'not a function' shown when 1 has two arrows?

A function must give exactly one output for each input. Two arrows from 1 means two outputs, which is not allowed. See the last button in step 4.

What is a relation?

Take a set A. Make every possible pair (a, b) from it. This big list is A × A. A relation R on A is any part (subset) of A × A. We write (a, b) ∈ R, or a R b, and say "a is related to b".

Picture it as arrows: (a, b) is an arrow from a to b.

Two special relations

Both of these are called trivial relations.

Reflexive, symmetric and transitive relations

Reflexive

R is reflexive if (a, a) ∈ R for every a in A. One missing loop breaks it.

Symmetric

R is symmetric if whenever (a, b) ∈ R, then (b, a) ∈ R too. Every arrow has a return arrow.

Transitive

R is transitive if whenever (a, b) ∈ R and (b, c) ∈ R, then (a, c) ∈ R. Every two-step path has a direct shortcut.

How to check (method)

  1. Reflexive: list all (a, a). Are all there?
  2. Symmetric: for each (a, b), look for (b, a).
  3. Transitive: for each pair of arrows that join end-to-start, look for the shortcut.

To show a property fails, one counter-example is enough. To show it holds, you must argue for all elements.

Equivalence relations and equivalence classes

A relation that is reflexive, symmetric and transitive is an equivalence relation. It behaves like "is the same kind as".

An equivalence relation splits A into groups called equivalence classes. The class of a is [a] = all elements related to a.

Famous example: on the integers Z, let a R b if a − b is divisible by 2. It is an equivalence relation with two classes: the even numbers and the odd numbers.

Functions: one-one, onto and bijective

A function f: A → B is a relation where every element of A has exactly one image in B. A is the domain, B is the co-domain, and the set of actual outputs is the range.

One-one (injective)

Different inputs give different outputs. Test: assume f(x₁) = f(x₂) and show x₁ = x₂. Example: f(x) = 3x + 2 on R. If 3x₁ + 2 = 3x₂ + 2, then x₁ = x₂. So it is one-one.

Many-one: two inputs share an output. f(x) = x² on R is many-one, since f(2) = f(−2) = 4.

Onto (surjective)

Every element of B is an output. Range = co-domain. Test: take any y in B, solve y = f(x), and check that x is in A. For f(x) = 3x + 2 on R: x = (y − 2)/3 is a real number, so it is onto.

Bijective

Both one-one and onto. Only a bijection has an inverse function.

Counting tip for finite sets

If A and B each have n elements, a function A → B is one-one exactly when it is onto. The number of bijections is n!.

Try it: make your own equivalence relation

Go to the last 3D step. Start with only the three loops (1,1), (2,2), (3,3). Now add (1, 3). The readout will say it is not symmetric. Add (3, 1). What do you see? You now have classes {1, 3} and {2}.

At home: sort your family's shoes by colour. "Same colour as" is an equivalence relation. Each pile is one class. Can any shoe be in two piles?

Key formulas and definitions

Worked examples

1. On A = {1, 2, 3}, R = {(1,1), (2,2), (3,3), (1,2)}. Check reflexive, symmetric and transitive.

Reflexive: (1,1), (2,2), (3,3) are all present, so yes. Symmetric: (1,2) is in R but (2,1) is not, so no. Transitive: the only chains are like (1,1),(1,2) → (1,2), which is present; so yes. R is reflexive and transitive but not symmetric.

2. On A = {1, 2, 3}, R = {(1,2), (2,1)}. Is R transitive?

Chain (1,2) and (2,1) needs the shortcut (1,1). It is missing. So R is not transitive. It is symmetric but not reflexive either.

3. Show that R = {(a, b) : a − b is a multiple of 4} on the integers Z is an equivalence relation. Find [0].

Reflexive: a − a = 0 = 4 × 0. Symmetric: if a − b = 4k, then b − a = 4(−k). Transitive: if a − b = 4k and b − c = 4m, add them: a − c = 4(k + m). So it is an equivalence relation. [0] = all numbers whose difference with 0 is a multiple of 4 = {…, −8, −4, 0, 4, 8, …}. There are 4 classes in total: [0], [1], [2], [3].

4. Let L be the set of all lines in a plane, and l R m if l is parallel to m or l = m. Is R an equivalence relation?

Reflexive: every line equals itself. Symmetric: if l ∥ m then m ∥ l. Transitive: if l ∥ m and m ∥ n, then l ∥ n (or l = n). Yes, it is an equivalence relation. Each class is one 'direction' of lines.

5. Is f: R → R, f(x) = 5 − 2x one-one? Is it onto?

One-one: if 5 − 2x₁ = 5 − 2x₂, then −2x₁ = −2x₂, so x₁ = x₂. Yes. Onto: take any real y. Solve y = 5 − 2x → x = (5 − y)/2, which is a real number, and f(x) = 5 − 2 × (5 − y)/2 = y. Yes. So f is bijective.

6. Is f: N → N, f(x) = x² one-one? Is it onto?

One-one: if x₁² = x₂² with x₁, x₂ natural (positive), then x₁ = x₂. Yes. Onto: 2 is in N, but no natural number squares to 2. So not onto. Note: on R the same rule is not one-one, because f(−3) = f(3). The domain matters!

7. Show that f: R → R, f(x) = x³ is bijective.

One-one: if x₁³ = x₂³, then (x₁ − x₂)(x₁² + x₁x₂ + x₂²) = 0. The second bracket is 0 only when x₁ = x₂ = 0, so in every case x₁ = x₂. Onto: for any real y, x = ∛y is real and x³ = y. So f is bijective.

8. How many relations can be defined on A = {a, b}? How many bijections from A to A?

A × A has 2 × 2 = 4 pairs. Each pair is either in R or not: 2⁴ = 16 relations. Bijections from a 2-element set to itself: 2! = 2 (the identity and the swap).

Common mistakes

Practice quiz

1. On A = {1, 2}, which relation is reflexive?
2. A relation that is reflexive, symmetric and transitive is called:
3. f: R → R, f(x) = x² is:
4. A function is onto when:
5. How many relations are there on a set with 3 elements?

Practice: answer these yourself

Type or choose your answer, then press Check. Use a hint if you are stuck; the full solution appears after you answer.

Frequently asked questions

How many marks does Relations and Functions carry in CBSE Class 12?

The unit Relations and Functions (this chapter plus Inverse Trigonometric Functions) carries about 8 marks. Common questions: check a relation for RST, prove an equivalence relation, test one-one and onto.

What is the fastest way to show a relation is not transitive?

Find just one chain (a, b), (b, c) in R where (a, c) is missing. One counter-example is enough.

Is every one-one function onto?

No. f: N → N, f(x) = 2x is one-one but odd numbers are never outputs. Only for two finite sets of the same size does one-one imply onto.

Where this is taught

RomaniaClasa a X-aFunctions and equations
RomaniaClasa a X-aFunctions and equations
CBSE (India)Class 12Relations and Functions
England (GCSE, A level)Year 13B Algebra and functions
USA (Common Core, NGSS, AP)Grade 12Exponential and Logarithmic Functions
USA (Common Core, NGSS, AP)Grade 12Functions and their inverses
Japan高校3年Limits

Learn first

Learn next

Related lessons

All Maths lessons