$f:E \mapsto E$ is a mapping such that $f^{2} - f - id_{E} = 0$. Show $f$ is invertible. I'm trying to figure out if $f$ is an invertible function.
I was thinking about using two different approaches:
1- Assuming $f$ is invertible and solving $f^{2} - f - (f \circ f)$ to see if its equal to $0$.
2- Check if $f$ is a bijective function. Based on the definition of $f$, we have that $f(f(x)) - f(x) - id_{E} = 0 \Leftrightarrow  f(x) = f(f(x)) - id_{E}, \forall x \in E$
In both cases I feel like I'm missing information about $f$ to come to a conclusion...
Any hints?
EDIT: $E$ is a vector space.
 A: I'll expand Stephen's answer in the comments.
Let's start at the beginning. Let $f$ and $g$ be two functions from $E$ to $E$. Then because $E$ allows addition and subtraction we can build a new function $f - g$ defined by $(f - g)(x) = f(x) - g(x)$. Here $x$ is any element of $E$.
$f$ need not be linear here. We apply the existence of this new function to the special case $g = I$, so we get the existence of a function $(f - I)$ that works as follows:
$(f - I)(x) = f(x) - x$
Now let $y$ be any element of $E$ and (this is the brilliant idea of Stephen) use the element $f(y)$ in place of $x$ above. Then we get:
$(f - I)(f(y)) = f(f(y)) - f(y)$
Now what do we recognize here? On the left hand side we just have $y$ fed into the composition $(f - I) \circ f$.
On the right hand side we have $(f \circ f)(y) - f(y)$ or $y$ fed into the function $(f \circ f) - f$.
So (since $y$ was arbitrary and had no special properties) we can dodge the $y$ and just write it as an equality of functions:
$(f - I) \circ f = (f \circ f) - f$
Aha! But we know something about the function on the right hand side. The question, as in the title of the post, stated that the function on the right hand side equals $I$! So we end up with:
$(f - I) \circ f = I$
As discussed in the comments this means that $f$ is injective and that $f - I$ is surjective.
EDIT: I mistakenly believed that this implies that $f$ must be surjective as well but my reasoning was faulty. The question of surjectivity of $f$ is still open. (EDIT 2: no it isn't. We can give examples of surjective $f$ and of non-surjective $f$. I will do so at the end of the post.)
HOWEVER, as pointed out by Stephen, when $f$ is linear we do know that $f$ is surjective because then we get a second equality
$f \circ (f - I) = I$.
I will explain that argument also.
Again let $y \in E$ be arbitarty and let $x = f(y)$. If we feed $y$ to the function on the left, so $f \circ (f - I)$ we get $f(x - y)$. Now if $f$ is linear this equals $f(x) - f(y)$. Remembering the definition of $x$ this can be written as $f(f(y)) - f(y)$ or $(f \circ f)(y) - f(y)$ or $(f \circ f - f)(y)$.
So again we can forget about $y$ and get the equality of functions:
$f \circ (f - I) = f \circ f - f$
But we know that the function on the right equals $I$ for this very special $f$ (this is given in the question) so that we end up with
$f \circ (f - I) = I$.
So summarizing: we always have that $f$ is injective. If $f$ is linear we moreover have that $f$ is surjective, hence bijective. The question if there exists a non-linear non-surjective $f$ nevertheless satisfying the equation from the title is quite interesting (see below) but (as stated in the comments) it seems most likely that your book was talking only about linear transformations.
EDIT 2: what if $f$ is not linear? To understand this we look at the case $E = \mathbb{R}$. Here there are exactly two linear functions $f$ (I will calle them $f_1$ and $f_2$) satisfying the requirement: $f_1$ is simply 'multiplying with $\phi$' and $f_2$ is 'multiplying with $-1/\phi$'. Here $\phi$ is the golden number. It satisfies $\phi(\phi - 1) = 1$, which is very similar to $f(f - I) = I$, this is why it works (I leave the details of verifying to you).
Now for non-linear functions.
Let $f$ be defined by $f(x) = f_1(x)$ if $|x| \geq 1$ and $f(x) = f_2(x)$ if $|x| < 1$. This still satisfies the equation, the point is that if $|x| \geq 1$ then $|f(x)| \geq 1$ and so $(f \circ f)(x) = (f_1 \circ f_1)(x)$ and we can use the fact that $f_1$ satisfies the criterion. And similarly if $|x| < 1$ then $|f(x)| < 1$ and hence $(f \circ f)(x) = (f_2 \circ f_2)(x)$. So in this case we know the equation holds because it holds for $f_2$.
Now my claim is that this $f$ is not surjective since $1$ is not in the image. Indeed: if $x \geq 1$ then $|f(x)| > 1.6$ so $f(x) \neq 1$ and if $x < 1$ then $|f(x)| < 1$ so $f(x) \neq 1$ as well.
FINALLY: this example shows that we need some extra condition (of which linearity is the most natural) to get surjectivity. It does not mean that the linearity is the only such condition, i.e. that bijective $f$ satisfying the condition of the question are automatically linear. Here is an example of a bijective non-linear $f$.
Let $f(x) = f_1(x)$ for $x \in \ldots \phi^{-2}, \phi^{-1}, 1, \phi^{1}, \phi^2, \ldots$ (i.e. all powers of $\phi$) and $f(x) = f_2(x)$ for all other $x \in E = \mathbb{R}$. Then again we have that $f$ behaves as $f_1$ on $f(x)$ if $f$ behaves as $f_1$ on $x$ and that $f$ behaves as $f_2$ on $f(x)$ whenever $f$ behaves as $f_2$ on $x$. So again we see that $f$ satisfies the condition of the question just because the linear maps $f_1$ and $f_2$ do. However $f$ is not linear itself as $f(1) + f(2) \neq f(3)$.
