Spectral theorem, inner products and adjoints/transposes: what's the relation? I only consider operators on finite-dimensional vector spaces.
I'll write down my question and explain my motivation afterwards:

The spectral theorem relates diagonalizability, which is a purely algebraic notion, with adjoints, which requires inner products. Why is that so? Is there a non-complex/real version of the spectral theorem?


Consider the following version of the Spectral Theorem:

Spectral Theorem: Every self-adjoint operator on a finite-dimensional (complex) inner product space admits a basis consisting of eigenvectors ("eigenbasis")

I am teaching Linear Algebra for the first time, so I am revisiting lots of concepts I studied several years ago, and just got to the Spectral Theorem. So this is a little funny, since "diagonalizability"/existence of an eigenbasis does not relate directly to inner products in any obvious manner.
Yes, I understand the point that self-adjointness of an operator $A$ takes in the proof: Every $A$-invariant subspace has an $A$-invariant complement. A similar statement holds for normal operators and eigenspaces.
But the point seems to be that it just so happens that a condition related to inner product implies in a condition related to invariant subspaces, and it is not clear to me why that is so from a non-purely formal perspective.
So that got me thinking: How would one be able to get a spectral theorem for non-complex/real spaces? The more I think the more I convince myself the condition needs to deal with some sort of transpose. But the problem is that transposes do not make much sense in general, and this is also another point: Inner products seem to just-so-happen allow us to define adjoints/transposes of operators.
The point seems to be that, in general, transposes "live" on dual spaces, whereas Riesz representation allows us to go back to the level of the original spaces.
So I would imagine the abstract version of the Spectral Theorem (if there is one) would need a condition relating an operator $T\colon V\to V$ and its formal transpose $T'\colon V'\to V'$, perhaps passing to the bidual if necessary (as this is naturally isomorphic to the ground space), but I can't find any possible formula involving both $T$ and $T'$.
 A: There are a few ways one could go with this question, but I will focus on the following.

Is there a satisfying explanation how the "geometric" property of a transformation (being self-adjoint or normal) ensures the "algebraic" property that each invariant subspace has an invariant complement?

First, let's consider normality and the complex version of the spectral theorem.
Let $\langle \cdot, \cdot \rangle$ denote our inner product. The statement that $A:V \to V$ is normal means that $A^*A = AA^*$. As it turns out, this is equivalent to the statement that for all $x \in V$, we have
$$
\|Ax\|^2 = \langle Ax, Ax \rangle = \langle A^*x, A^*x \rangle = \|A^*x\|^2.
$$
If you haven't seen this characterization before, you might find coming up with a proof to be an engaging exercise. This property ensures that $(A - \lambda I)$ and $(A - \lambda I)^*$ have the same kernel. After all, it is easy to see that $(A - \lambda I)$ is normal, and it follows that $\|(A - \lambda I)x\| = 0 \iff \|(A - \lambda I)^*x\| = 0$.
With that established, we can see the algebraic property as follows. We note that every non-zero $A$-invariant subspace contains an eigenspace associated with some eigenvalue $\lambda$; that is, the (subspaces of) eigenspaces are the minimal invariant subspaces. We see that each eigenspace has an invariant complement since
$$
\ker(A - \lambda I) = \ker([A - \lambda I]^*) = \operatorname{im}(A - \lambda I)^\perp.
$$
Note that $\operatorname{im}(T)^0 = \ker(T^*)$ usually relates invariant subspaces of a transformation to the invariant subspaces of its dual. However, the normality condition (defined relative to an inner product) means that we now have a relation between two invariant subspaces of $T$.
Because eigenspaces have invariant complements, it follows that all invariant subspace have invariant complements. First of all, note that all subspaces of an eigenspace are invariant, which means that subspaces of eigenspaces will also have invariant complements (since we can combine the complement of the subspace within the eigenspace with the complement to the eigenspace as a whole).
From there, note if $U,W$ are subspaces with respective complements $P,Q$, then $U + W$ will have complement $P \cap Q$.
With the complex version of the spectral theorem addressed, the condition of being self-adjoint can be characterized as "normal with real eigenvalues", which lets us arrive at the same result for the same invariant subspace properties in the real version of the spectral theorem.
