I am getting into general relativity, which of course means getting to grips with curvilinear coordinate systems. Repeatedly, the textbook and lectures have emphasized the relationships $$e_i=g_{ij}e^j\quad \text{and}\quad g_{ij}^{-1}=g^{ij}$$
In a problem set, I have been told that, given $$s(r, \theta, \phi) = r\begin{pmatrix} \sin \theta \cos \phi\\ \sin \theta \sin \phi\\ \cos \theta \end{pmatrix}$$ to find $e_r,e_\theta,e_\phi$ and then their dual, $e^r,e^\theta,e^\phi$.
I have correctly found $e_r,e_\theta,e_\phi$ using the definition in the text, $e_j=\frac{\partial s}{\partial q_j}$, and I have found the correct $g_{ij}=e_i\cdot e_j$, but when I use the above relation, I don't get the correct $e^r,e^\theta,e^\phi$, based on the orthonormality (I get neither orthogonal nor normality) requirement.
Why? As far as I can tell, I should be able to construct the dual basis from the original in this way, but somewhere in the lectures and text I have missed something.
EDIT: to be more explicit on what I have done.
$$e_r=\frac{\partial s}{\partial r}=\begin{pmatrix} \sin \theta \cos \phi\\ \sin \theta \sin \phi\\ \cos \theta \end{pmatrix}$$ $$e_\theta=\frac{\partial s}{\partial \theta}=r \begin{pmatrix} \cos\theta\cos\phi\\ \cos\theta\sin\phi\\ -\sin\theta \end{pmatrix}$$ $$e_\phi=\frac{\partial s}{\partial\phi}=r \begin{pmatrix} -\sin\theta\sin\phi\\ \sin \theta \cos \phi\\ 0 \end{pmatrix}$$ We note that these vectors are all orthogonal, and so the only nonzero components of the metric are the diagonal ones. $e_r\cdot e_r=1$, $e_\theta\cdot e_\theta=r^2$, and $e_\phi\cdot e_\phi=r^2\sin(\theta)$. This gives $$g_{ij}=\begin{pmatrix} 1 & 0 & 0 \\ 0 & r^2 & 0 \\ 0 & 0 & r^2\sin^2\theta \\ \end{pmatrix}$$ and we also easily have $$g^{ij}=\begin{pmatrix} 1 & 0 & 0 \\ 0 & 1/r^2 & 0 \\ 0 & 0 & 1/(r^2\sin^2\theta) \\ \end{pmatrix}$$
Finally, based on the first relation, we have that $$e^r=g^{ij}e_r=\begin{pmatrix} \sin \theta \cos \phi\\ \sin \theta \sin \phi/r^2\\ \cos \theta/r^2\sin^2\theta \end{pmatrix}$$ which already shows the problem. This is not orthonormal with the any of the original basis vectors. I have that the actual answer (constructed another way) is $e^r=e_r$, $e^\theta=e_\theta/r^2$, and $e^\phi=e_\phi/r^2\sin^2\theta$.