Function vs Relation - Relationship and Comparison with Examples - BYJUS

Difference between Relation and Function

The distinction between relations and functions is very interesting because they are closely related. We will discuss more on relations and functions to differentiate between these two concepts....Read MoreRead Less

Select your child's grade in school:

Relation

In mathematics, a relation is defined as a collection of ordered pairs containing inputs and outputs. The pairing of an input with an output is expressed as a relation. If we have an ordered pair (a, b) in a relation, a will represent the input and b will represent the respective output.

Functions

A relation that connects each input to exactly one output is termed as a function.

 

 

function

 

 

In the above mapping diagram, each input has exactly one output. Hence, the relation is a function.

What is the Distinction between Functions and Relations?

Differentiating Parameter

Relations

Functions

Definition

A relation pairs inputs with outputs.

A function is a relationship in which each input has only one output.

Example

Ordered pairs: {(3, x), (7, y), (3,z)}


"3" has an output of x and z, so it is not a function, though it is a relation.

Ordered pairs: {(3, x), (9, y), (5, z)}


Here, each input has exactly one output. Hence, it is a function.

Note:

Every relation need not be a function.

Every function is a relation.

Solved Examples

Example 1: Examine the following to see if they are functions or not.


a) Ordered pairs: {(1,2), (2,3), (3,4), (4,5)}

b) Ordered pairs: {(1,6), (2,5), (1,9), (4,3)}

 

Solution:

a)

solved

Each input has exactly one output. Hence, the relation is a function.

 

b)

solved

The input 1 has two outputs, 6 and 9. Hence, the relation is not a function.

 

Example 2: Although all relations are functions, not all functions are relations. Justify.

 

Solution:

Assume we have two relations as shown in the table.

 

A relation that is not a function

A relation that is a function

relation

relation

The input -5 has two outputs, 3 and 9. Hence, the relation is not a function.

Each input has exactly one output. Hence, the relation is a function.

Example 3:

The ordered pairs stated below represent the roll number of students as the input and the number of hours spent studying for the upcoming test as the output. Determine whether the relation represents a function or not for the data provided.
{(1, 5), (2, 5), (3, 2), (4, 5), (5, 2)}


Solution:
Map the ordered pairs:

solved


In the given ordered pairs each input is paired with exactly one output. So, the relation represents a function.

Frequently Asked Questions

A function rule is an equation between inputs (independent variables) and outputs (dependent variables).

Relations contain inputs and outputs. The relationship between inputs and outputs can be depicted using ordered pairs and mapping diagrams.

When each input in a relation is mapped to exactly one output, the relation is said to be a function.