**Introduction to Relations and Functions | Relations and Functions - Definition, Types, and Examples**

This topic “Relations and Functions” is a foundation or fundamental of algebra in mathematics. Relations and functions are two different words having different meaning mathematically. Many us you might be confused in their difference. We shall study both these concepts in detail here.

Same as the relations which we have in our daily life, a kind of relations also exists in algebra. In daily life, relations are like brother and sister, friends, student and teacher and many more. In mathematics also we see some relations like a line is parallel or perpendicular to another, any one variable is greater or less than the another variable. Any Set A is subset of B, all these are examples of relations.

One thing which we see in common while studying relations, that it required two different objects to link two different objects via relations.

**What is the meaning of Relation in math?**

Understanding Relations requires basic knowledge of sets. A Set is a collection of well defined objects of particular kind. For Example a set of outcomes of dice, a set of English alphabet.

Relation is always studied between two sets. If we have two non void (or null/empty) sets A and B then the relation R from set A to set B is represented by aRb, where a is the set of elements belonging to set A while b belongs to set B.

Relation from a set A to a set B is the subset of the Cartesian product of A and B i.e. subset of A x B. Relation in other way can also be defined as an collection of ordered pairs (a, b) where a belongs to the elements from set A and b from set B and the relation is from A to B but not vice versa.

**Relations and Functions:**Consider a set A containing elements as {1, 2, 3} and set B contains elements as {2, 4, 6}.

Then the relation between Set A and B from A to B will be set of any combinations from Set A to set B.

From the above diagram, we can see that Relation from A to B i.e. R will be set of {(1,4). (1,2), (3,4), (3,2)}. This relation is a subset of the Cartesian product of two sets A X B.

Let’s take another example where, set A = {1, 2, 3} and set B = {1, 2, 3, 4, 5, 6, 7, 8, 9}.

If the Relation between A and B is as: elements of B is the squares of elements of set A, then the relation is written in the form of sets as:

R = {(a,b): where b is square of a and a ∈ A & b ∈ B}

Then R = {(1,1), (2,4), (3,9)}

Same as sets, relation may also be represented algebraically either by the Roster method or by the Set-builder method.

Relation can also be defined as a linear operation which establishes relationship between the element’s of two set’s according to some definite rule of relationship.

R : {(a, b) | (a, b) ∈ A x B and a R b}

Eg:1 A is {2, 3, 5}

B is {1, 4, 9, 25, 30}

If a R b → b is square of a

Discrete element of relation are {(2, 4), (3, 9). (5, 25)}

Eg: 2 A = {Jaipur, Lucknow, Kanpur, Bhopal}

B = {Rajasthan, Uttar pradesh, Madhya Pradesh}

aRb → a is capital of b,

A X B = {(Jaipur, Rajasthan), (Lucknow, Uttar Pradseh), (Bhopal, Madhya Pradesh}

Total Number of Relation from A to B

Let the number of relations from A to B be x.

Let A contain ‘m’ elements and B contains ‘n’ elements

Number of element’s in A x B → m x n

Number of non void subset’s =

Thus, for A = {1, 2, 3) & B = {x, y, z}

Number of non void subset’s or the number of possible relations = =29 - 1 = 511

**What are Functions?**

Functions are the special class of relation or we can say that special types of relations are called as Functions. Function is one of the most important concepts in mathematics as every situation in real life are solved and analysed first by writing its mathematical equation or function.

A function is like a machine which gives unique output for each input that is fed into it. But every machine is designed for certain defined inputs for e.g. a washing machine is designed for washing cloths and not the wood. Similarly the functions are defined for certain inputs which are called Functionsas its domain and corresponding outputs are called Range.

Let A and B be two sets and let there exist a rule or manner or correspondence ‘f’ wihch associates to each element of A to a unique element in B, then f is called a Function or Mapping from A to B. It is denoted by symbol.

Which reads ‘f is a function from A to B' or' f maps A to B.

If an elements a ∈ A is associated with an element b ∈ B then b is called ‘the f image of a’ or ‘image of a under f' or ‘the value of the function f at a’. Also a is called the pre – image of b or argument of b under the function f. we write it as

f:(a, b) or f:a → b or b = f(a)

A relation f from a set A to a set B is called as the function if it satisfies the below conditions:

All the elements of A should be mapped with the elements of B. That is, there should not be any element in A which is being unmapped with B.

i.e. ∀a, (a, f(a)) ∈ f, where, a is the elements of set A

Elements of set A should be uniquely mapped with the elements of set B.

i.e. if (a, b) ∈ f & (a, c) ∈f, ⇒ b = c

Thus the ordered pairs of f must satisfy the property that each element of A appears in some ordered pair and no two ordered pairs have same first elements.

**See the below figures to understand the above points.**

What is the domain of a function? Also explain its co-domain and Range

For a relation from set A to set B i.e. aRb, all the elements of set A are called as the domain of the relation R while all the elements of set B are called as the co-domain of the relation R.

Range is the set of all second elements from the ordered pairs (a, b) in the relation aRb.

Domain of f = {a | a ∈ A, (a, f(a)) ∈ f }

Range of f = {f (a) |a ∈ A, f(a) ∈ B, (a, f (a)) ∈ f}

the domain of a functionFor the relation aRb, domain is considered as the input to relation R while the co-domain is the possible outputs and range is the actual output.

Similarly for a function, f: A → B, elements of set A are the inputs and B is the set of possible outputs. But the second elements of all ordered pair of f(A, B) will be the actual outputs.

It should be noted that range is a subset of co-domain. If only the rule of function is given then the domain of the function is the set of those real numbers, where function is defined. For a continuous function, the interval from minimum to maximum value of a function gives the range.

**Which is not the graph of a function?**

To identify any graph, weather it is a function or not, we must understand its definition once again but in terms of graphical meaning.

First condition of function says that – “All the elements of A should be mapped with the elements of B”. That means graphically, for every input in its domain, function must give or provide the corresponding output.

Second condition of the function says that – “Elements of set A should be uniquely mapped with the elements of set B”. These means that, for any input x, we must have one and only one output. The best way to check this condition for the function y = f(x), is draw a line parallel to y – axis. If it cuts the graph at two or more distinct points, this means, for one value of x, we are getting more than one outputs. And hence it will not be a function.

**Example **

y = x3

Here all the straight lines parallel to y – axis cut y = x3 only at one point.

all the straight lines parallel to y – axis cut y = x3 only at one point.

**Example**

x2 + y2 = 1

Here line parallel to y –axis is intersecting the circle at two points hence it is not a function.

line parallel to y –axis is intersecting the circle at two points

**Even Function:** Let f(x) be a real valued function of a real variable. Then f is even if the following equation holds for all x and -x in the domain of f:

f(x) = f(-x)

Geometrically, the graph of an even function is symmetric with respect to the y-axis.

Odd Function: Again, let f(x) be a real valued function of a real variable. Then f is odd if the following equation holds for all x and -x in the domain of f:

f (-x) = - f(x) or f(x) + f(-x) = 0.

**Increasing function:** A function f is said to be increasing if whenever a >b, then

f (a) = f(b). Further a function is said to be strictly increasing if

When a > b, then f(a) > f(b).