Riemannian metric definition Let $(M, g)$ be a Riemannian manifold. If $(U, \varphi = (x^1, \ldots, x^n))$ is a chart of $M$, a local expression for $g$ can be given as follows: Let $\{ \frac{\partial}{\partial x^1},\ldots, \frac{\partial}{\partial x^n} \}$ be the coordinate vector fields, and let $\{dx^1 , \dots , dx^n \}$ be the dual $1$-forms. For $p \in U$ and $v \in T_p M$, we write $u = \sum_{i} u^i \frac{\partial}{\partial x^i}, v = \sum_{j} v^j \frac{\partial}{\partial x^j}.$
Then, by bilinearity, $g_p(u,v) = \sum_{i,j} u^iv^j g_p \left(\frac{\partial}{\partial x^i}, \frac{\partial}{\partial x^j} \right)= \sum_{i,j} u^iv^j g_{i,j}(p)$ where $g_{i,j}(p) = \left(\frac{\partial}{\partial x^i}, \frac{\partial}{\partial x^j} \right)$. We can therefore write $$g = \sum_{i,j}g_{i,j} dx^i \otimes dx^j.$$
I'm in trouble with trying to understand the given definition for a Riemannian metric. The trouble is the last equation, I cannot see where this is coming from. The definition for $g$ is that it's a smooth family of inner products on the tangent spaces of $M$, but somehow they conclude this form for $g$ from just defining $g_{i,j}$.
Could someone help me understand how this $g$ is being defined like so?
 A: Maybe this explanation will help. So the tagline of a Riemannian metric is "a smooth family of inner products on the tangent spaces". Let's try to formalize this statement then go from there.
Let $M$ be a smooth $n$-manifold. Then for each tangent space $T_pM$, we could define an inner product
$$
g_p:T_pM\times T_pM\to\mathbb{R}.
$$
So a family of inner products could be written as a set $\mathcal{G}$ defined as
$$
\mathcal{G}=\{g_p:T_p\times T_pM\to\mathbb{R}:p\in M\},
$$
i.e., for every tangent space we define an inner product. Now, to play nicely with the manifold structure, we would want this family to be "smooth in $p$". But what does this exactly mean? This is where the idea of a tensor field comes in. So let's restart our attempt at defining a Riemannian metric.
First, let's recall what a $(0,2)$-tensor field on a manifold is. We could define a $(0,2)$-tensor field as:

*

*A smooth map $T:M\to T^*M\otimes T^*M$.

*A smooth multilinear map $T:TM\times TM\to\mathbb{R}$.

This is a standard equivalence of definitions, see for example Lemma 12.24 (Tensor Characterization Lemma) in Lee's "Introduction to Smooth Manifolds". So, a $(0,2)$-tensor field on a manifold can be thought of as an assignment $p\mapsto T_p$, where we think of $T_p$ either as: an element of $T_p^*M\otimes T_p^*M$ or as a multilinear map $T_pM\times T_pM\to\mathbb{R}$.
Now, we could define a Riemmanian metric as follows (this is how we formalize that "smooth in $p$" from earlier). A Riemmanian metric is a $(0,2)$-tensor field on $g$ on $M$ such that $g_p$ is an inner product on $T_pM$ for every $p\in M$. So, a Riemmanian metric is a map $g:M\to T^*M\otimes T^*M$ such that $g_p$, thought of as a map $g_p:T_pM\times T_pM\to\mathbb{R}$, is an inner product for every $p\in M$.
So, how do we get the coordinate form? Well, let $(U,x^i)$ be a coordinate chart on $M$, then $T_pM$ has basis $\{\partial_{x^i}\vert_p\}$ and $T_p^*M$ has a basis $\{dx^i\vert_p\}$ dual to $\{\partial_{x^i}\vert_p\}$. Let $g$ be a Riemannian metric on $M$. Then, in these coordinates, we can write
$$
g=\sum_{i,j}g_{ij}dx^i\otimes dx^j
$$
where the $g_{ij}$ are smooth functions $g_{ij}:U\to\mathbb{R}$. This is just how we write any tensor field in coordinates. Now, to reconcile with earlier, the fact that $g$ is a Riemmanian metric means that
$$
g\vert_p=\sum_{i,j}g_{ij}(p)dx^i\vert_p\otimes dx^j\vert_p
$$
is an inner product. We just recall that, for $v,w\in T_pM$ (we write $v=\sum_kv^k\partial_{x^k}\vert_p$ and $w=\sum_mw^m\partial_{x^m}\vert_p$ in coordinates) we may compute $g_p(v,w)$ as follows:
\begin{align*}
g_p(v,w)&=\left(\sum_{i,j}g_{ij}(p)dx^i\vert_p\otimes dx^j\vert_p\right)(v,w) \\
&=\sum_{i,j}g_{ij}(p)dx^i\vert_p\left(\sum_kv^k\partial_{x^k}\vert_p\right)dx^j\vert_p\left(\sum_mw^m\partial_{x^m}\vert_p\right) \\
&=\sum_{i,j,m,k}g_{ij}(p)v^kdx^i\vert_p(\partial_{x^k}\vert_p)w^mdx^j\vert_p(\partial_{x^m}\vert_p) \\
&=\sum_{i,j,m,k}g_{ij}(p)v^k\delta^i_kw^m\delta^j_m \\
&=\sum_{i,j}g_{ij}(p)v^iw^j.
\end{align*}
So this is how we actually compute the inner product $g_p:T_pM\times T_pM\to\mathbb{R}$ acting on vectors $v,w\in T_pM$. One thing I'd like to note is that the symmetry condition of the inner product definition actually implies $g_{ij}(p)=g_{ji}(p)$ (hence $g_{ij}$ and  $g_{ji}$ are the same smooth function defined on $U$).
