$ V = \mathbb R^n$ is provided by the standard scalar product and by the standard basis $S$. $ W \subseteq V $ is a vector subspace and $ W^\bot$ is its orthogonal complement.
a) Prove that there exists only one function $ \phi: V \rightarrow V $ with $ \phi_{|W} = id_W $ and $ \phi_{|W^\bot} = -id_{W^\bot} $
b) Show that V has a orthonormal basis with the eigenvectors of $\phi$ and give $D_{BB}(\phi)$.
c) Show that $D_{BS}(\phi)$ and $D_{SS}(\phi)$ are orthogonal matrices.
So, we have $\{e_1,...,e_n\}$ as a orthonormal basis of $W$ and $\{v_1,...,v_m\}$ as an orthonormal basis of $ W^\bot$. I think the function must be something like $\phi: e_i \rightarrow e_i, v_j \rightarrow -v_j$ (i = 1 to n, j = 1 to m). Does this mean that $e_i$ and $v_j$ the eigenvectors of $\phi$?
This is all I can think about this question, any help would be appreciated for solving these questions.
Thanks!
Your observations are correct. Since $V = W \oplus W^{\perp}$, if you pick a basis for $W$ and a basis for $W^{\perp}$ then $\phi$ will be uniquely defined by its action on the bases. Indeed, the $e_i$ and $v_j$ are eigenvectors of $\phi$ corresponding to the eigenvalues $1$ and $-1$ respectively. If $\mathcal{B} = (e_1, \dots, e_n, v_1, \dots, v_m)$ then $\mathcal{B}$ is an orthonormal basis of $V$ and we have
$$ D_{\mathcal{B}\mathcal{B}}(\phi) = \operatorname{diag}(\underbrace{1,\dots,1}_{n \text{ times}}, \underbrace{-1,\dots,-1}_{m \text{ times}}).$$
In particular, $D_{\mathcal{B}\mathcal{B}}(\phi)$ is an orthogonal matrix. Finally, we have
$$ D_{\mathcal{B}\mathcal{S}}(\phi) = D_{\mathcal{B}\mathcal{S}}(\operatorname{id}) D_{\mathcal{B}\mathcal{B}}(\phi), \,\,\, D_{\mathcal{S}\mathcal{S}}(\phi) = D_{\mathcal{B}\mathcal{S}}(\operatorname{id}) D_{\mathcal{B}\mathcal{B}}(\phi) D_{\mathcal{S}\mathcal{B}}(\operatorname{id}) $$
and since $\mathcal{B}$ is an orthonormal basis, the change of bases matrices $D_{\mathcal{B}\mathcal{S}}(\operatorname{id}),D_{\mathcal{S}\mathcal{B}}(\operatorname{id})$ are orthonormal and so are $D_{\mathcal{B}\mathcal{S}}(\phi),D_{\mathcal{S}\mathcal{S}}(\phi)$ as products of orthonormal matrices.