Let $Q(x,y,z) = 2(xy+xz+yz) - (x^2+y^2+z^2)$ be a quadratic form in $\mathbb R^3$ and let $\phi$ be its associated bilinear form. Let also $T:\mathbb R^3 \rightarrow \mathbb R^3$ be a linear operator such that $\langle T(e_i),e_j\rangle = \phi(e_i,e_j) $, where $\{e_1,e_2,e_3\}$ is the canonical basis of $\mathbb R^3$ and $\langle ., . \rangle$ is the canonical inner product of $\mathbb R^3$
Give an example of a basis $\gamma$ of $\mathbb R^3$ such that $[\phi]_\gamma$ is diagonal, but $[T]^\gamma_\gamma$ is not diagonal.
Notation: given a basis $\gamma = \{v_1,v_2,v_3\}$, the matrix $[\phi]_\gamma = [a_{ij}]$ denotes the matrix given by $a_{ij} = \phi(v_i,v_j)$ and $[T]^\gamma_\gamma = [b_{ij}]$ denotes the matrix given by $T(v_j) = \sum_i b_{ij}v_i.$
Let $\alpha = \{e_1,e_2,e_3\}$. Using the quadratic form $Q$, we find that $[\phi]_\alpha$ is given by
\begin{pmatrix} -1 & 1 & 1\\ 1 & -1 & 1 \\ 1 & 1 & -1 \end{pmatrix}
Writing $[T]_\alpha^\alpha = [a_{ij}]$, since $\alpha$ is an orthogonal basis, we find that
$$a_{ji} = \langle \sum_k a_{ki} e_k, e_j\rangle = \langle T(e_i), e_j \rangle = \phi(e_i, e_j).$$
Since $[\phi]_\alpha$ is symmetric, the above relation proves that $[T]_\alpha^\alpha = [\phi]_\alpha$.
If $P$ is any change of basis matrix from $\alpha $ to $\gamma$, then $P[\phi]_\alpha P^{-1} = [\phi]_\gamma$. But at the same time $P[T]_\alpha^\alpha P^{-1} = [T]_\gamma^\gamma$. How one can be diagonal and the other can not? Am I missing something?