The mathematical relationship 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.
Relationship  Function  

Definition  Subset of ordered pairs that correspond to the Cartesian product of two sets.  Mathematical operation that must be performed with the variable x to obtain the variable y . 
Notation  x R y ; x is related to y .  y = ƒ ( x ); y is a function of x . 
Characteristics 


Examples 


Index
What is a mathematical relationship?
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 nonempty 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 _{n1} + x ^{n1} + …. + a _{2} x ^{2} + a _{1} x + a _{0} . The graph above shows the function ƒ (x) = x ^{2} + x2.
Now suppose that the dependent variable y is equal to the independent variable x cubed. We have the function y = x ^{3} , whose graph is shown below: