Given an ONB $B=(w_1,...,w_n)$ of $\mathbb{R}^n$ and the standard scalar product. Let $P$ be given such that $Pw_i=\mu_iw_i$, then $\text{diag}(\mu_1,...,\mu_n)=\text{Mat}_B(P)$.
Why do we have $\text{Mat}_B(P)=T^{-1}PT$ for $T=(w_1 ... w_n)$?
Given an ONB $B=(w_1,...,w_n)$ of $\mathbb{R}^n$ and the standard scalar product. Let $P$ be given such that $Pw_i=\mu_iw_i$, then $\text{diag}(\mu_1,...,\mu_n)=\text{Mat}_B(P)$.
Why do we have $\text{Mat}_B(P)=T^{-1}PT$ for $T=(w_1 ... w_n)$?
Just calculate it:
$$T e_{i,B} = w_i \Rightarrow e_{i,B} = T^{-1}w_i$$ All together: $$T^{-1}PT e_{i,B} = T^{-1}P w_i = \mu_i T^{-1}w_i = \mu_i e_{i,B}$$