Prove that this is incorrect
$g \circ f$ is surjective, but $g$ is not surjective.
$f$ and $g$ are not injective, but $g \circ f$ is injective.
I know these both don't exist but, I don't really know how to formally prove them. Do I use proof by contradiction?
My attempt:
- We know $g \circ f$ is surjective and we want to show that $g$ is surjective. Let $y \in\mathbb R$. since $g \circ f$ is surjective, there exists an $b \in \mathbb R$ such that $g(f(b)) = y$. We set $c = f(b) \in\mathbb R,$ then $g(f(b))=g(c)=y$. So $g$ is surjective.
Is this how you're suppose to prove the question? I feel like I just proved that $g \circ f$ is surjective then $g$ is surjective but not the question above.
- I don't really know where to start with this one. Am I suppose to use proof by contradiction here?
For part 2, since $f$ is not injective, $\exists x,y \in \mathbb{R}$ with $x \neq y$ such that $f(x) = f(y)$. Then $(g \circ f)(x) = (g\circ f)(y)$.
Your proof of part 1 is correct. Since $g\circ f$ surjective $\implies$ $g$ surjective, there is no example of $g$, $f$ where $g \circ f$ is surjective, but $g$ is not.
Edit: Since $f(x)=f(y)$, we have $$(g\circ f)(x) = g(f(x)) = g(f(y)) = (g \circ f)(y).$$ Since $x \neq y$, it follows that $g \circ f$ is not injective.