UNIT 2 – Relations and Functions in Discrete Mathematics Notes

Mathematics is not just about numbers; it is about the relationships that connect them. After learning the foundations of sets and logic, students step into Unit 2: Relations and Functions, where the focus shifts to how elements interact with one another. These concepts, though abstract at first glance, lie at the heart of computer science, data analysis, and real-world problem-solving.

Download UNIT 2 – Relations and Functions in Discrete Mathematics Notes

Get simplified revision notes for this unit:
Download Unit 2 Notes PDF

Relations: Linking Elements Together

At its core, a relation is a way of associating elements of one set with elements of another. For example, in a set of students and a set of courses, the relation “is enrolled in” connects each student to their chosen courses.

Properties of Relations

Mathematicians study relations not just as connections, but through the properties they hold. A relation may be:

  • Reflexive: Every element is related to itself. (e.g., “is equal to” on real numbers).

  • Symmetric: If a is related to b, then b is related to a. (e.g., “is a sibling of”).

  • Transitive: If a is related to b and b to c, then a is related to c. (e.g., “is greater than or equal to”).

When a relation satisfies all three—reflexive, symmetric, and transitive—it is called an equivalence relation, grouping elements into distinct categories or “equivalence classes.”

Representing Relations: Matrices and Graphs

Relations can be captured visually or algebraically:

  • Matrices: A relation from set A to set B can be represented by a matrix of 0s and 1s. If element a is related to b, we mark a 1 in the corresponding cell; otherwise, 0.

  • Graphs: Another way is through directed graphs, where nodes represent elements and arrows show connections. For instance, in a social network, nodes could represent users and arrows could represent “follows.”

These tools help computer scientists store, analyze, and compute relationships effectively.

Closures and Composition

Relations can be extended to include additional properties, called closures. For example:

  • Reflexive closure ensures every element relates to itself.

  • Symmetric closure adds the reverse of every existing relation.

  • Transitive closure ensures that if a relates to b and b to c, then a relates to c.

Another powerful concept is composition of relations, where one relation builds upon another. If R relates students to courses, and S relates courses to professors, then the composition R ∘ S links students directly to professors through the courses they study.

Functions: Special Relations with Precision

While every function is a relation, not every relation qualifies as a function. A function requires that each input maps to exactly one output. This precise definition makes functions central to mathematics and computing.

Types of Functions

Functions come in different forms depending on how they map inputs to outputs:

  • One-to-One (Injective): Each input maps to a unique output, and no two inputs share the same output. Example: Assigning each student a unique roll number.

  • Onto (Surjective): Every output has at least one input mapped to it. Example: Distributing tasks so that every task is assigned to someone.

  • Bijective: A function that is both one-to-one and onto. Such functions create perfect pairings and are invertible.

Inverse Functions

If a function f maps a to b, its inverse function f⁻¹ maps b back to a. However, inverses exist only for bijective functions. For instance, converting Celsius to Fahrenheit is a bijective function, and its inverse converts Fahrenheit back to Celsius.

Function Composition

Much like relations, functions can also be composed. If f(x) converts hours to minutes, and g(x) converts minutes to seconds, then the composition g(f(x)) directly converts hours to seconds. Function composition is a cornerstone of computational processes and algorithm design.

Applications Beyond the Classroom

Though relations and functions may appear abstract, their practical relevance is immense.

  • In Computer Science: Databases use relations to link records. Functions define algorithms that map inputs to outputs consistently.

  • In Networks: Graph representations of relations help model the internet, transport systems, and social connections.

  • In Cryptography: Bijective functions are vital for secure encryption and decryption.

  • In Artificial Intelligence: Relations represent knowledge bases, while functions guide machine learning models.

Why Unit 2 Matters

If Unit 1 built the grammar of mathematical reasoning, Unit 2 provides the syntax of interaction. By understanding how elements relate and how functions map inputs to outputs, students acquire tools that extend far beyond mathematics into computing, engineering, and decision-making.

Whether it’s assigning tasks in a company, analyzing friendships on a social network, or writing algorithms that power apps, relations and functions form the invisible structure behind systems we use every day.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top