How to solve for the velocities when calculating the conjugate momenta in special relativity? I try to get the momenta $$p_{\sigma} = \frac{\partial L}{\partial \dot{x}^{\sigma}}$$ from the free one particle Lagrangian $$L = -mc\sqrt{-\eta_{\mu\nu}\dot{x}^{\mu}\dot{x}^{\nu}}.$$ I got to the equation
$$p_{\sigma} = \frac{mc\dot{x}_{\sigma}}{\sqrt{-\eta_{\mu\nu}\dot{x}^{\mu}\dot{x}^{\nu}}}$$
but I don't know how to solve for the velocities $\dot{x}^{\sigma}$ so that I can put this into the definition of the Hamiltonian. I know the solution to this from a Wikipedia article, but the steps how to solve it are not given. Can somebody please show them to me?
 A: TL;DR: OP's $\dot{x} \leftrightarrow p$ relation is not directly invertible, i.e. the Legendre transformation is singular. This reflects an underlying world-line (WL) reparametrization symmetry
$$ \tau\quad\longrightarrow\quad\tau^{\prime}~=~f(\tau)  \tag{1}$$
of the action.
In more details:

*

*The action for a massive relativistic point particle is$^1$
$$\begin{align} 
S_0~=~&\int \! d\tau~ L_0,\cr
L_0~:=~& -m\sqrt{-\dot{x}^2}, \cr \dot{x}^2~:=~&g_{\mu\nu}(x)~ \dot{x}^{\mu}\dot{x}^{\nu}~<~0,\cr
\dot{x}^{\mu} ~:=~&\frac{dx^{\mu}}{d\tau},
\end{align}\tag{2}$$
where $\tau$ is the world-line (WL) parameter $\tau$ (which does not have to be the proper time).


*The components of the Lagrangian 4-momentum
$$ p_{\mu}~=~\frac{\partial L_0}{\partial \dot{x}^{\mu}}~\stackrel{(2)}{=}~\frac{m\dot{x}_{\mu}}{\sqrt{-\dot{x}^2}} \tag{3} $$
are not all independent since its length-square satisfies a primary constraint
$$ p^2~\stackrel{(3)}{=}~-m^2 ,\tag{4}$$
aka. the mass-shell condition.


*The bare Hamiltonian vanishes
$$ H_0~=~p_{\mu}\dot{x}^{\mu}-L_0~\stackrel{(2)+(3)}{=}~0,\tag{5}$$
cf. e.g. this related Phys.SE post.


*The total Hamiltonian becomes of the form "Lagrange multiplier times constraint"
$$H~=~ \frac{e}{2}(p^2+m^2),\tag{6} $$
cf. e.g. this related Phys.SE post.
--
$^1$ In this answer we work in units where the speed-of-light $c=1$ is one, and we use the Minkowski sign convention $(−,+,+,+)$.
