I learned a special case of the spectral theorem for finite dimensional inner product space. As I understand it states that a real matrix is orthogonally diagonalizable with real eigenvalues iff it equal its hermitian adjoint. However when I try to apply it to diagonal matrices, I think I have a problem. If I work with the regular inner product ($\langle u,v\rangle \to u^tv)$ then I see how this works out ($A^* = A^t = A$), but if I work in a more general inner product space: $\langle u,v\rangle = (Bu)^t(Bv)$ where $B$ is an invertiable matrix, then the hermitian adjoint of a matrix $A$ becomes $A^* = (B^tB)^{-1}A^t(B^tB)$, and this may not commute with $A$, if $A$ is some general diagonal matrix, for example let's define $A = \begin{pmatrix}1 & 0\\0 & -1\end{pmatrix}, B = \begin{pmatrix}1 & 1\\0 & 1\end{pmatrix}$. However we still have that for the identity matrix: $I^* = I$ so a diagonal matrix, is still orthogonally diagonalizable. How this doesn't contradict the spectral theorem?
Spectral theorem for diagonal matrix in different inner product spaces
linear algebraorthogonalityspectral-theory
Related Solutions
Note: over a finite-(nonzero)-dimensional complex vector space, every linear transformation has at least one eigenvalue, since the characteristic polynomial splits. It follows by induction that it is upper trianguarizable. But not every linear transformation, even over $\mathbb{C}$, is diagonalizable. Typically, consider the Jordan block $$ T=\pmatrix{0&1\\0&0}. $$
Key point: for a self-adjoint transformation, every eigenvalue is actually real. Indeed, if $T^*=T$ and if $Tx=\lambda x$ with $x\neq 0$, then $$ \lambda (x,x)=(x,\lambda x)=(x,Tx)=(Tx,x)=(\lambda x,x)=\overline{\lambda}(x,x)\quad\Rightarrow\quad \lambda=\overline{\lambda} $$ where I took an inner-product antilinear in the first variable.
Conclusion: it suffices to prove the result for matrices, up to taking the matrix $A$ of $T$ in an orthonormal basis. Since the characteristic polynomial of $A$ splits over $\mathbb{C}$ and since every root is real, it splits over $\mathbb{R}$. And the characteristic polynomial of $A$ is the same, whether you look at it as an element of $M_n(\mathbb{R})$, or as an element of $M_n(\mathbb{C})$. So the charateristic polynomial of $T$ splits over $\mathbb{R}$. And in general, for a linear transformation $T$ over a finite-dimensional $K$-vector space, every root $\lambda$ in $K$ of the characteristic polynomial in $K[X]$ is an eigenvalue of $T$. And conversely. Since both are equivalent to $T-\lambda \mbox{Id}$ not being invertible. Via the determinant for the root side. And via the rank-nullity theorem on the eigenvalue side.
Another way to reach the conclusion: now take $A$ the matrix of $T$ in an orthonormal basis. Then $T$ is self-adjoint if and only if $A^*=A$ is Hermitian (equal to its transconjugate). Over $\mathbb{R}$, this is just $A^T=A$ (i.e. $A$ symmetric, equal to its transpose). But we can see $A$, even if it is in $M_n(\mathbb{R})$, as an element of $M_n(\mathbb{C})$. So it has at least an an eigenpair $(\lambda,x)$ in $\mathbb{C}\times \mathbb{C}^n$. But as we have just shown, $\lambda $ must be real. Therefore, writing $x=y+iz$ where $y$ and $z$ are the real and imaginary parts of $x\in\mathbb{C}^n$ in $\mathbb{R}^n$, we get $$ Ay+iAz=A(y+iz)=Ax=\lambda x=\lambda (y+iz)=\lambda y+i\lambda z\quad \Rightarrow \quad Ay=\lambda y\quad Az=\lambda z. $$ Si $x\neq 0$, one of $y,z$ must be nonzero, giving a real eigenpair for $A$. Whence for $T$ going back from the matrix to the operator.
A skew symmetric matrix (over any field) is a matrix that satisfies $A^\top=-A$. (If the field has characteristic two, some people also require that $A$ has a zero diagonal.) A complex matrix $A$ that satisfies $A^\ast=-A$ is known not as a skew-symmetric matrix, but as a skew-Hermitian matrix.
The eigenvalues of a skew-Hermitian matrix do not necessarily occur in pairs. E.g. in the scalar (i.e. $1\times1$) case, $i$ is skew-Hermitian and it is the only eigenvalue of itself. For higher dimensions, consider $\operatorname{diag}(i,2i,\ldots,ni)$ for instance.
Best Answer
Sorry for the confusion. Here is the real answer.
The true statement of the spectral theorem is that
notice that having an orthonormal basis is way different than saying $A=QDQ^*$ where $D$ is real diagonal and $Q$ is orthogonal.
Instead, it means that $A=MDM^{-1}$ where the columns of $M$ are orthonormal, i.e. $<m_i,m_j>=\delta_{i,j}$.
In fact, the columns of the identity matrix $I$ do not form a orthonormal basis since $IB^TBI \ne I$ , or also said $<e_i,e_j> = (B^TB)_{i,j}\ne \delta_{i,j}$.
Hope that this makes it clear for you.