1

Consider two functions $f: S \to T$ and $g: T \to U$ for non-empty sets $S,T,U.$

  1. prove or disprove if $g \circ f$ is injective then $f$ is injective.

  2. prove or disprove if $g \circ f$ is injective then $g$ is injective

for question 1) the proof here makes sense but how would I prove that g is injective? This is what I have so far but I feel as though my argument is flawed.

Proof: Let x, y ∈ S, and suppose that g ◦ f is injective, then we have; (1) (g ◦ f)(x) = (g ◦ f)(y) and x = y. Also suppose that g is not injective, then we have (2) (g ◦ f)(x) = (g ◦ f)(y) where f(x) does not equal to f(y).

so g(f(x)) = g(f(y)). Since we know that x = y from (1), then f(x) = f(y), which contradicts the assumption in (2). Therefore, by contradiction, g must also be injective.

EDIT: counterexample for question 2)

Suppose that f and g go from reals to reals and let f(x) = e^(x) and g(x) = x^2, where x is a real number and g(x) is not injective. We have, g(f(x)) = e^(2x), which is injective. Therefore, if g o f is injective, then g is not necessarily injective.

Would the above be sufficient for a counter example or would I have to prove/disprove injectivity for the functions I defined?

Asaf Karagila
  • 393,674
  • If $g$ is not injective, then $g(x) = g(y)$ does not necessarily imply $x = y$. What you have written isn't necessarily related to the injectivity of $g$.

    Hint: try to construct a counterexample for 2.

    – greg115 Nov 10 '22 at 02:25
  • There may be elements in the domain of $g$ that are outside the range of $f$. – peterwhy Nov 10 '22 at 02:28
  • 2
    Try $f(x)=e^x$ and $g(x)=x^2$, both functions from reals to reals. – Ned Nov 10 '22 at 02:29
  • 3
    It's subtle... but notice you are tacitly assuming $f$ is surjective. You say if $g$ is not injective we would have an $f(x)\ne f(y)$ where $g(f(x))=g(f(y))$ (a contradiction) but that is not correct. If $g$ is nto infective we would have a $w\ne u;w,u\in T$ where $g(w)=g(u)$. But if $f$ is not surjective we have no reason to believe that there is both and $x,y\in S$ so that $f(x) =w$ and $f(y)=u$. It's possible there is an $x$ so that $f(x)=u$ but there is no $y$ so that $f(y)=u$. – fleablood Nov 10 '22 at 02:37
  • 1
    In other words. You have successfully argued that if $f:S\to f(S)\subset T$ and $g':f(S) \to U$ and $f\circ g'$ is injective then $g'$ is injective. But if $f$ is not surjective and $f:S\to T\supsetneq f(S)$ and $g:T\to U$ we can have $u\not \in F(S)$ and $g(u) = g(f(x)$ – fleablood Nov 10 '22 at 02:44
  • Oh okay, that makes sense. So how would a counter example for this look like? – freeantivirus Nov 10 '22 at 02:59
  • 1
    $S={1,2,}$, $T={a,b,c}$ and $U={apple, orange}$. $f(1)=a$, $f(2)=b$. $g(a)=apple; g(b)=orange; g(c)=apple$. Hence $g\circ f:S\to U$ will have $g(f(1))=g(a) =apple$ and $g(f(2))= g(b) = orange$. $g\circ f$ is injective. But $g$ is not as $g(a) = g(c)$ but $a\ne c$. The "catch" is that there isn't any $x \in S$ so that $f(x)=c$. – fleablood Nov 10 '22 at 03:07
  • Oh I see, thanks for clarifying. I made an edit to the question with a counterexample I wrote, would that also be valid if you don't mind checking? – freeantivirus Nov 10 '22 at 03:13
  • You cannot "pro[ve something] by counterexample." Counterexamples disprove things. – Arturo Magidin Nov 10 '22 at 04:15

0 Answers0