I recently posted a question (Solving $f(x+f(y)) = f(x) + y$). However, I can't wrap my head around how to prove this function is injective. I tried using the answers in the responses but my I don't understand how "Let's start by plugging in x=0. We have f(f(y))=f(0)+y. This tells us that f is injective, since if $f(a)=f(b)$, then $f(0)+a=f(f(a))=f(f(b))=f(0)+b$ and hence $a=b$." works. If anyone can give a basic explanation that would be great.
Thanks in advance.
Recall that all that is needed to show injectivity is to show that the implication "if the function values are equal, then the function arguments must be equal" holds.
So, to check injectivity, the simplest test is: take equal function values $f(a)=f(b)$, and show that this already implies $a=b$.
This is exactly what this answerer did. Fix $f(a)=f(b)$, then (a bit longer) $$f(f(a))=f(f(b))$$ so you can write $$f(f(a))=f(0+f(a))=f(0)+a=f(0)+b=f(0+f(b))=f(f(b)).$$ Looking at the middle, you can see that $a=b$ holds, which is all we needed to test for.