Relations and Functions
Relations and Functions in real life give us the link between any two entities. In our daily life, we come across many patterns and links that characterize relations such as a relation between a father and a son, brother and sister, etc. In mathematics also, we come across many relations between numbers such as a number x is less than y, line l is parallel to line m, etc. Relation and function map elements of one set (domain) to the elements of another set (codomain).
Functions are nothing but special types of relations that define the precise correspondence between one quantity with the other. In this article, we will study how to link pairs of elements from two sets and then define a relation between them, different types of relations and functions, and the difference between relation and function.
What are Relations and Functions?
Relations and functions define a mapping between two sets (Inputs and Outputs) such that they have ordered pairs of the form (Input, Output). Relation and function are very important concepts in algebra and calculus. They are used widely in mathematics as well as in real life. Let us define each of these terms of relation and function to understand their meaning.
Relation and Function Definition
Relation and function individually are defined as:
- Relations - A relation R from a non-empty A to a non-empty set B is a subset of the cartesian product A × B. The subset is derived by describing a relationship between the first element and the second element of the ordered pairs in A × B.
- Functions - A relation f from a set A to a set B is said to be a function if every element of set A has one and only one image in set B. In other words, no two distinct elements of B have the same pre-image.
Note: Please note that all functions are relations but all relations are not functions.
Representation of Relation and Function
Relations and functions can be represented in different forms such as arrow representation, algebraic form, set-builder form, graphical form, roster form, and tabular form. Define a function f: A = {1, 2, 3} → B = {1, 4, 9} such that f(1) = 1, f(2) = 4, f(3) = 9. Now, let us represent this function in different forms.
- Set-builder form - {(x, y): y = x2, x ∈ A, y ∈ B}
- Roster form - {(1, 1), (2, 4), (3, 9)}
- Arrow Representation -
- Table Representation -
x | y |
---|---|
1 | 1 |
2 | 4 |
3 | 9 |
Difference Between Relation and Function
The basic difference between a relation and a function is that in a relation, a single input may have multiple outputs. Whereas in a function, each input has a single output. The table given below highlights the differences between relations and functions.
Relation | Function |
---|---|
A relation in math is a set of ordered pairs defining the relation between two sets. | A function is a relation in math such that each element of the domain is related to a single element in the codomain. |
A relation may or may not be a function. | All functions are relations. |
Example: {(1, x), (1, y), (4, z)} | Example: {(1, x), (6, y), (4, z)} |
Note: Look at the example of the relation above: {(1, x), (1, y), (4, z)}. This is NOT a function as a single element (1) is related to multiple elements (x and y). Hence the statement "every relation is a function" is incorrect.
Terms Related to Relations and Functions
Now that we have understood the meaning of relation and function, let us understand the meanings of a few terms related to relations and functions that will help to understand the concept in a better way:
- Cartesian Product - Given two non-empty sets P and Q, the cartesian product P × Q is the set of all ordered pairs of elements from P and Q, that is, P × Q = {(p, q) : p ∈ P, q ∈ Q}
- Domain - The set of all first elements of the ordered pairs in a relation R from a set A to a set B is called the domain of the relation R. It is called the set of inputs or pre-images.
- Range - The set of all second elements of the ordered pairs in a relation R from a set A to a set B is called the range of the relation R. It is called the set of outputs or images.
- Codomain - The whole set B in a relation R from a set A to a set B is called the codomain of the relation R. Note that range is a subset of codomain. i.e., Range ⊆ Codomain
Types of Relations and Functions
Different types of relations and functions have specific properties which make them different and unique. Let us go through the list of types of relations and functions given below:
Types of Relations
Given below is a list of different types of relations:
- Empty Relation - A relation is an empty relation if it has no elements, that is, no element of set A is mapped or linked to any element of A. It is denoted by R = ∅.
- Universal Relation - A relation R in a set A is a universal relation if each element of A is related to every element of A, i.e., R = A × A. It is called the full relation.
- Identity Relation - A relation R on A is said to be an identity relation if each element of A is related to itself, that is, R = {(a, a) : for all a ∈ A}
- Inverse Relation - Define R to be a relation from set P to set Q i.e., R ∈ P × Q. The relation R-1 is said to be an Inverse relation if R-1 from set Q to P is denoted by R-1 = {(q, p): (p, q) ∈ R}.
- Reflexive Relation - A binary relation R defined on a set A is said to be reflexive if, for every element a ∈ A, we have aRa, that is, (a, a) ∈ R.
- Symmetric Relation - A binary relation R defined on a set A is said to be symmetric if and only if, for elements a, b ∈ A, we have aRb, that is, (a, b) ∈ R, then we must have bRa, that is, (b, a) ∈ R.
- Transitive Relation - A relation R is transitive if and only if (a, b) ∈ R and (b, c) ∈ R ⇒ (a, c) ∈ R for a, b, c ∈ A
- Equivalence Relation - A relation R defined on a set A is said to be an equivalence relation if and only if it is reflexive, symmetric and transitive.
- Antisymmetric Relation - A relation R on a set A is said to be antisymmetric if (a, b) ∈ R and (b , a) ∈ R ⇒ a = b.
Types of Functions
Given below is a list of different types of functions:
- One-to-One Function - A function f: A → B is said to be one-to-one if each element of A is mapped to a distinct element of B. It is also known as Injective Function.
- Onto Function - A function f: A → B is said to be onto, if every element of B is the image of some element of A under f, i.e, for every b ∈ B, there exists an element a in A such that f(a) = b. A function is onto if and only if the range of the function = B.
- Many to One Function - A many to one function is defined by the function f: A → B, such that more than one element of the set A are connected to the same element in the set B.
- Bijective Function - A function that is both one-to-one and onto function is called a bijective function.
- Constant Function - The constant function is of the form f(x) = K, where K is a real number. For the different values of the domain(x value), the same range value of K is obtained for a constant function.
- Identity Function - An identity function is a function where each element in a set B gives the image of itself as the same element i.e., g (b) = b ∀ b ∈ B. Thus, it is of the form g(x) = x.
- Algebraic functions are based on the degree of the algebraic expression. The important algebraic functions are:
Important Notes on Relation and Function:
- Relations and functions define the relation between the elements of two sets and are represented as a set of ordered pairs.
- Relations and functions can be represented in different forms such as arrow representation, algebraic form, set-builder form, graph form, roster form, and tabular form.
- A relation may not be a function but every function is a relation.
☛ Related Topics:
Relations and Functions Examples
-
Example 1: Given three relations R, S, T from A = {x, y, z} to B = {u, v, w} defined as: 1) R = {(x, u), (z, v)}, 2) S = {(x, u), (y, v), (z, w)}, 3) T = {(x, u), (x, v), (z, w)}. Identify which of the given relations is/are function(s) using relations and functions definition.
Solution: Let us check each part one by one.
1) For R = {(x, u), (z, v)}, each element of A is not mapped to an element of B which violates the definition of a function. Hence, R is not a function.
2) For S = {(x, u), (y, v), (z, w)}, each element of A is mapped to a unique element of B which satisfies the definition of a function. Hence, S is a function.
3) For T = {(x, u), (x, v), (z, w)}, element x of A is mapped to two different elements of B which violates the definition of a function. Hence, T is not a function.
Answer: S = {(x, u), (y, v), (z, w)} is a function.
-
Example 2: Define a relation R from A to A = {1, 2, 3, 4, 5, 6} as R = {(x, y) : y = x + 1}. Determine the domain, codomain and range of R.
Solution: We can see that A = {1, 2, 3, 4, 5, 6} is the domain and codomain of R.
To determine the range, we determine the values of y for each value of x, that is, when x = 1, 2, 3, 4, 5, 6
- x = 1, y = 1 + 1 = 2;
- x = 2, y = 2 + 1 = 3;
- x = 3, y = 3 + 1 = 4;
- x = 4, y = 4 + 1 = 5;
- x = 5, y = 5 + 1 = 6;
- x = 6, y = 6 + 1 = 7.
Since 7 does not belong to A and the relation R is defined on A, hence, x = 6 has no image in A.
Therefore range of R = {2, 3, 4, 5, 6}
Answer: Domain = Codomain = {1, 2, 3, 4, 5, 6}, Range = {2, 3, 4, 5, 6}
-
Example 3: Is the function f(x) = x2 one-one from ℝ to ℝ? Justify your answer.
Solution:
The given function is not one-one. To justify this, note the following examples:
- f(-1) = (-1)2 = 1
- f(1) = (1)2 = 1
Here, each of -1 and 1 are mapped to the same element 1 and hence f(x) is NOT one-one.
Answer: The given function is not one to one.
FAQs on Relations and Functions
What are Relation and Function in Math?
In Math, Relations and functions are defined as follows:
- Relation: A relation from set A to set B is the set of ordered pairs from A to B.
- Function: A function from set A to set B is a relation such that every element of A is mapped to exactly one element of B.
What is the Difference between Relation and Function?
The difference between relations and functions is that relations define any relationship between inputs and outputs whereas a function defines a relation such that each input has only one output. Every function is a relation but a relation doesn't need to be a function.
What is the Range of Relation and Function?
The set of all outputs obtained from a relation or a function is called its range.
What is an Inverse Relation?
An inverse relation of a relation R is denoted by R-1 and is obtained by interchanging x and y coordinates of every ordered pair of R. For example, if R = {(1, 2), (2, 4), (3, 6)} then R-1 = {(2, 1), (4, 2), (6, 3)}.
How Do you Represent Relation and Function?
Relations and functions can be represented in different forms such as
- arrow diagram
- algebraic form
- set-builder form
- graphical form
- roster form
- tabular form.
What are the Types of Relations and Functions?
There are different types of relations and functions.
- Types of Relations: Empty relation, universal relation, reflexive relation, symmetric relation, transitive relation, equivalence relation, etc
- Types of Functions: Constant function, polynomial function, identity function, on-to-one function, onto function, bijective function, etc.
What are Ordered Pairs in Relations and Functions?
Relations and functions have ordered pairs of the form (Input, Output). The input belongs to the domain and the output belongs to the range of the relation/function.
How to Determine if a Relation is a Function?
If in a relation, each element in the domain is mapped to a unique element in the codomain, then it is said to be a function.
What is the Relation Between Sets Functions and Relations?
Functions and relations are subsets of the cartesian product of two sets. For example, if A = {1, 2, 3} and B = {a, b, c} are two sets then:
- R = {(1, a), (1, b), (2, c)} is a relation.
- F = {(1, b), (2, a), (3, c)} is a function.
How to Identify Relations and Functions?
A binary operation defining a link between a set of elements with another set of elements is a relation. But if each element of the first set is mapped to one and only one element of the second set, then it is a function.
Where can I Learn about Relations and Function of Class 11 and Class 12?
Relations and functions is introduced in class 11 and is taken into depth in class 12. The following links are very helpful in learning about relation and function in each of these classes.
visual curriculum