Lets say we have a Euclidean configurations space $\mathbb E^n$ equipped with a smooth inner product $\langle \cdot ,\cdot \rangle$ with positive signature in the tangent space above each point. We have defined a Riemannian manifold.
We can also call this inner product a metric tensor $g$, such that if $g$ acts on two vectors then $g(v,w)$ where $v,w\in T_p\mathbb E^n$ (tangent space to a point $p$).
From general googling and piecing things together I am lead to write another expression for $g$, namely, \begin{equation} \boxed{ g(v,v)=g_{ij}\frac{dx^i}{dt}\frac{dx^j}{dt}} \end{equation} Where, \begin{equation} v=v^ie_i \end{equation} Is this something we can do? My reasoning is that $\|v\|=\sqrt{v\cdot v}=\sqrt{g(v,v)}$ from wikipedia and I have seen (page 5), \begin{equation} \|v\|=\sqrt{g_{ij}\frac{dx}{dt}\frac{dx}{dt}} \end{equation} Therefore is the boxed expression above correct? In addition I am assuming $v=\dot x$. If this is so then I assume that $v$ would have to be the representative of $x$ in $T_p\mathbb E^n$?
For physical application I am trying to understand how the following simple Lagrangian is constructed, \begin{equation} \mathscr L=\frac{1}{2}\sum _{ij}\text{g}_{ij}\dot q^i\dot q^j \end{equation}
I would just add that I am not very confident with tensorial notation, while I realise that on the surface this may look correct I feel I may be trading over important details?