3

Show that if $f \circ g$ is surjective, then $f$ is surjective, and $g$, the function applied first, needs not to be. (Note:$f \circ g=f(g(s))$, $f$ and $g$ are well defined) This statement originates from http://en.wikipedia.org/wiki/Surjective_function

pxc3110
  • 1,410

3 Answers3

6

Hints:

  1. the image of $f\circ g$ is a subset of the image of $f$
  2. for a counterexample, take the codomain of $f$ to be a one element set
egreg
  • 238,574
6

Let $g:A\to B$ and $f:B\to C$ then $f\circ g :A\to C$ be function .

If $f\circ g$ is onto then $\forall c\in C$ there exist $a\in A$ such that $f\circ g(a)=c$.

Let $g(a)=b$ then since $f\circ g(a)=f(g(a))=f(b)=c$ we see that for every $c\in C$ there exist $b\in B$ such that $f(b)=c$ so $f$ is onto.

$g$ need not to be onto,

let $g(x)=e^x$ and $f=ln(x)$ then $f\circ g(x)=x$ so it is clearly onto but $g$ is not onto since $g(x)=e^x>0$ for all $x$.

mesel
  • 14,862
  • The codomain of g and the domain of f need not to be equal. In fact, we can define g and f in this way: g:A→B,f:C→D, where f(A)⊆C – pxc3110 Apr 12 '14 at 10:11
  • @pxc3110: Yes it is, as in the example which I gave but it does not change the proof. I will fix it. – mesel Apr 12 '14 at 10:14
  • Correction:define g and f in this way: f:A→B,g:C→D, where f(A)⊆C, f(A)={$f(a)|a\in A$}, therefore in your case, g(A)$\in$ B' – pxc3110 Apr 12 '14 at 10:31
  • 1
    @pxc3110: Something makes me bored, In a standart way to define compositon you need $f:A\to B$ and $g:B\to C$ but in math many defination is flexible and you can extend this idea as drhab point out. But it is not the point which make me bored the language you use, please learn to say 'please', even if you think that given answer is wrong. And I rechanged my answer as it is in the firs place even if you like or not. – mesel Apr 12 '14 at 10:41
  • I'm not being rude here. I have never been mad at someone just because they answer my question in a way that I don't consider to be rigorous. And I think in this case we really need to be more rigorous here, because that's how it works in mathematics. – pxc3110 Apr 12 '14 at 10:44
  • 1
    depending the defination there http://en.wikipedia.org/wiki/Function_composition it is completly rigorous, If you use differnt defination, you should be rigorous in your question before expecting from the answer. – mesel Apr 12 '14 at 10:50
  • +1 In the counterexample $g:\mathbb{R}\rightarrow\mathbb{R}{>0}$ and $f:\mathbb{R}{>0}\rightarrow\mathbb{R}$ so that $f\circ g$ is welldefined. :-) – drhab Apr 12 '14 at 11:41
  • @drhab: you are right :-). – mesel Apr 12 '14 at 11:49
1

Let it be that $g:A\rightarrow B$ and $f:B\rightarrow C$ are functions. If $f\circ g:A\rightarrow C$ is surjective and $c\in C$ then $f\left(g\left(a\right)\right)=c$ for some $a\in A$. That shows immediately that $f$ is surjective. If $A$ and $C$ are singletons and $B$ is not then $f\circ g$ is surjective, but $g$ is not.

drhab
  • 151,093
  • 1
    @pxc3110 I fully disagree on this. If codomain and domain are not equal then $f\circ g$ is formally not defined. If $g:A\rightarrow D$ and $D\subset B$ then you must invoke an inclusion $\iota:D\rightarrow B$ and the composition becomes $f\circ\iota\circ g$. – drhab Apr 12 '14 at 10:25
  • 1
    Correction:define g and f in this way: f:A→B,g:C→D, where f(A)⊆C, f(A)={$f(a)|a\in A$} – pxc3110 Apr 12 '14 at 10:28
  • 1
    @pxc3110 Have a look at http://en.wikipedia.org/wiki/Function_composition. Also look at functions as morphisms in the category of sets. Only composition by coinciding domain and codomain. You are wrong! – drhab Apr 12 '14 at 10:32
  • The domain of g and codomain of f need not to coincide but the range of f need to be within the domain of g . Consider f:R$\to$ R f(x)=sinx+2, g:$R^+ \to R$,g(x)=lnx, g(f(x)) is well defined then – pxc3110 Apr 12 '14 at 10:38
  • If you are talking about $f\circ g$ here then domain of $g$ (=$\mathbb{R})$ coincides with codomain of $f$. Here $g\circ f$ is not defined. Also note that $f$ can take values equal to $0$ and $g$ is not defined there. So what should be the domain of $g\circ f$ (if it was defined)? I see that you just repaired your comment, but here you should take $f:\mathbb{R}\rightarrow\mathbb{R}_{>0}$ with $x\mapsto\sin x+2$ to make the composition formally defined. – drhab Apr 12 '14 at 10:46
  • It's been fixed. The codomain of f is R but the domain of g is R+, they do not equal to each other, but the range is [1,3], which is within R+, that's why f(g(x)) is called a function. Its domain is the same to that of f, which is R – pxc3110 Apr 12 '14 at 10:52
  • Functions $f_{1}:\mathbb{R}\rightarrow\mathbb{R}{>0}$ and $f{2}:\mathbb{R}\rightarrow\mathbb{R}$ both with prescription $x\mapsto\sin x+2$ are different functions. Purely because they have different codomains, wich is an essential part of the function. If $g$ is a function with domain $\mathbb{R}{>0}$ then $g\circ f{1}$ is defined and $g\circ f_{2}$ is not. I am afraid that I cannot convince you, so ask others. – drhab Apr 12 '14 at 10:55
  • "Only composition by coinciding domain and codomain" I have looked up to the link already, and nowhere is this restriction stated. "If you are talking about f∘g here then domain of g (=R) coincides with codomain of f" The domain of g in the example I gave is R+, the postive real numbers. "f can take values equal to 0" f takes values from 1 to 3 – pxc3110 Apr 12 '14 at 11:07
  • It is not the range of a function $f$ that is decisive whether $g\circ f$ is defined or not. It is the codomain of $f$. The range is decisive when it comes the question whether a composition can be made by intervenience of an inclusion. – drhab Apr 12 '14 at 11:08