# Sets and functions

• Aug 21st 2007, 11:26 AM
shilz222
Sets and functions
(1) Functions $f: \mathbb{R} \to \mathbb{R}$ and $g: \mathbb{R} \to \mathbb{R}$ are defined as follows:

$f(x) = \begin{cases} x+2\ \ \text{if}\ x<-1 \\ -x\ \ \ \text{if} -1 \leq x \leq 1 \\ x-2\ \text{if} \ \ x >1 \end{cases}$

$g(x) = \begin{cases} x-2\ \ \text{if}\ x<-1 \\ -x\ \ \ \text{if} -1 \leq x \leq 1 \\ x+2\ \text{if} \ \ x >1 \end{cases}$

Find functions $f \circ g$ and $g \circ f$. Is $g$ the inverse of $f$? Is $f$ injective or surjective? How about $g$?

So $f \circ g = x = g \circ f$ (i.e. the identity element $x$).

I said $g$ is the inverse function of $f$. I said $f$ is surjective because $f(-2) = f(0)$ (hence not injective). I am not sure whether $g$ is injective or surjective.

(2) Suppose that $f: X \to Y$ and $g: Y \to Z$ are surjections. Prove that the composite $g \circ f: X \to Z$ is also a surjection. So I started out by saying that $\forall y \in Y, \ f(x) = y \ \text{and} \ \forall z \in Z, \ g(y) = z$. Then how would I go from this to showing that $\forall z \in Z, \ gf(x) = z$?

(3) Let $f: X \to Y$ be a function. Prove that there exists a function $g: Y \to X$ such that $f \circ g = I_{y}$ if and only if $f$ is a surjection. So we want to prove the following: $f \circ g = I_{y} \Leftrightarrow$ $f$ is a surjection. This is equivalent to saying, from my earlier post, that a function is surjective if and only if it has a right inverse. So given that $f(g(x)) = y$, $g(x)$ points back to the domain of $f$. Then $\forall x \in X, \ y = f(x)$. Is this correct?

Thanks
• Aug 21st 2007, 12:06 PM
Plato
$\begin{array}{lcr}
g(3) = 5,\;f(5) = 3\quad &\Rightarrow & \quad f \circ g(3) = 3 \\
f(3) = 1,\;g(1) = - 1\quad &\Rightarrow & \quad g \circ f(3) = - 1 \\
\end{array}$

I think that you need to redo the complete problem.
• Aug 21st 2007, 12:13 PM
shilz222
Ok so $f \circ g \neq g \circ f$. Since $f$ is not bijective its inverse is not $g$. $f$ is surjective, and I think $g$ is bijective?
• Aug 21st 2007, 12:47 PM
shilz222
Yeah I drew that graph. It looks like $g(x)$ is bijective.
• Aug 21st 2007, 12:55 PM
Plato
Quote:

Originally Posted by shilz222
Yeah I drew that graph. It looks like $g(x)$ is bijective.

BIJECTIVE?
$g( - 2) = g(0) = g(2) = 0$
• Aug 21st 2007, 12:57 PM
shilz222
$g(-2) = -4$. Your talking about $f(x)$ which is surjective.
• Aug 21st 2007, 01:14 PM
Plato
Quote:

Originally Posted by shilz222
Your talking about $f(x)$ which is surjective.

O.K.

But is $g$ onto?
$g(?) = 2$
• Aug 21st 2007, 01:17 PM
shilz222
$g(x)$ is not surjective. Its injective.
• Aug 21st 2007, 01:24 PM
Plato
Quote:

Originally Posted by shilz222
$g(x)$ is not surjective. Its injective.

Correct.
• Aug 21st 2007, 03:03 PM
shilz222
For (2) $g(f(x)) = g(y) = g(z) \implies g \circ f$ is surjective. Is that correct?
• Aug 21st 2007, 03:19 PM
Plato
(2) Suppose that $f: X \to Y$ and $g: Y \to Z$ are surjections.
Prove that the composite $g \circ f: X \to Z$ is also a surjection.

Suppose that $q \in Z$ then $\left( {\exists p \in Y} \right)\left[ {g(p) = q} \right]$. But then $\left( {\exists m \in X} \right)\left[ {f(m) = p} \right]$; therefore $g \circ f(m) = g\left( {f\left( m \right)} \right) = g\left( p \right) = q$, surjective.
• Aug 21st 2007, 03:25 PM
shilz222
My proof was more like this: Consider $f: X \to Y$ and $g: Y \to Z$ both surjective. Given any $z \in Z$ we must find an $x$ such that $f(x) = z$. Since $g$ is surjective there is a $y \in Y$ such that $g(y) = z$. Since $f$ is surjective there is an $x \in X$ such that $f(x) = y$. Therefore $g \circ f(x) = g(f(x)) = g(y) = g(z)$.
• Aug 21st 2007, 04:24 PM
shilz222
Quote:

(3) Let $f: X \to Y$ be a function. Prove that there exists a function $g: Y \to X$ such that $f \circ g = I_{y}$ if and only if $f$ is a surjection. So we want to prove the following: $f \circ g = I_{y} \Leftrightarrow$ $f$ is a surjection. This is equivalent to saying, from my earlier post, that a function is surjective if and only if it has a right inverse. So given that $f(g(x)) = y$, $g(x)$ points back to the domain of $f$. Then $\forall x \in X, \ y = f(x)$. Is this correct?
So given $f \circ g = I_y$ then $f(g(y) = f(x) = y, \ \forall x \in X$ and so $f$ is a surjection. Given that $f$ is a surjection, then $\forall x \in X, \ y = f(x)$. This implies that $f \circ g = I_y$.

Is this correct?