0

The full question is: Given a function $f:A\rightarrow B$, prove that: $f$ is injective if and only if $f^{-1}(f(X))= X$ for all $X \subset A$

I initially was thinking: If $f^{-1}(f(X))= X$, then $x \in f^{-1}(f(X))= X \iff x \in X$

But then I thought: What if there are $x_{1}$ and $x_{2}$ in X, with $x_{1}\neq x_{2}$ and $f(x_{1})=f(x_{2})$?

Then $f$ isn't injective and $f^{-1}(f(X))= X$ still seems valid.

What am I missing here?

Jj1
  • 28
  • 7
  • 1
    This has to work for all $X \subset A$ right? What about the case where $X = {x_1}$? – SescoMath May 08 '20 at 22:58
  • I understand that if there is only $x_{1}$ in X and $f$ isn't injective then there could be an element of Y, such that $Y\subset f^{-1}(f(X))$ and $f^{-1}(f(X))\neq X$. But my question is what if there are two elements in X, and the function of both have the value? – Jj1 May 08 '20 at 23:04
  • This has answers here https://math.stackexchange.com/questions/78110/is-f-1fa-a-always-true. – saru May 08 '20 at 23:07
  • 1
    @MateusBarbosa make sure you understand what the quantifier 'for all' means – SescoMath May 08 '20 at 23:09
  • I think I got it. Is it because in my example there could be $X=\left\lbrace x_{1},x_{2}\right\rbrace $ and $Y=\left\lbrace x_{1}\right\rbrace $ with $f(x_{1})=f(x_{2})$ and then, even though $Y \subset A$, $f^{-1}(f(Y))\neq Y$ – Jj1 May 08 '20 at 23:34
  • @MateusBarbosa: It has to work for all subsets $X$ of $A$. If there are $x_1,x_2\in A$ such that $x_1\ne x_2$, but $f(x_1)=f(x_2)$, then $$f^{-1}\big[f[{x_1}]\big]\supseteq{x_1,x_2}\ne{x_1};,$$ and it does not work for $X={x_1}$. It also fails for $X={x_2}$. – Brian M. Scott May 08 '20 at 23:34
  • Got it. Thank you all very much. – Jj1 May 08 '20 at 23:37
  • You may have understood "for all $X\subset A$" as applying to the whole statement "$f$ is injective if and only if $f^{-1}(f(X))=X$", but the person who wrote it intended "for all $X\subset A$" to apply only to the last part, "$f^{-1}(f(X))=X$", I'm inclined to blame the author for this ambiguity. It won't confuse experienced mathematicians who know what should be meant, but it's likely to confuse students who are just learning this material. – Andreas Blass May 09 '20 at 03:29

1 Answers1

1

There's no counter-example. Suppose $f(x_1)=f(x_2)$. Then $x_1=f^{-1}f(x_1)=f^{-1}f(x_2)=x_2$. Thus $f$ is injective.