So I recently began studying about Riemannian manifolds from Boothby's text on differential geometry and I've been banging my head over a certain issue. Let $M$ be a Riemannian manifold and $\Phi$ be the Riemannian metric. Then given a smooth immersion $p:(\alpha,\beta) \to M$, one can define the arc-length of this curve, say from a fixed point $p(a)$ to a varying point $p(t)$ as $$s = L(t) = \int_{a}^t\sqrt{\Phi(\frac{dp}{dt},\frac{dp}{dt})}dt$$
My doubt is in the following passage, which is from the text verbatim: "within a single coordinate neighbourhood $(U,\varphi)$, with coordinate frames $E_{1p},\dots,E_{np}$, we have $\Phi(E_{ip},E_{jp}) = g_{ij}(x)$, where $\varphi(p) = x = (x^1,\dots,x^n)$; and the curve is given by $\varphi(p(t)) = (x^1(t),\dots,x^n(t))$, so that $L(t)$ becomes $$s = L(t) = \int_{a}^t\left( \sum g_{ij}(x(t))\frac{dx^i}{dt}\frac{dx^j}{dt} \right)^{\frac{1}{2}}dt$$ This leads to the frequently used abbreviation $$ds^2 = \sum_{i,j = 1}^ng_{ij}(x)dx^idx^j$$ for the Riemannian metric[This formula can be later interpreted in terms of tensor products] "
I do not understand how you get the first expression for $L(t)$; I know multilinear algerba but I'm not able to "see" the last assertion.
The idea is following: You can always rewrite a curve $p:(\alpha,\beta)\rightarrow M$ with the parametrisation $F$, that gives back the given coordinate frame:
$$p=F\circ x$$
with $$x =F^{-1}\circ p$$By using the chain rule, you get
$$\frac{dp}{dt}=\langle (\operatorname{grad} F)\circ x,\frac{dx}{dt}\rangle=\sum_{j=1}^n\frac{dx^j}{dt}\frac{\partial F}{\partial x^j}\circ x=\sum_{j=1}^n\frac{dx^j}{dt}E_{jp}$$
Therefore
$$\Phi\Big(\frac{dp}{dt},\frac{dp}{dt}\Big)=\sum_{i=1}^n\sum_{j=1}^n\frac{dx^i}{dt}\frac{dx^j}{dt}\cdot \Phi \Big( E_{ip},E_{jp} \Big)=\sum_{i=1}^n\sum_{j=1}^n\frac{dx^i}{dt}\frac{dx^j}{dt}\cdot g_{ij}(x)$$
Now you just do it the other way around: You do not think about the parametrisation, but about the given components $x^j$ and a given riemannian metric $\Phi$, which gives you the expression
$$\Phi\Big(\frac{dp}{dt},\frac{dp}{dt}\Big)$$
by calculating
$$\sum_{i=1}^n\sum_{j=1}^n\frac{dx^i}{dt}\frac{dx^j}{dt}\cdot g_{ij}(x)$$