Finding the metric tensor in new coordinate system after changing coordinates I'm reading up about spherical coordinate system (Core Concepts of Special and General Relativity by Luscombe). The infinitesimal displacement vector in spherical coordinates is:
$$d\mathbf{r}=\frac{\partial\mathbf{r}}{\partial r}dr + \frac{\partial\mathbf{r}}{\partial \theta}d\theta + \frac{\partial\mathbf{r}}{\partial \phi}d\phi$$
$\mathbf{r}$ is the point in the ambient $\mathbb{R}^3$ manifold whose components are coordinate functions $x=x(r,\theta,\phi)$, $y=y(r,\theta,\phi)$ and $z=z(r,\theta,\phi)$, which are respectively $r\sin\theta\cos\phi$, $r\sin\theta\sin\phi$ and $r\cos\theta$, i.e., $\mathbf{r}=r\sin\theta\cos\phi\ \mathbf{\hat x} + r\sin\theta\sin\phi\ \mathbf{\hat y}+r\cos\theta\ \mathbf{\hat z}$. The vectors $\mathbf{e}_r=\frac{\partial\mathbf{r}}{\partial r},\mathbf{e}_{\theta}=\frac{\partial\mathbf{r}}{\partial \theta},\mathbf{e}_{\phi}=\frac{\partial\mathbf{r}}{\partial \phi}$ are the local basis vectors  at the point where these derivatives are evaluated.
My question is, how do we find out the metric w.r.t. these coordinates (i.e. in terms of $r,\theta,\phi$)? This translates to: how do we find the inner product between $\mathbf{e}_r,\mathbf{e}_{\theta},\mathbf{e}_{\phi}$? Do we represent these basis vectors in the Cartesian representation, i.e., in terms of $\mathbf{\hat x},\mathbf{\hat y},\mathbf{\hat z}$ and then represent dot products between $\mathbf{e}_r,\mathbf{e}_{\theta},\mathbf{e}_{\phi}$ in terms of dot products between $\mathbf{\hat x},\mathbf{\hat y},\mathbf{\hat z}$, which in turn I can calculate only if I've specified the metric in the ambient $\mathbb{R}^3$ manifold (e.g. Euclidean metric)?
Does this sound right or am I missing anything? Without specifying a metric for the manifold, I have no idea how we can specify a metric in spherical coordinates.
 A: Yes, you have to specify what the metric tensor field on the manifold $M= \Bbb{R}^3$ is even before talking about dot-products/inner-products. Why? Because a metric tensor field is literally by definition an assignment of an inner product on the tangent space to each point of the manifold (in a "smooth" way). So, if you don't specify a metric tensor field a-priori, asking "what is the inner product of $\mathbf{e}_r$ with itself" or "what is the inner product of $\mathbf{e}_x$ with itself" is a completely meaningless question.
On $\Bbb{R}^3$, we often work with the so-called "standard"/Euclidean metric, which in the identity chart $(\Bbb{R}^3, \text{id}_{\Bbb{R}^3})$, where we label the coordinate functions as $\text{id}_{\Bbb{R}^3}(\cdot) = (x(\cdot), y(\cdot), z(\cdot))$ (i.e in Cartesian coordinates), we define
\begin{align}
g:= dx \otimes dx + dy \otimes dy + dz \otimes dz
\end{align}
Or if we define the "symmetrized" tensor product $\omega \eta := \dfrac{1}{2}(\omega \otimes \eta + \eta \otimes \omega)$, we can write the above definition as
\begin{align}
g= dx^2 + dy^2 + dz^2
\end{align}

