Is $f(x)=x^2-4x$ injective and surjective? If $f: A\to \mathbb{R}$ be such that $f(x) = x^2 - 4x$, where $A = \{x ∈ \mathbb{R}: x \ge 2\}$.
How do I determine if the following function is injective or surjective and has an inverse?
Here's my attempt:
domain: $\mathrm{dom} (f) = [2,\infty)$, co-domain: $(-\infty,\infty) = \mathbb R$. 
Let $a, b \in  A$. Then
\begin{align}
f (a) = f(b) &\Rightarrow a^2 - 4a = b^2  - 4b \\
&\Rightarrow a^2 - b^2 - 4a + 4b = 0 \\
&\Rightarrow(a + b)(a - b) - 4(a - b) = 0 \\
&\Rightarrow(a - b)(b - 4) = 0 \\
&\Rightarrow a - b = 0 \text{ or }a + b -4 = 0 \\
&\Rightarrow a = b \text{ or }a + b = 4.
\end{align}
Therefore, f is injective.
Then I become stuck.
 A: Typical strategies for proving or disproving injection and surjection with examples
To show that $f$ is injective, begin by assuming that $f(x_1)=f(x_2)$ where $x_1,x_2 \in A$, and then deduce using algebra that $x_1 = x_2$. 
If $f$ is not injective, then you should be able to find two points $x_1,x_2 \in A$ such that $f(x_1)=f(x_2)$, but $x_1 \neq x_2$. In other words, you are looking for two distinct elements in the domain of $f$ such that they are sent to the same element in the codomain by $f$.
An example of this would be the function $\phi: [0,\infty) \rightarrow \mathbb{R}$ defined by $\phi(x) = \sqrt{x}$. This function is not injective, because
$$\phi(-1) = \phi(1) \text{      but      } -1 \neq 1$$
To determine if $f$ is surjective, choose an arbitrary element in the codomain of $f$. That is, let $r \in \mathbb{R}$. 
Off to the side, do some scratch work to find the value $a \in A$ such that when you plug $a$ into $f$, you get $r$ back.
For example, suppose I wanted to show that the function $\psi: \mathbb{R} \rightarrow \mathbb{Z}$ defined by $\psi(x) = 3x+5$ is surjective.
Choose an arbitrary point $y$ in the codomain of $\psi$ viz. $\mathbb{Z}$. 
I went ahead and did some scratch work to find the value of $x$ in the domain of $\psi$, namely $\mathbb{R}$, such that $\psi(x) = r$. That is, I solved
$$\psi(x) = 3x + 5 = y$$
for $x$, and it is
$$ x = \frac{y-5}{3}$$
Then the proof would be like:
Let $y \in \mathbb{Z}$. Choose $x = \frac{y-5}{3}$. Then
\begin{align*}
\psi(x) &= 3x + 5 \\[8pt]
&= 3\bigg(\frac{y-5}{3}\bigg) + 5 \\[8pt]
&= y
\end{align*}
Therefore, $\psi$ is surjective.
To disprove that a function $\rho$ is surjective, we need to find a $y$ in the codomain such that for all $x$ in the domain, the equation $\rho(x) \neq y$. 
An example of this would actually be $\phi$ above. Notice that the codomain of $\phi$ is $\mathbb{R}$, so If I were to choose a negative number, say $-7$, then I would have
$$\phi(x) = \sqrt{x} = -7$$
However, there are no $x \in \operatorname{domain}(\phi)$ that makes the above equation true. That is to say, there exists a $y \in \operatorname{codomain}(\phi)$ such that for all $x \in \operatorname{domain}(\phi)$, we have $\phi(x) \neq y$. 
Therefore $\phi$ is not surjective.
Another way to look at the concept of surjection is that the range of the function is equal to the function's codomain.
Also a function has an inverse if and only if the function is injective and surjective. Thus $\phi$ does not have an inverse, but $psi$ does (Why? We’ve shown that $\psi$ is surjective. It remains to show that $\psi$ is injective, which can easily be done using the definition.
Some hints to show that your function is not injective
Your proof showing that $f$ is injective won’t work, however, it does show you why it doesn’t work.
Look at the equation 
$$a+b=4$$
Then you can choose distinct $a$ and $b$ whose sun is $4$, and it will imply that $f(a)=f(b)$. Thus $f$ is not injective.
For example, we can choose $a=3.5$ and $b=0.5$. Then $f(a)=f(b)=-1.75$, so $f$ can not be injective.
A hint to show that your function is not surjective
Often when there is a square, I am often skeptical that the function is surjective, especially when the codomain is $\mathbb{R}$.
So my hint to you is choose $y=-5$. Then show that for $x \in A$, $f(x) \neq -5$
A: HINT
Note that for $x>2$


*

*$f'(x)=2x-4>0 \implies f$ is injective


then note that


*

*$x^2-4x+4=(x-2)^2\ge 0 \implies f(x)=x^2-4x\ge -4$


thus $f(x)$ is surjective only on a suitable restriction and in that restriction it is invertible.
A: It is not surjective (and so does not have an inverse)
The derivative of $f$ is $f'(x)=2x-4$ which is positive for all $x\in A$. It follows that $f$ is an increasing function. Since $f(2)=0$ we have that the function is non-negative. In particular $-1\not\in \text{Range} (f)$ which implies that $f$ is not surjective.
The same argument with the derivative also implies that $f$ is injective (because it is strictly monotone).
A: THe graph of a quadratic is a parabola and hence a quadratic can be neither injective nor surjective.
