In my GR lectures on the derivation of geodesic equations via extremal length, my lecturer wrote that the worldline action $S$ of a point particle with mass $m$ is given by $$S=-m\int\sqrt{-g_{\alpha\beta}\dot{x}^\alpha\dot x^\beta}d\tau,\tag{1}$$ where $$\dot x(\tau)=\frac{dx(\tau)}{d\tau}.\tag{2}$$
Where does this equation come from? I read from wikipedia that the worldline action of a relativistic point particle is $$S=-mc^2\int d\tau,\tag{3}$$ where $\tau$ is the proper time. Are theses two equations related in any way?