Let's assume I have a $2$ dimensional vector space with inner product, and a basis where the inner product can be represented as $$ \begin{bmatrix}x &y\end{bmatrix} \begin{bmatrix}E &F\\F &G\end{bmatrix} \begin{bmatrix}x\\y\end{bmatrix}$$ In this basis, I express an orthonormal basis $\{e_1;e_2\}$as $\{(e_{1x},e_{1y});(e_{2x},e_{2y})\}$.
I have the "suspicion", and I could not find any counterexample, that the inverse of the matrix above can be written as $$ \begin{bmatrix} e_{1x}^2+e_{2x}^2 & e_{1x}e_{1y}+e_{2x}e_{2y}\\ e_{1x}e_{1y}+e_{2x}e_{2y} & e_{1y}^2+e_{2y}^2 \end{bmatrix} $$ for any orthonormal basis $\{e_1;e_2\}$.
I tried to set up the equalities that derive from orthogonality and normality of the various vectors and arrange them in a identity matrix, but I am stuck there and I can't find any way to extraxt an inverse of my $EFFG$ matrix. I feel there may be a straightforward way to prove this (or I am wrong upfront).
What could be a method to prove this? Also, how would this extend to $n>2$?
thanks
There might be a more clever way, but I've solved it with coordinates. Let's work with column vectors as a default, in $\mathbb R^n.$ Let $A$ be the matrix for the inner product in the canonical basis —in your example, $\begin{pmatrix} E & F \\ F & G \end{pmatrix}$—, and let $g$ be the inner product itself. So for any $u, v \in \mathbb R^n,$ $$g(u, v) = u^TAv.$$ If you have an ortonormal basis $B = \{ e_1, \dots, e_n \}$ and the change of basis from $B$ to the canonical basis is given by the matrix $$P = \begin{pmatrix}e_{11} & \cdots & e_{n1} \\ \vdots & \ddots & \vdots \\ e_{1n} & \cdots & e_{nn} \end{pmatrix},$$ then $$g(u, v) = u_B^T P^TAPv_B,$$ where $v_B$ is the vector $v$ written in the basis $B$. In particular, $$\delta_{ij} = g(e_i, e_j) = (P^TAP)_{ij},$$ so $P^TAP = I.$ Inverting, $P^{-1}A^{-1}(P^T)^{-1} = I,$ so $$A^{-1} = PP^T.$$ Finally, $$(A^{-1})_{ij} = (PP^t)_{ij} = \sum_{k=1}^ne_{ki}e_{kj},$$ which is the generalized version of your suspicion.