# Relations and Functions

Notes Assignments

## 1. What is Cartesian Sets?

Given two non-empty sets $A$ and $B$. The Cartesian product $A \times B$ is the set of all ordered pairs of elements from $A$ and $B$, i.e.,
$A \times B = \left\{ {\left( {a,b} \right):a \in A,b \in B} \right\}$
If either $A$ or $B$ is the null set, then $A \times B$ will also be empty set, i.e., $A \times B$

### Important tips

1. Two ordered pairs are equal, if and only if the corresponding first elements are equal and the second elements are also equal.
2. If there are $p$ elements in $A$ and $q$ elements in $B$, then there will be $pq$ elements in $A \times B$, i.e., if $n\left( A \right) = p$ and $n\left( B \right) = q$, then $n\left( {A \times B} \right) = pq$.
3. If $A$ and $B$ are non-empty sets and either $A$ or $B$ is an infinite set, then so is $A \times B$.
4. $A \times A \times A = \left\{ {\left( {a,b,c} \right):a,b,c \in A} \right\}$. Here ${\left( {a,b,c} \right)}$ is called an ordered triplet

Questtion 1 If $P = \left\{ {1,2} \right\}$ and $Q = \left\{ {5,4,2} \right\}$, find $P \times Q$ and $Q \times P$.
Solution
$P = \left\{ {1,2} \right\}$ and $Q = \left\{ {5,4,2} \right\}$
We know that the Cartesian product $P \times Q$ of two non-empty sets $P$ and $Q$ is defined as
$P \times Q = \left\{ {\left( {p,q} \right):p \in P,q \in Q} \right\}$
$\therefore P \times Q = \left\{ {\left( {1,5} \right),\left( {1,4} \right),\left( {1,2} \right),\left( {2,5} \right),\left( {2,4} \right),\left( {2,2} \right)} \right\}$
$Q \times P = \left\{ {\left( {5,1} \right),\left( {5,2} \right),\left( {4,1} \right),\left( {4,2} \right),\left( {2,1} \right),\left( {2,2} \right)} \right\}$

Question 2 If $A = \left\{ { - 1,1} \right\}$, find $A \times A \times A$
Solution
It is known that for any non-empty set $A$, $A \times A \times A$ is defined as
$A \times A \times A = \left\{ {\left( {a,b,c} \right):a,b,c \in A} \right\}$
It is given that $A = \left\{ { - 1,1} \right\}$
$\therefore A \times A \times A\left\{ {\left( { - 1, - 1, - 1} \right),\left( { - 1, - 1,1} \right),\left( { - 1,1, - 1} \right),\left( { - 1,1,1} \right),\left( {1, - 1, - 1} \right),\left( {1, - 1,1} \right),\left( {1,1, - 1} \right),\left( {1,1,1} \right),} \right\}$

## 2. What is relations?

A relation $R$ from a non-empty set $A$ to a non-empty set $B$ is a subset of the cartesian product $A \times B$.
It "maps" elements of one set to another set. The subset is derived by describing a relationship between the first element and the second element of the ordered pair $\left( {A \times B} \right)$.
Domain: The set of all first elements of the ordered pairs in a relation $R$ from a set $A$ to a set $B$ is called the domain of the relation $R$.
Range: the set of all the ending points is called the range
A relation can be expressed in Set builder or Roaster form

### Roster forms

In a Roster forms, all the elements in the set is listed.
Example
Set of $vovel = \left\{ {a,e,i,o,u} \right\}$

#### Some Important points

• In roster form, the order in which the elements are listed is immaterial
• while writing the set in roster form an element is not generally repeated

### Set Builder Form

• In set-builder form, all the elements of a set possess a single common property which is not possessed by any element outside the set. For example, in the set $\left\{ {2,4,6,8} \right\}$, all the elements possess a common property, namely, each of them is a even number less than 10. Denoting this set by $N$, we write
N = {x : x is a even number less than 10 }
• b) We describe the element of the set by using a symbol $x$ (any other symbol like the letters $y$, $z$, etc. could be used) which is followed by a colon “ : ”. After the sign of colon, we write the characteristic property possessed by the elements of the set and then enclose the whole description within braces

