Prove function injectivness based on composition

50 Views Asked by At

The problem: Let $X,Y,Z$ be non-empty sets. Prove that function $f: X \to Y$ is injective if whatever functions $g,h: Z \to X$ $f \circ g = f \circ h$ follows $g=h$.

I know that a function is injective if $f(x_1) = f(x_2) \implies x_1 = x_2$ I also know that composition is basicly $f \circ g = f\bigl(g(x)\bigr)$

So we get that $f\bigl(g(x_1)\bigr) = f\bigl(g(x_2)\bigr) \implies g(x_1) = g(x_2) \implies x1 = x2$

What I don't know is how to prove the function $f $ injectivness using these given statements. Is the composition $f: X \to X$ or $f: Z \to X$?

Any help appreciated Best regards

1

There are 1 best solutions below

0
On

Suppose that $f$ is not injective. Then there are $x,y\in X$ such that $x\neq y$ and $f(x)=f(y)$. Let $Z=\{0\}$ and let $g,h\colon Z\longrightarrow X$ be the functions defined by $g(0)=x$ and by $h(0)=y$. Then $g\neq h$, but $f\circ g=f\circ h$.