Is the function $f(x) = x^2 - 2x$ one-to-one? The answer given is that it's not because it's a parabola and hence, would fail the horizontal line test, i.e., two values of $x$ will have the same value of $f(x)$.
However, how can we prove the same algebraically? My solution:
Let $f(x_1) = f(x_2)$
$\implies x_1^2 - 2x_1 = x_2^2 - 2x_2$
$\implies (x_1 - 1)^2 -1 = (x_2 - 1)^2 - 1$
$\implies (x_1 - 1)^2 = (x_2 - 1)^2$
$\implies x_1 = x_2$ (I believe that I've made the mistake here because we can't really take square root of both the sides.)
My question is: how do we prove that the function is not one-to-one algebraically?
 A: The last implication is an error.
$$(x_1-1)^2=(x_2-1)^2 \Rightarrow |x_1-1|=|x_2-1|$$
So, either $x_1=x_2$, or $x_1=2-x_2$.
A: We have a counterexample.
$f(0)=0=f(2)$, though $0\neq2$.
A: From $a^2=b^2$ you can deduce that either $a=b$ or $a=-b$.
So it's incorrect to deduce from $(x_1-1)^2=(x_2-1)^2$ that $x_1-1=x_2-1$.
A: You can complete the square so that you have $y = (x-1)^2 - 1$. Now, for given $y \geq -1$, we have $x_1, x_2$ which map to $y$, namely 
$x_1 = \sqrt{y + 1} + 1$ and $x_2 = 1 - \sqrt{y+1}$ and so it is not injective. 
A: Let $f=0$
$\implies x^2=2x$
$\implies x=0$ or $2$.
A: Can one say this.
$x^2=y^2\implies \ln x^2= \ln y^2\implies \ln x=\ln y \implies x=y$
A: if the domain of $f(x)$ is $\mathbb R$, we have a counterexample $f(0)=f(2), 0\neq2$
So $f(x)$ is not one-to-one
But, if the domain of $f(x)$ is different, like $\left\{x|x \geq 1, x\in\mathbb R\right\}$
than
$$f(x_1)=f(x_2)\\
x_1^2-2x_1=x_2^2-2x_2\\
(x_1-1)^2=(x_2-1)^2\\
x_1-1=x_2-1\,\,\,\text{(since $x_1-1\geq0, x_2-1\geq0$)}\\
x_1=x_2
$$
so if the domain is$\left\{x|x \geq 1, x\in\mathbb R\right\}$, $f(x)$ is one-to-one.
Since the question didn't defined the domain of the function, we can't answer it. 
