# Metric (distance Function)

1. Jul 29, 2006

### SeReNiTy

Hi i only know the distance function in euclidean space as the standard definition involving the sqrt of the dot product of the vector connecting two points.

What is the metric (distance function) in S1 or S2 which is the 1 sphere and 2sphere respectively.

2. Jul 29, 2006

### jbusc

The round metric for the unit 1-sphere is (using radians), $\mathbf{g} = d\theta^2$, and for the unit 2-sphere, $\mathbf{g} = \sin^2\theta\,d\phi^2 + d\theta^2$, I think, working off of memory. It should be simple to add in the r term for arbitrary euclidean 1 and 2-spheres

In general, if J is the jacobian matrix of the manifold:
$\mathbf{g} = J^T J$

3. Aug 2, 2006

### HallsofIvy

That's right. The 1-sphere (unit circle for us pedestrians) has parametric equations $x= cos(\theta)$, $y= sin(\theta)$ so that $dx= -sin(\theta)d\theta$ and $dy= cos(\theta)$ so that $ds^2= dx^2+ dy^2= (sin^2(\theta)+ cos^2(\theta))d\theta^2= d\theta^2$.

For the 2-sphere (the surface of the unit sphere), we can take $x= cos(\theta)sin(\phi)$, $y= sin(\theta)sin(\phi)$, $z= cos(\phi)$ (spherical coordinates with $\rho= 1$). Then $dx= -sin(\theta)sin(\phi)+ cos(\theta)cos(\phi)$, $dy= cos(\theta)sin(\phi)+ sin(\theta)cos(\phi)$, and $dz= -sin(\phi)d\phi$.

$$dx^2= sin^2(\theta)sin^2(\phi)d\theta^2- 2sin(\theta)cos(\theta)sin(\phi)cos(\phi)d\theta d\phi+ cos^2(\theta)cos^2(\phi)d\phi^2$$