# Let A = {−1, 0, 1, 2}, B = {−4, −2, 0, 2} and f,

Question:

Let $A=\{-1,0,1,2\}, B=\{-4,-2,0,2\}$ and $t, g: A \rightarrow B$ be functions defined by $f(x)=x^{2}-x, x \in \mathrm{A}$ and $g(x)=2\left|x-\frac{1}{2}\right|-1, x \in A$. Are $f$ and $g$ equal?

Justify your answer. (Hint: One may note that two function $f: A \rightarrow B$ and $g: A \rightarrow B$ such that $f(a)=g(a) \& m n F o r E ; a \in A$, are called equal functions).

Solution:

It is given that A = {−1, 0, 1, 2}, B = {−4, −2, 0, 2}.

Also, it is given that $f, g: A \rightarrow B$ are defined by $f(x)=x^{2}-x, x \in A$ and $g(x)=2\left|x-\frac{1}{2}\right|-1, x \in A$.

It is observed that:

$f(-1)=(-1)^{2}-(-1)=1+1=2$

$g(-1)=2\left|(-1)-\frac{1}{2}\right|-1=2\left(\frac{3}{2}\right)-1=3-1=2$

$\Rightarrow f(-1)=g(-1)$

$f(0)=(0)^{2}-0=0$

$g(0)=2\left|0-\frac{1}{2}\right|-1=2\left(\frac{1}{2}\right)-1=1-1=0$

$\Rightarrow f(0)=g(0)$

$f(1)=(1)^{2}-1=1-1=0$

$g(1)=2\left|1-\frac{1}{2}\right|-1=2\left(\frac{1}{2}\right)-1=1-1=0$

$\Rightarrow f(1)=g(1)$

$f(2)=(2)^{2}-2=4-2=2$

$g(2)=2\left|2-\frac{1}{2}\right|-1=2\left(\frac{3}{2}\right)-1=3-1=2$

$\Rightarrow f(2)=g(2)$

$\therefore f(a)=g(a) \forall a \in A$

Hence, the functions and g are equal.