Length of Curve in $2D$ is $l_{\gamma}(\mathbb{R}^2)=\int_{0}^{1}\sqrt{(dr/dt)^2+r^2(d\theta/dt)^2}$
Length of a curve in $3D$ is $l_{\gamma}(\mathbb{R}^3)=\int_{0}^{1}\sqrt{(dr/dt)^2+r^2(d\phi/dt)^2+r^2\sin^2\phi(d\theta/dt)^2}$ so when the curve lie on $S^2$ the second expression becomes $$l_{\gamma}(S^2)=\int_{0}^{1}\sqrt{(d\phi/dt)^2+\sin^2\phi(d\theta/dt)^2}$$ I myself calculated that shortest distance between any two points must be straight line by analyzing the formula $l_{\gamma}(\mathbb{R}^2)$, could any one tell me how to analyze and find the shortest distance between any two points on $S^2$ by analyzing the formula $2D$ is $l_{\gamma}(\mathbb{R}^2)$ and $l_{\gamma}(S^2)$?
Take the great circle that contains the two points. By changing the coordinates, you can suppose that this great circle is the parallel (an great circle too) given by the equation $\phi$ varying and $\theta$ constant (the interval where $\phi$ vary and the constant depends on the parametrization, for example, we can suppose that $\phi\in (0,2\pi)$ and $\theta \in (-\frac{\pi}{2},\frac{\pi}{2}$), which implies that $\theta=0$). Then, for any curve joining these points, we have that \begin{eqnarray} l_\gamma (S^2) &=& \int_I\sqrt{\Big(\frac{d\phi}{dt}\Big)^2+\sin^2(\phi)\Big(\frac{d\theta}{dt}\Big)^2} \nonumber \\ &\geq& \int_I \Big|\frac{d\phi}{dt}\big| \nonumber \end{eqnarray}
From the last inequality, you can conclude.