# Is $y = -x$ injective?

Is $$y = -x$$ an injective function?

I assume it is injective because $$x_1=x_2$$ then $$f(x_1)=f(x_2)$$.

Is this an injective function? I would like to ask for more proper and specific proof.

• Yes: it has an inverse (itself). Your definition of injective is backwards/trivial: by the definition of equality, for every function, term, and formula $\phi$, if $x = y$ then $\phi(x) = \phi(y)$. "Injective" means "1 to 1": no two distinct things get sent to the same value. In other words, $f$ is injective/1-1 iff for all $x, y$, if $x \neq y$ then $f(x) \neq f(y)$; equivalently, if $f(x) = f(y)$ then $x = y$. – BrianO Jan 4 at 5:33

Injective means $$f(a)=f(b) \implies a =b$$. And not the other way around: $$a=b \implies f(a)=f(b)$$. The other way around obviously applies to every function so it's pointless.
It's injective since $$f(a)=f(b)$$ $$\implies -a=-b$$ $$\implies a=b$$
The function $$f(x)=-x$$ has an inverse (which is in fact itself), so it is injective.
More interesting is the calculus method: $$y=f(x)$$ is injective if either negative definite:$$f'(x)<0$$ in the domain or it is positive definite: $$f'(x)>0$$ in the domain. So here it is $$f'(x)=-1$$ for all real numbers. so it is injective for all real numbers.
• You’re missing the hypothesis that the domain is connected. (Of course OP doesn’t seem to know about such subtleties, but still.) Look at $x+1$ on $(-1,0)$ and $x$ on $(0,1)$ with domain $(-1,0)\cup(0,1)$. Or $\tan x$ if you prefer a single “formula.” – symplectomorphic Jan 4 at 5:32
• This helps, I guess, to see why $x\mapsto -x$ is 1-1, but it's not more general, as there are far more injective real functions than there are differentiable real functions, – BrianO Jan 4 at 5:37