Dual Spaces vs Dual Bases I'm trying to wrap my head around differentiable manifolds and tensors. I partially worked through a question which asked me to use the metric tensor and the line element in spherical polar coordinates to find orthogonal bases of vectors and covectors (dual to each other).
I found that the metric tensor, let's call it $g_{ij}$, has components of 0 everywhere except $g_{rr} = 1$, $g_{\theta \theta} = r^{2}$, and $g_{\phi \phi} = r^{2}\sin^{2}(\theta)$ in the case of the vectors. This is because (please do correct me if I'm wrong here) we're using $\frac{\partial}{\partial r}$, etc. as the base elements.
Then, we want to find the covectors. I've been told that these components are: $g^{rr} = 1$, $g^{\theta \theta} = r^{-2}$, and $g^{\phi \phi} = r^{-2}\csc^{2}(\theta)$ but I have no idea why. Could someone please explain this?
The second part of my question is, is there a relationship between the dual bases here, in the sense of the vectors and covectors being dual, and the well-known dual space, which I understand to be the associated space of linear functionals, or is it an unfortunate overlap of terminology?
 A: Let me answer first your second question (which is pure linear algebra) as I think it will clarify what goes on when you consider the second question (which is linear algebra applied at each point to the tangent space of a manifold). Given a real finite dimensional inner-product space $(V, g_{V})$, every vector $v \in V$ defines a linear functional $\varphi_v \colon V \rightarrow \mathbb{R}$ on $V$ by the equation $\varphi_v(w) = g_V(v,w)$. Thus, we obtain a natural map $T \colon V \rightarrow V^{*}$ from $V$ to the dual space $V^{*}$ given by $T(v) = \varphi_v$. This is a linear map and in fact, an isomorphism. That is, an inner product allows us to identify linear functionals on $V$ (or covectors, which is just a different name for linear functionals) with vectors in $V$.
Now, using $T$ we can transfer the inner product from $V$ to $V^{*}$. The inner product on $V^{*}$ is defined as $g_{V^{*}}(\varphi, \psi) := g_V( T^{-1}(\varphi), T^{-1}(\psi))$ and we can call $g_{V^{*}}$ the dual inner product of $g$ on $V^{*}$ or the induced inner product of $g$ on $V^{*}$. Using this definition, the map $T \colon (V, g_V) \rightarrow (V^{*}, g_{V^{*}})$ becomes an isometry of inner product spaces.
Given a basis $\mathcal{B} = (v_1, \ldots, v_n)$ for $V$, we can take the matrix $[g_V]_{\mathcal{B}}$ representing $g_V$ with respect to $\mathcal{B}$. It is typical to denote the entries of $[g_V]$ by $g_{ij}$ so $g_{ij} = g_V(v_i, v_j)$. We can also take the dual basis $\mathcal{B}^{*} = (v^1, \ldots, v^n)$ of $V^{*}$ corresponding to $\mathcal{B}$ and consider the matrix $[g_{V^{*}}]_{\mathcal{B}^{*}}$ representing $g_{V^{*}}$ with respect to the basis $\mathcal{B}^{*}$ of $V^{*}$. It is typical to denote the entries of $[g_{V^{*}}]_{\mathcal{B}^{*}}$ by $g^{ij}$. Now we can ask what is the relation between $g_{ij}$ and $g^{ij}$. A direct calculation shows that $g^{ij}$ is the inverse matrix of $g_{ij}$ (written as $g^{ik} g_{kj} = \delta^i_j$ using Einstein's summation convention) 
Now, let us go back to the first question. You found the matrix representing the metric tensor $g$ defined on $T_p M$ with respect to the basis $\left( \frac{\partial}{\partial r}, \frac{\partial}{\partial \theta}, \frac{\partial}{\partial \phi} \right)$. The dual basis of $\left( \frac{\partial}{\partial r}, \frac{\partial}{\partial \theta}, \frac{\partial}{\partial \phi} \right)$ is denoted by $(dr, d\theta, d\phi)$ and the matrix representing the induced inner product by $g$ on $(T_pM)^{*}$ with respect to the basis $(dr, d\theta, d\phi)$ will be the inverse matrix $g^{ij}$.
