I'm working the following proposition.
Proposition. Let $T:V\to V$ be a linear operator on a finite-dimensional inner product space $(V,\langle\cdot,\cdot\rangle)$ and let $w$ be a unit vector in $V$. Define $U:V\to V$ by $$U(x)=T(x)-\langle x,w\rangle T(w).$$ If $T$ takes $w^\perp$ to $w^\perp$, then $$\mathrm{tr}(T|_{w^\perp})=\mathrm{tr}(U).$$
The source of this proposition does not say much about its notation, so let us assume for the moment that $w^\perp$ represents $\{w\}^\perp$, the orthogonal complement of the set $\{w\}$ relative to the given inner product. Another problem is about the statement that $T$ takes $w^\perp$ to $w^\perp$, which I suppose means that $T(w^\perp)=w^\perp$.
My attempt begins by selecting an ordered basis $\beta$ for $V$, because the trace of a linear operator $N$ is defined as the trace of its matrix in $\beta$, which we denote by $[N]_\beta$. Now I was wondering how I can approach $\mathrm{tr}(T|_{w^\perp})$. It looks like I have to interpret the restriction $T|_{w^\perp}$ as $T|_{w^\perp}:w^\perp\to w^\perp$ if I want its trace to be well defined. Then, how do I find an ordered basis for the subspace $w^\perp$ in order to evaluate the trace? What I know for the time being is that intuitively we can see $w^\perp$ as a plane perpendicular to $w$.
Thank you.
Edit. Sorry, I have to correct a misconception. If $T$ takes $w^\perp$ to $w^\perp$, then we had better interpret it as $T(w^\perp)\subseteq w^\perp$ because we didn't say "onto".
$U(cw)=T(cw)-\langle cw,w\rangle T(w)=0$ so $U$ is $0$ on $span \{w\}$. Also, note that $T|_{w^\perp}=U|_{w^\perp}$.
Hence, $\mathrm{tr}(T|_{w^\perp})=\mathrm{tr}(U|_{w^\perp})=\mathrm{tr}(U)$. The last equality follows from the fact that $V=span \{w\}\oplus w^{\perp}$.