Construct an endomorphism $f$ such that $f\circ f=-Id$ 
Let $E$ be a real vector space of finite dimension $n$ and $f$ an endomorphism such that
  $$f\circ f=-Id_E$$
  
  
*
  
*Show that $n = \dim (E)$ is an even integer
  
*Assume $n$ is even, $n=2p$. Construct an endomorphism $f$ such that $f\circ f=-Id$

1) I have,  $f^2 = -Id \implies \det{(f^2)} = (\det{f})^2 = (-1)^n$.  So being on a real space, n is even. 
2) I thought about rotation for $f$, but I have no ideas to construct it explicitly.
Thanks in advance,
 A: Ok, now that the problem has been essentially ruined...
Suppose $f:V\to V$ is an linear map with $f^2=-I$ and $\dim V=2$. Let $v\in V$ be any non-zero vector. The image $w=f(v)$ is some vector in $V$. If it were linearly dependent on $v$ there would be a scalar $\lambda$ such that $f(v)=\lambda v$, and then $-v=f^2(v)=f(\lambda v)=\lambda^2 v$: we would then have $-1=\lambda^2$, which is impossible. It follows that necessarily we have that the set $\{v,w\}$ is linearly independent. Since $\dim V=2$, it is in fact a basis. What is $f(w)$? Well, since $f^2=-I$, we must have $f(w)=f(f(v))=f^2(v)=-v$. we thus see that $f$ is completely determined, since $f(v)=w$ and $f(w)=-v$. In other words, in the ordered basis $(v,w)$, the matrix $f$ is $\begin{pmatrix}0&-1\\1&0\end{pmatrix}$.
You can do similar games in the general case.
A: Another way to proceed to construct examples.
Suppose first that $f:V\to V$ is an endomorphism of a finite dimensional real vector space such that $f^2=-I$. We can then turn $V$ into a complex vector space: we will use the  addition that $V$ comes with, but we need to define what it means to multiply a vector $v\in V$ by a complex number $z=a+bi\in\mathbb C$ with $a$, $b\in\mathbb R$. We will set $$z\cdot v=av+bf(v).$$ Of course, we now have to check that in this way we do obtain a complex vector space structure on $V$. This is very unevenful, except when we have to check the associativity of the scalar multiplication: that if $z$, $w\in\mathbb C$ and $v\in V$ then $zw\cdot v=z\cdot(w\cdot v)$. I invite you to do this computation and to see why exactly we need that $f^2=-I$ for this.
Ok, after we have done this, we have a complex vector space structure on $V$. Since $V$ is finitely generated as a real vector space, it is also finitely generated as a complex vector space (pick any finite subset of $V$ which generated it as a real vector space: then it generates $V$ as a complex vector space!), and we see that $V$ is also finite dimensional over $\mathbb C$.
It follows that there is a basis $\{v_1,\dots,v_n\}$ of $V$ as a complex vector space. You should now check that $\{v_1,iv_1,v_2,iv_2,\cdots,v_n,iv_n\}$ is a basis of $V$ as a real vector space, and describe the matrix of $f$ in this basis. This describes us all examples of endomorphism as in the question! (And shows that the dimension is necessarily even, by the way)
Conversely, if $V$ is any finite dimensional complex vector space then we can view $V$ as a real vector space and define the map $f:v\in V\mapsto iv\in V$, which is $\mathbb R$-linear. This gives an example of an endomorphism as in the question, and the observations above show that all examples are obtained in this way.
This is why we usually call endomorphisms which square to $-I$ «complex structures».
A: The proof of (1) given in the question is very nice indeed.
As for item (2), let $\mathbf e_1, \mathbf e_2, \ldots, \mathbf e_n$ be a basis for $E$.  Set
$f(\mathbf e_{2j + 1}) = \mathbf e_{2j + 2}$ for $0 \le j \le m - 1$ where $2m = n = \dim E$, and set $f(\mathbf e_{2j + 2}) = -\mathbf e_{2j + 1}$ for the same range of $j$.  So $f(\mathbf e_1) = \mathbf e_2$, $f(\mathbf e_2) = -\mathbf e_1$ ($j = 0$), $f(\mathbf e_3) = \mathbf e_4$,  $f(\mathbf e_4) = -\mathbf e_3$ ($j = 1$), and so forth, on out to $f(\mathbf e_{n - 1}) = f(\mathbf e_{2m - 1}) = \mathbf e_{2m} = \mathbf e_n$, $f(\mathbf e_n) = f(\mathbf e_{2m}) = -\mathbf e_{2m - 1} = -\mathbf e_{n -1 }$ ($j = m - 1$).  We have $f^2(\mathbf e_j) = -\mathbf e_j$ for all $j$.  Extend $f$ to all $E$ by linearity:  $f(\sum v_j \mathbf e_j) = \sum v_j f(\mathbf e_j)$.  Then it is easy to see that $f^2(\sum v_j \mathbf e_j) = -\sum v_j \mathbf e_j$, or $f^2 = -Id$.
Hope this helps!  Cheerio,
and as always,
Fiat Lux!!!
A: Question 1. OP's answer is correct and elegant. Still, it is interesting to see another proof which provides a deeper understanding of what really happens.
If $f\circ f=-I$, then the  polynomial $p(x)=x^2+1$ annihilates $f$. This implies that $f$ is diagonalizable in the complexification of $E$, and its roots are in $\{i,-i\}$. If $\dim E$ was odd, then $f$, being diagonalizable, would have a real eigenvalue.
Question 2. Let $\dim E=2p$ and $B=\{e_1,e_2,\ldots,e_{2p}\}$ a basis of $E$.
Define $f$ on the basis as follows
$$
f(e_{2i-1})=e_{2i},\quad f(e_{2i})=-e_{2i-1},
$$
where $i=1,\ldots,p$. Then $f\circ f=-I$.
A: Another approach would be to note that the minimal polynomial of $f$ must be $x^2+1$ since $f$ is a linear operator on a real vector space. So, the roots of the characteristic polynomial are $i$ and $-i$. Furthermore, the characteristic polynomial is a polynomial over $\mathbb{R}$, so this means that the characteristic polynomial is actually a power of $x^2+1$. In particular, the eigenvalues $i$ and $-i$ occur with equal multiplicities, so the determinant of $f$ is $1$. Since the determinant of $f^2$ is $(-1)^n$, $n$ must be even. 
A: Suppose $f:\mathbb R^2\to\mathbb R^2$ is a linear map such that $f^2=-I$. If $\begin{pmatrix}a&b\\c&d\end{pmatrix}$ is the matrix of $f$ with respect to the standard basis, and then squaring we see that $$
\begin{pmatrix}
 a^2+b c & a b+b d \\
 a c+c d & b c+d^2 \\
\end{pmatrix}
=
\begin{pmatrix}
 -1 & 0 \\
 0 & -1 \\
\end{pmatrix}.
$$
To find an example, then, we need to solve the system of equations
$$
\left\{
\begin{aligned}
 a^2+b c &= -1 \\
 (a + d)b &= 0 \\
 (a + d) c &= 0 \\ 
 b c+d^2 &= -1 
\end{aligned}
\right.
$$
If $a+d\neq0$, the two middle equations show that $b=c=0$, and the first equation then says that $a^2=-1$, which is impossible. It follows that $d=-a$. Similarly, we cannot have $b=0$ because of the first equation, and we see that $c=(-1-a^2)/b$. The matrix of $f$ is then $$\begin{pmatrix}a&b\\-\frac{1+a^2}{b}&-a\end{pmatrix}$$ with $b\neq0$. We have obtained all $2$-dimensional examples in this way.
