“Relations and Functions” are the most important terms in algebra. Relations and functions are two different mathematical concepts. It is generally said, all functions are relations, but not all relations are functions. Now, this may cause you confusion. Before we go any further, let us clarify the difference between the two in this article, along with clarifying this statement.This article can act as your one stop guide in **competitive exams** such as the **JEE**, **NEET**, **SSC**, **CAT**, **MAT**, PSAT, **GRE**, Olympiads, and various **engineering entrance exams**.

Table of Contents

## What is a Function?

A function is a relation that states that each input should only have one output. Alternatively, we can define a function as a particular type of relation (a collection of ordered pairs) that adheres to a rule, meaning that each X-value should only have one Y-value.

**Example:**

Domain | Range |

-1 | -3 |

1 | 3 |

3 | 9 |

* Domain– *It is a set of all input (x) values, or the initial values in an ordered pair.

** Range- **It is a set of all the output (y) values in the ordered pair that are the second values.

Let’s take a look at it by an example:

In the relation, {(-2, 4), {6, 2), (5, -5), (-2, 3)},

The domain is {-2, 5, 6} and the range is {-5, 2, 3, 4}.

Note: Don’t repeat the numbers while writing the domain and range. Also, it should be written in increasing order.

**Must Read:Real Number Line: Definition and Properties**

## Types of Functions

The types of functions can be defined as follows in terms of relations:

If there is a unique element of Q for every element of P, then a function f: P → Q is considered one to one.*An injective function or one-to-one function:*A function that associates two or more P elements with the same Q element.*Many to one function:*A function that has a pre-image in set P for each element of set Q*Surjective function or Onto function:*Every element of Q has a pre-image in P, and the function f matches each element of P with a discrete element of Q.*One-to-one correspondence or Bijective function:*

## What is a Relation?

It belongs to the Cartesian product subset or just a collection of points (arranged in pairs). Stated differently, the relation between the two sets is defined as the collection of the ordered pair, where each object from the sets makes up the ordered pair.

Example: {(-2, 1), (4, 3), (7, -3)}, which is typically represented in curly brackets and set notation.

## How to Convert a Relation into a Function?

A function is a unique type of relation (a collection of ordered pairs) that adheres to a rule, such as every X-value should be connected to only one Y-value.

Must Read:**Factors Of A Number: Definition and Properties**

## Difference Between Relation and Function

Relation and function are almost same but they do differ in some way or another. To understand it better, let us see the table below:

Relation | Function |

A relation is described as follows: Relation from non-empty set A to non-empty set B is a subset of A × B. For example, R ⊆ A × B | A function is a unique kind of relationship between two sets, A and B, in which every element in A is related to all or some of the elements in B, and no two elements in B are related to any element in A. |

If the pre-image is related, it might or might not contain an image. | Every pre-image in a function needs to have an image. |

A pre-image may contain two or more images in the case of a relation. | There cannot be two images with the same pre-image in the case of function. |

Relation may or may not be a function. | Function will always be a relation, too. |

It’s quite sure no one has written a comprehensive proof of this statement, but the idea revolves around the fact that functions are relations in which the codomain is dependent on the domain, whereas relations do not have to be. If that sounds hazy, it’s because no one has come up with a definitive explanation yet.

A function has one input and one output, whereas a relationship can have multiple outputs for a single input. This is the distinction between a function and a relation. This is the fundamental element that distinguishes between function and relation.

Actually, the definition of a function requires that it be a relation. Given that, all you have to do is identify one relation that is not a function. A famous formula is y = sqrt(x) when x ≥ 0. Because each value of x (other than 0) is transferred to two different values of y, the relation is not a function. However, it can be readily converted into a function by restricting the codomain to non-negative or non-positive reals.Similarly, relations like reciprocal or **logarithm** can be converted into functions by specifying the domain or codomain to avoid exceptions.

For example: Here is the diagram of a relation that is not a function.Diagram of a relation that is not a function. One reason is that 2 is the first element in more than one ordered pair. Another reason is that neither 3 nor 4 are the first element (input) of any ordered pair therein

## Relations and Functions: Examples

- Is A = {(2, 4), (2, 4), (3, -8), (3, -8), (3, -8)} a function?

Solution: If there are any repetitions in the X-value, the relation is not a function.

But,

Even if the X-values are being repeated in this instance, they are still associated with the same values of Y, therefore it remains a function.

Here, the point (2, 4) is written twice, and the point (3, -8) is written three times. By writing a single copy of the repeated ordered pairs, we can rewrite it. Thus, “A” serves a function.

- All functions are relations, but not all relations are functions. Justify.

Solution: Let’s take two sets:

A = {(-2, 1), (5, -4), (5, 3), (6, 9)}

B = {(3, 9), (2, -3), (5, -2), (1, 7)}

Now, in A = {(-2, 1), (5, -4), (5, 3), (6, 9)}, there is a repetition in X-values with different Y-values, and so this relation is not a function.

Similarly, B = {(3, 9), (2, -3), (5, -2), (1, 7)}, in this, the value of X is different from Y, and so this relation is a function.

**Related Posts**

Properties of Isosceles Triangle | Basics of Prime Numbers |

Square Root Of A Number | Trigonometric Ratios |

Natural Numbers | Commutative Property |

## FAQs

**Is the function defined by the relation?**

If every element in set P is associated to exactly one element in set Q, then there exists a relation from set P to set Q that defines a function.

**In mathematics, what are relations?**

A relation in mathematics is a set of values of ordered pairs that define a relationship between them. The items in the first set, referred to as the domain, are associated with the elements in the second set, referred to as the range.

**How is a relation classified as a function?**

A function is referred to as such when each value entered into it produces a single, unique outcome. In this case, the output values are referred to as the range and the input values as the domain.

This was all about the “** Relations and Functions”**. For more such informative blogs, check out our

**Maths Section**, or you can learn more about us by visiting our

**Study Material Section**page.