Even function that is injective

even-and-odd-functionsfunctions

I have heard/read multiple times that an even function can't be injective. And the proof I see for this is the following:

An even function can never be injective because for every $x\neq 0$ we have $x\neq -x$ and $f(x)=f(-x)$

But what about the function:

$f(x)=\sqrt{-|x|}+73$

$f$ is defined in $A_f=\{0\}$

For every $x$ and $-x$ in the domain of $f$, the equation $f(x)=f(-x)$ is true, so the function is even.

For every $a,b\in A_f$, the sentence $f(a)=f(b) \Rightarrow a=b$ is true(since $True \Rightarrow True$ is $True$) (and of course the contrapositive sentence is also true). So the function is injective.

Am I wrong somewhere? If not, why do so many people(even mathematicians) say that there can't be an even function that is injective even though there are many simple examples like the above?

Best Answer

Let $A \subseteq \mathbb{R}$ be such that there is some $a \in A$ with $-a \in A$ and $a \not = 0$. Then $f : A \to \mathbb{R}$ cannot be both even and injective. But this is the most you can say.

(Of course, if you have an even function whose domain has a nonzero point in it, then the domain satisfies the above condition and so the function is not injective.)