#### Important Note

The total number of relations that can be defined from a set $A$ to a set $B$ is the number of possible subsets of $A \cdot B$. If $n\left( A \right) = p$ and $n\left( B \right) = q$, then $n\left( {A \cdot B} \right) = pq$ and the total number of relations is ${2^{pq}}$
Example:
Let $P = \left\{ {1,2,3,.....,18} \right\}$ define a relation $R$ from $P$ to $P$ by $R = \left\{ {\left( {x,y} \right):2x - y = 0,where{\rm{ }}x,y \in P} \right\}$ Write down its domain, codomain and range.
Solution: The relation $R$ from $P$ to $P$ is given as
R = {(x,y):2x-y=0, where x, y ∈ P}
i.e., R = {(x, y): 2x = y, where x, y ∈ P}

$\therefore R{\rm{ }} = {\rm{ }}\left\{ {\left( {1,{\rm{ }}2} \right),{\rm{ }}\left( {2,{\rm{ }}4} \right),{\rm{ }}\left( {3,{\rm{ }}6} \right),{\rm{ }}\left( {4,{\rm{ }}8} \right),{\rm{ }}\left( {5,{\rm{ }}10} \right),{\rm{ }}\left( {6,{\rm{ }}12} \right),{\rm{ }}\left( {7,{\rm{ }}14} \right),{\rm{ }}\left( {8,{\rm{ }}16} \right),\left( {9,18} \right)} \right\}$
The domain of $R$ is the set of all first elements of the ordered pairs in the relation.
$\therefore Domain{\rm{ }}of{\rm{ }}R{\rm{ }} = {\rm{ }}\left\{ {1,{\rm{ }}2,{\rm{ }}3,{\rm{ }}4,5,6,7,8,9} \right\}$
The whole set $P$ is the codomain of the relation $R$.
Therefore codomain of $R{\rm{ }} = {\rm{ }}P{\rm{ }} = {\rm{ }}\left\{ {1,{\rm{ }}2,{\rm{ }}3,{\rm{ }} \ldots ,{\rm{ }}18} \right\}$
The range of $R$ is the set of all second elements of the ordered pairs in the relation.
Therefore range of $R = \left\{ {2,{\rm{ }}4,{\rm{ }}6,{\rm{ }}8,10,12,14,16,18} \right\}$

## 3. What is Function

• A function is a "well-behaved" relation
• A function $f$ is a relation from a non-empty set $A$ to a non-empty set $B$ such that the domain of $f$ is $A$ and no two distinct ordered pairs in $f$ have the same first element.
• For a relation to be a function, there must be only and exactly one $y$ that corresponds to a given $x$
• If $f$ is a function from $A$ to $B$ and $\left( {a,{\rm{ }}b} \right) \in f$, then $f\left( a \right) = b$, where $b$ is called the image of $a$ under $f$ and $a$ is called the preimage of $b$ under$f$.
Example 1:
Which of the following relations are functions? Give reasons. If it is a function, determine its domain and range.
1. $\left\{ {\left( {3,1} \right),\left( {5,1} \right),\left( {7,1} \right),\left( {11,1} \right),\left( {14,1} \right),\left( {17,1} \right)} \right\}$
2. ${\left\{ {\left( {2,1} \right),\left( {4,2} \right),\left( {6,3} \right),\left( {6,4} \right),\left( {10,5} \right),\left( {12,6} \right),\left( {14,7} \right)} \right\}}$
3. ${\left\{ {\left( {1,3} \right),\left( {1,5} \right),\left( {2,5} \right)} \right\}}$
1. $\left\{ {\left( {3,1} \right),\left( {5,1} \right),\left( {7,1} \right),\left( {11,1} \right),\left( {14,1} \right),\left( {17,1} \right)} \right\}$
Since 3, 5, 8, 11, 14, and 17 are the elements of the domain of the given relation having their unique images, this relation is a function.
2. ${\left\{ {\left( {2,1} \right),\left( {4,2} \right),\left( {6,3} \right),\left( {6,4} \right),\left( {10,5} \right),\left( {12,6} \right),\left( {14,7} \right)} \right\}}$
Since the same first element i.e 6 corresponds to two different images 3 and 4, this relation is not a function
3. ${\left\{ {\left( {1,3} \right),\left( {1,5} \right),\left( {2,5} \right)} \right\}}$
Since the same first element i.e., 1 corresponds to two different images i.e., 3 and 5, this relation is not a function.

