Difference between Relation and Function

You landed here on this page, because you want to know the difference between relation and function. The mathematical relation is the link that exists between the elements of a subset with respect to the product of two sets. A function involves the mathematical operation to determine the value of a dependent variable based on the value of an independent variable. Every function is a relation but not every relation is a function.

What is the Difference between a Relation and a Function?

Let’s check below what is the difference between relation and function. But before this, it’s also important to know what mathematical relation and what is meant by mathematical function.

What is a Mathematical Relation

It is called the binary relation of a set A in a set B or the relation between elements of A and B to every subset C of the Cartesian product A x B.

That is, if set A is made up of elements 1, 2 and 3, and set B is made up of elements 4 and 5, the Cartesian product of A x B will be the ordered pairs:

A x B = {(1,4), (2,4), (3, 4), (1,5), (2,5), (3,5)}.

The subset C = {(2, 4), (3, 5)} will be a relation of A and B since it is composed of the ordered pairs (2, 4) and (3, 5), the result of the Cartesian product of A x B.

Relationship Concept

“Let A and B be any two non-empty sets, let A x B be the product set of both, that is: A x B is formed by the ordered pairs (x, y) such that x is the element of A and y is of B. If any subset C is defined in A x B, a binary relation in A and B is automatically determined as follows:

x R y if and only if (x, y) ∈ C

(The notation x R y means “x is related to y “).

We will call set A the starting set and set B we will call the arrival set.

The domain of the relationship is the elements that make up the starting set, while the range of the relationship is the elements of the arrival set.

Example of Mathematical Relationships

The set A of x elements of men of a population and B is the set of y elements of women of the same population. A relationship is established when “x is married to y

What is a Mathematical Function

When we talk about a mathematical function of a set A in a set B we refer to a rule or mechanism that relates the elements of set A with an element of set B.

Function Concept

“Let x and y be two real variables, then we say that y is a function of x if each value taken by x corresponds to a value of y.”

The independent variable is x while y is the dependent variable or function:

y = ƒ (x)

The set in which x varies is called the domain of the function (original) and that of the variation of y is called the range of the function (image).

The set of pairs (x, y) such that y = ƒ (x) is called the graph of the function; if they are represented on Cartesian axes, a family of points is obtained called the graph of the function.

Function Examples

In mathematics we get many examples of functions. Here are examples of flagship functions.

  • Constant Function

A function is called constant if the element of set B that corresponds to set A is the same. In this case, all the values ​​of x correspond to the same value of y. Thus, the domain is the real numbers while the range is a constant value.

  • Identity Function

Suppose that x is a variable and that y takes the same value as x. We then have an identity function y = x, where the pairs (x, y) in the graph are (1, 1), (2, 2), (3, 3) and so on.

  • Polynomial Function

A polynomial function has the form y = a n x n + a n-1 + x n-1 +…. + a 2 x 2 + a 1 x + a 0. Now suppose that the dependent variable y is equal to the independent variable x cubed. We have the function y = x 3