Let ($V,\langle \cdot,\cdot \rangle)$ be a finite dimensional inner product space. Let $H:V\times V\to \mathbb{R}$ be a symmetric bilinear map and let $s:V\to V$ be the corresponding self adjoint operator. That is, $s(v)=H(v,\cdot)^\sharp$.
Let $\beta$ be a basis for $V$. Let $[s]_\beta$ and $\psi_\beta(H)$ be the matrix representations of $s$ and $H$ respectively. What is the relationship between these matrices?
Let $\beta = (b_1,\dotsc,b_n)$ be a basis of $V$, $(c_1, \dotsc, c_n)$ it's dual basis, $B(x) = \sum_{i} x_i b_i$ for $x\in\mathbb R^n$, and $$ M = B^{-1} \circ s \circ B. $$
Let $(e_1,\dotsc,e_n)$ denote the standard basis in $\mathbb R^n$, that is $e_k = (0, \dotsc, 0, 1, 0,\dotsc, 0)$.
If $\beta$ is orthonormal, then we have $c_k = \langle b_k, \cdot \rangle = e_k^T B^{-1}$ and \begin{align*} M_{i,j} = e_i^T (B^{-1} \circ s \circ B) e_j = \langle b_i, H(b_j, \cdot)^\sharp \rangle = H(b_j, b_i) = H(b_i, b_j). \end{align*}
Now, assume $\beta$ is not orthonormal. There exists a symmetric positive definite matrix $A$ such that $$ \langle Ax, A y \rangle = \langle B x, B y \rangle $$ holds every $x,y\in\mathbb R^n$. Then, $$\tilde\beta = ( \tilde b_k = BA^{-1} e_k \mid 1\le k \le n)$$ is an orthonormal basis for $V$ and we have \begin{align*} (AMA^{-1})_{i,j} &= e_i^T ((BA^{-1})^{-1} \circ s \circ B A^{-1}) e_j = H(BA^{-1} e_i, BA^{-1} e_j). \end{align*}