#### Important functions

Let us take some useful polynomial and shapes obtained on the Cartesian plane
 S.No. $y = p\left( x \right)$ Graph obtained Name of the graph Name of the function 1. $y = mx + c$ where m and c can be any values $\left( {m \ne 0} \right)$ Example $y = 2x + 3$ Graphs of these functions are straight lines. $m$ is the slope and $b$ is the $y$ intercept. If $m$ is positive then the line rises to the right and if $m$ is negative then the line falls to the right Linear function. Typical use for linear functions is converting from one quantity or set of units to another. 2. $y = a{x^2} + bx + c$ where, ${b^2} - 4ac{\rm{ }} > {\rm{ }}0$ , $a \ne 0$ and $a > {\rm{ }}0$ example- $y = {x^2} - 7x + 12$ Parabola It intersect the x- axis at two points Example- (3,0) and (4,0) Quadratic function 3. $y = a{x^3} + b{x^2} + cx + d$ where,$a \ne 0$ It can be of any shape It will cut the x-axis at the most 3 times Cubic Function 4. ${a_n}{x^n} + {a_{n - 1}}{x^{n - 1}} + {a_{n - 2}}{x^{n - 2}} + \ldots \ldots \ldots \ldots + ax + {a_0}$ where ${a_n} \ne 0$ It can be of any shape It will cut the x-axis at the most n times Polynomial function 5. $y = \frac{{f(x)}}{{g(x)}}$ where $g(x) \ne 0$ example- $y = \frac{1}{x}$ It can be any shape An asymptote is a line that the curve approaches but does not cross.There are vertical and horizontal asymptote Rational function 6. $y = \left| x \right|$ i.e., $y = - x$ for $x < 0$ $y = x$ for $x \ge 0$ Modulus function 7. $y = aln\left( x \right) + b$ where $x$ is in the natural logarithm and $a$ and $b$ are constants They are only defined for positive For small $x$ they are negative and for large $x$ they are positive $x$ Logarithmic functions 8. $y = \left[ x \right]$ $\left[ x \right]{\rm{ }} - >$the value of the greatest integer, less than or equal to x Greatest integer function

## 4. Algebra of Real Function

Real Value Function: A function which has all real number or subset of the real number as it domain
Real Valued Function: A function which has all real number or subset of the real number as it range
For functions $f:{\rm{ }}X - > {\bf{R}}$ and $g:{\rm{ }}X - > {\bf{R}}$, we have
$\left( {f + g} \right)\left( x \right) = f\left( x \right) + g\left( x \right),x \in X$
2. Substraction
$\left( {f - g} \right)\left( x \right) = f\left( x \right)-g\left( x \right),x \in X$
3. Multiplication
$\left( {f.g} \right)\left( x \right) = f\left( x \right).g\left( x \right),x \in X$
4. Multiplication by real number $\left( {kf} \right)\left( x \right) = k{\rm{ }}f\left( x \right),x \in X$, where $k$ is a real number.
5. Division
$\frac{f}{g}\left( x \right) = \frac{{f(x)}}{{g(x)}}$
$x \in X$ and $g\left( x \right) \ne 0$