1

I need to prove the following claim:

Suppose $f:A\to B$ is function. Prove: $f$ is surjective iff for all sets $C$ and all functions $h:B\to C$ and $g:B\to C$, $h\circ f = g\circ f$ implies $h = g$.

Step 1:

Assume $f$ is surjective and $h \circ f = g \circ f$. For all $y\in Y$, there exists $x\in X$ such that $f(x)=y$.

Since $h \circ f = g \circ f$, we have $h(f(x))=g(f(x))$. Because of our assumption, For all $y\in Y$, $h(y)=g(y)$. So, $g=h$.

Step 2:

I do not know how to do step 2. Can you check step 1 and help me to do step 2?

user26857
  • 52,094
emre
  • 35
  • step 1 is correct. for step 2 assume $f$ misses some $y$ and then construct $h$ and $k$ with $h\neq k$ but $hf=kf$. – Peter Müller Dec 30 '21 at 09:57
  • Notice I edited your question to improve the formatting. It is strongly advised that you use Mathjax to format your questions on this site - it's like LaTeX for the web. I edited your question this time since you are new, but in future, please format the question yourself. See here for a quick guide: MathJax tutorial – 5xum Dec 30 '21 at 09:57

2 Answers2

0

Assume that $f$ is not surjective. Then there is some $b\in B$ which is not in the range of $f$. Consider the maps $h,k\colon B\longrightarrow\{0,1\}$ where $h$ is the null function and$$k(x)=\begin{cases}0&\text{ if }x\ne b\\1&\text{ if }x=b.\end{cases}$$Then both $h\circ f$ and $k\circ f$ are the null function, but $f\ne k$.

0

Step 1 is correct, if a little awkwardly written.

The way I would write the proof is like this:

Let $y\in Y$. Then, because $f$ is surjective, there exists some $x\in X$ such that $f(x)=y$. Therefore, $h(y)=h(f(x))=(h\circ f)(x)=(g\circ f)(x)=g(f(x))=g(y)$. Because $y$ was arbitrary, we have that $\forall y\in Y: g(y)=h(y)$, and therefore, $g=h$.


For step 2, I advise you to try the counterpositive and prove that, if $f$ is not surjective, then there exist two functions $g,h$ such that $g\circ f=h\circ f$ and $g\neq h$.

Hint: think about where the two functions can take different values!

5xum
  • 123,496
  • 6
  • 128
  • 204