1. ## Sets and functions

(1) Functions $\displaystyle f: \mathbb{R} \to \mathbb{R}$ and $\displaystyle g: \mathbb{R} \to \mathbb{R}$ are defined as follows:

$\displaystyle 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}$

$\displaystyle 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 $\displaystyle f \circ g$ and $\displaystyle g \circ f$. Is $\displaystyle g$ the inverse of $\displaystyle f$? Is $\displaystyle f$ injective or surjective? How about $\displaystyle g$?

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

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

(2) Suppose that $\displaystyle f: X \to Y$ and $\displaystyle g: Y \to Z$ are surjections. Prove that the composite $\displaystyle g \circ f: X \to Z$ is also a surjection. So I started out by saying that $\displaystyle \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 $\displaystyle \forall z \in Z, \ gf(x) = z$?

(3) Let $\displaystyle f: X \to Y$ be a function. Prove that there exists a function $\displaystyle g: Y \to X$ such that $\displaystyle f \circ g = I_{y}$ if and only if $\displaystyle f$ is a surjection. So we want to prove the following: $\displaystyle f \circ g = I_{y} \Leftrightarrow$ $\displaystyle 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 $\displaystyle f(g(x)) = y$, $\displaystyle g(x)$ points back to the domain of $\displaystyle f$. Then $\displaystyle \forall x \in X, \ y = f(x)$. Is this correct?

Thanks

2. $\displaystyle \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.

3. Ok so $\displaystyle f \circ g \neq g \circ f$. Since $\displaystyle f$ is not bijective its inverse is not $\displaystyle g$. $\displaystyle f$ is surjective, and I think $\displaystyle g$ is bijective?

4. Yeah I drew that graph. It looks like $\displaystyle g(x)$ is bijective.

5. Originally Posted by shilz222
Yeah I drew that graph. It looks like $\displaystyle g(x)$ is bijective.
BIJECTIVE?
$\displaystyle g( - 2) = g(0) = g(2) = 0$

6. $\displaystyle g(-2) = -4$. Your talking about $\displaystyle f(x)$ which is surjective.

7. Originally Posted by shilz222
Your talking about $\displaystyle f(x)$ which is surjective.
O.K.

But is $\displaystyle g$ onto?
$\displaystyle g(?) = 2$

8. $\displaystyle g(x)$ is not surjective. Its injective.

9. Originally Posted by shilz222
$\displaystyle g(x)$ is not surjective. Its injective.
Correct.

10. For (2) $\displaystyle g(f(x)) = g(y) = g(z) \implies g \circ f$ is surjective. Is that correct?

11. (2) Suppose that $\displaystyle f: X \to Y$ and $\displaystyle g: Y \to Z$ are surjections.
Prove that the composite $\displaystyle g \circ f: X \to Z$ is also a surjection.

Suppose that $\displaystyle q \in Z$ then $\displaystyle \left( {\exists p \in Y} \right)\left[ {g(p) = q} \right]$. But then $\displaystyle \left( {\exists m \in X} \right)\left[ {f(m) = p} \right]$; therefore $\displaystyle g \circ f(m) = g\left( {f\left( m \right)} \right) = g\left( p \right) = q$, surjective.

12. My proof was more like this: Consider $\displaystyle f: X \to Y$ and $\displaystyle g: Y \to Z$ both surjective. Given any $\displaystyle z \in Z$ we must find an $\displaystyle x$ such that $\displaystyle f(x) = z$. Since $\displaystyle g$ is surjective there is a $\displaystyle y \in Y$ such that $\displaystyle g(y) = z$. Since $\displaystyle f$ is surjective there is an $\displaystyle x \in X$ such that $\displaystyle f(x) = y$. Therefore $\displaystyle g \circ f(x) = g(f(x)) = g(y) = g(z)$.

13. (3) Let $\displaystyle f: X \to Y$ be a function. Prove that there exists a function $\displaystyle g: Y \to X$ such that $\displaystyle f \circ g = I_{y}$ if and only if $\displaystyle f$ is a surjection. So we want to prove the following: $\displaystyle f \circ g = I_{y} \Leftrightarrow$ $\displaystyle 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 $\displaystyle f(g(x)) = y$, $\displaystyle g(x)$ points back to the domain of $\displaystyle f$. Then $\displaystyle \forall x \in X, \ y = f(x)$. Is this correct?
So given $\displaystyle f \circ g = I_y$ then $\displaystyle f(g(y) = f(x) = y, \ \forall x \in X$ and so $\displaystyle f$ is a surjection. Given that $\displaystyle f$ is a surjection, then $\displaystyle \forall x \in X, \ y = f(x)$. This implies that $\displaystyle f \circ g = I_y$.

Is this correct?