# Difference between Relation and Function

The difference between relations and functions are a bit confusing as they both are closely related to each other. To differentiate the relation and function, we need detailed knowledge and comprehension of relations and functions.

## Definition of Relation and Function in Maths

Relation- In maths, the relation is defined as the collection of ordered pairs, which contain an object from one set to the other set. For instance, X and Y are the two sets, and ‘a’ is the object from set X and b is the object from set Y, then we can say that the objects are related to each other if the order pairs (a, b) is to be in relation.

Functions-Â The relation that defines the set of inputs to the set of outputs is called the functions. In function, each input in set X has exactly one output in set Y.

Note: All functions are relations but all relations are not functions.

Consider Set X & Set Y are related in a manner that all the elements of Set X are related to exactly one element of Set Y (or many elements of set X are related to one element of Set Y). Thus, this type of relation is said to be a function.

Note that a function cannot Possess One-to-Many relation between the set X and Y.

## What is the Difference Between Relations and Functions?

Differentiating Parameter Relations Functions
Definition A relation is a relationship between sets of values. Or, it is a subset of the Cartesian product A function is a relation with only one output for each input.
Denotation A relation is denoted by “R” A function is denoted by “F” or “f”.
Example R = {(2, x), (9, y), (2, z)}

** It is not a function, as “2” is input for both x and z.

F =Â {(2, x), (9, y), (5, x)}
Note: Every relation is not a function. Every function is a relation.

## Frequently Asked Questions on the Difference between Relation and Function

Q1

### What is the definition of relation and function?

A relation shows the relationship between input and output, and a function is a relation which derives one OUTPUT for each given INPUT.
Q2

### What are the domain and range in function?

The domain is the set of all inputs, and the range is the set of all outputs.
Q3

### What are the types of relations in Maths?

There are basically four types of relation: Reflexive, Symmetric, Transitive and Anti-Symmetric.
Q4

### What are the types of functions in Maths?

There are various types of functions in Maths, such as:
One to one Function or Injective Function
Many to one function
Onto function or Surjective function
Polynomial function
Linear Function
Identical Function