Let $(Q,g)$ be a Riemannian manifold, let $\mathcal{L}(q,v)=\frac12 g_q(v,v)$ be a Lagrangian and consider the action $S=\int_a^b\mathcal{L}(q(t),\dot{q}(t))dt$. I want to show that any geodesic path gives a critical point of the action.
A path $q$ is a critical point of $S$ if for every variation $q_s$ we have $\frac{d}{ds} S(q_s)=0$. If $q$ is a geodesic then $g_{q(t)}(\dot{q}(t),\dot{q}(t))$ is constant. But I am not sure why this gives $\frac{d}{ds} S(q_s)=0$ for a variation.