So if you want to calculate what the metric tensor looks like in another coordinate system, there are two ways of doing so (but really they amount to the "same" thing). The first is as you suggested, write out the tangent vectors $\mathbf{e}_r, \mathbf{e}_{\theta}, \mathbf{e}_{\phi}$ in terms of $\mathbf{e}_x, \mathbf{e}_y, \mathbf{e}_z$, then use bilinearity of $g$. For example, if you carry out the partial differentiation properly, you'll find that
\begin{align}
\mathbf{e}_{\theta} &= r \cos \theta \cos \phi \, \mathbf{e}_x + r \cos \theta \sin\phi \, \mathbf{e}_y - r \sin \theta\, \mathbf{e}_z
\end{align}
So, using bilinearity, and the fact that $g(\mathbf{e}_x, \mathbf{e}_x) = g(\mathbf{e}_y, \mathbf{e}_y) = g(\mathbf{e}_z, \mathbf{e}_z) = 1$ (and all other inner products are zero), we find that
\begin{align}
g(\mathbf{e}_{\theta}, \mathbf{e}_{\theta}) &= (r \cos \theta \cos \phi)^2 + (r \cos \theta \sin \phi)^2 + (-r \sin \theta)^2 = r^2
\end{align}
If you work them out carefully, you'll find that $g(\mathbf{e}_r, \mathbf{e}_r) = 1, g(\mathbf{e}_{\phi}, \mathbf{e}_{\phi}) = r^2 \sin^2 \theta$, and all other inner products are zero. By the way, one trick to observe is that because by construction $g$ is a symmetric tensor (i.e for every tangent vector $\xi,\eta$, we have $g(\xi,\eta) = g(\eta, \xi)$), rather than computing a total of $9$ inner products, you only have to compute $6$ of them, namely:
\begin{align}
g(\mathbf{e}_r, \mathbf{e}_r),g(\mathbf{e}_r, \mathbf{e}_{\theta}),g(\mathbf{e}_r, \mathbf{e}_{\phi})g(\mathbf{e}_{\theta}, \mathbf{e}_{\theta})g(\mathbf{e}_{\theta}, \mathbf{e}_{\phi}),g(\mathbf{e}_{\phi}, \mathbf{e}_{\phi})
\end{align}
Once you calculate all of these coefficients, you can store them in a matrix if you wish:
\begin{align}
[g]_{\text{spherical}} &=
\begin{pmatrix}
1 & 0 & 0 \\
0 & r^2 & 0 \\
0 & 0 & r^2\sin^2 \theta
\end{pmatrix}
\end{align}
(This is the matrix representation of the $(0,2)$-tensor field $g$ with respect to the ordered basis $\{\mathbf{e}_r, \mathbf{e}_{\theta}, \mathbf{e}_{\phi}\}$ of the tangent space of $M = \Bbb{R}^3$, at each point). Or if you wish, you can write this out as a tensor equation as:
\begin{align}
g &= dr \otimes dr + r^2 d \theta \otimes d \theta + r^2 \sin^2 \theta \ d \phi \otimes d\phi,
\end{align}
or using the symmetrized product, we get the memorable equation:
\begin{align}
g &= dr^2+ r^2\, d \theta^2+ r^2 \sin^2 \theta\, d\phi^2
\end{align}

Another way to carry out this computation is to start from the equations defining spherical coordinates $x = r \sin \theta \cos \phi$ etc and then write $dx,dy,dz$ in terms of $dr, d\theta, d \phi$, and then plug that into $g = dx^2 + dy^2 + dz^2$. Some people find the previous approach quicker, some find this approach quicker. It's really up to you which one you like better. At the end of the calculation, you'll of course find the same result that $g = dr^2+ r^2\, d \theta^2+ r^2 \sin^2 \theta\, d\phi^2$.
As an illustration of this method, let me carry it out in the simpler case of $\Bbb{R}^2$, but in a perhaps not-so-familiar coordinate system. Here, we work in the parabolic coordinate system, $\sigma, \tau$, defined by the equations (using Wikipedia's conventions):
\begin{align}
x&= \sigma \tau \quad \text{and} \quad y = \dfrac{1}{2}(\tau^2 - \sigma^2)
\end{align}
(where $x,y$ are the Cartesian coordinates on $\Bbb{R}^2$). Again, we start by defining the "standard"/Euclidean metric tensor field $g = dx\otimes dx + dy \otimes dy$. Now, it's easy to calculate that
\begin{align}
\begin{cases}
dx &= \tau\, d \sigma + \sigma \, d \tau\\
dy &= -\sigma \, d \sigma + \tau \, d \tau
\end{cases}
\end{align}
So, we just plug everything in, and we get:
\begin{align}
g&= dx\otimes dx + dy \otimes dy \\
&= (\tau\, d \sigma + \sigma \, d \tau) \otimes (\tau\, d \sigma + \sigma \, d \tau) + (-\sigma \, d \sigma + \tau \, d \tau) \otimes (-\sigma \, d \sigma + \tau \, d \tau) \\
&= (\sigma^2 + \tau^2)(d\sigma \otimes d \sigma + d \tau \otimes d \tau) \\
&=(\sigma^2 + \tau^2)(d\sigma^2 + d \tau^2),
\end{align}
where in the last line I once again used the symmetrized product. Or if you wish to write this as a matrix (with respect to the ordered basis $\{\mathbf{e}_{\sigma}, \mathbf{e}_{\tau}\}$ of each tangent space), we see that it is
\begin{align}
[g]_{\text{parabolic}} &=
\begin{pmatrix}
\sigma^2 + \tau^2 & 0 \\
0 & \sigma^2 + \tau^2
\end{pmatrix}
= (\sigma^2 + \tau^2) I_{2 \times 2}.
\end{align}
In particular, this shows that the tangent vectors of the parabolic coordinate system are orthogonal with respect to $g$, but not normalized; the norm of the vectors $\mathbf{e}_{\sigma}$ and $\mathbf{e}_{\tau}$ is $\sqrt{\sigma^2 + \tau^2}$.
