I started to learn about injectivity, and was somewhat confused as to how you show that a mapping is injective. From what I understand, injectivity is where $f: \Bbb X \mapsto \Bbb Y$ given that the one value of $\Bbb X$ maps to one value of $\Bbb Y$ i.e. the function is one to one. I am told the proof for showing a function is injective you must state that whenever $x_1,x_2\in \Bbb X$ are such that $f(x_1)=f(x_2)$ and hence $x_1=x_2$, but surely this is showing that 2 different inputs give the same output and is hence not injective as it is not one to one i.e outputs are equal?
I may be missing out a key piece of information here but at face value I don't understand how this shows $f(x)$ is injective?