# Relations and Functions

## 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$

## 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

## 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$.

## 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$
$\left( {f - g} \right)\left( x \right) = f\left( x \right)-g\left( x \right),x \in X$
$\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.
$\frac{f}{g}\left( x \right) = \frac{{f(x)}}{{g(x)}}$
$x \in X$ and $g\left( x \right) \ne 0$