Wolfram Alpha:

```The Induced Metric
------------------

The formula for the induced metric for a 2-dimensional submanifold
of some ambient manifold with metric gμν (not necessarily flat)
in terms of embedding coordinates is:

γab(xμ(σ,τ)) = gμν(xμ(σ,τ))∂axμ(σ,τ)∂axν(σ,τ)

The induced metric demands that the distance measured between
points on the embedded submanifold is the same number whether
you use the ambient metric, or the induced metric.  It literally
takes the ambient metric and transforms it into the coordinates
of the submanifold.  This is also referred to as the PULLBACK of
the metric.

Proof:

The proof is predicated on the fact that an observer on the
submanifold must see the same scalar product as an observer
on the ambient manifold.  Therefore,

⟨(∂xm/∂yr)dyr,(∂xn/∂ysdys⟩ = ⟨dxm,dxn⟩

Where ⟨,⟩ denotes the inner product and r and s are specific
coordinates on the submanifold.

This becomes:

Σrs(∂xm/∂yr)(∂xn/∂ys)dyrdys = Σmndxmdxn

Which is equivalent to (in the case of 2 coordinates):

(∂x1/∂y1)(∂x1/∂y1)dy1dy1 + (∂x1/∂y2)(∂x1/∂y2)dy1dy2

+ (∂x2/∂y1)(∂x2/∂y2)dy1dy2 + (∂x2/∂y2)(∂x2/∂y2)dy2dy2

= (dx1)2 + 2dx1dx2 + (dx2)2

To balance the indeces we need to include, ηmn.  Thus,

Σrsηmn(∂xm/∂yr)(∂xn/∂ys)dyrdys = Σmnηmndxmdxn

Or, if the ambient is not flat we can write:

Σrsgmn(∂xm/∂yr)(∂xn/∂ys)dyrdys = Σmngmndxmdxn

Where gmn(∂xm/∂yr)(∂xn/∂y2) = γrs is the INDUCED METRIC that
yields:

ds2 = γrsdyrdys

Note:  The above proof is nothing more than the statement from
tensor calculus that,

Tmr(y) = (∂xn/∂ym)(∂xs/∂yr)Tns(x)

Example.  Compute the metric sphere of radius r induced by the
Euclidean (flat) metric on the ambient 3 dimensional space.

x = rsinθcosφ
y = rsinθsinφ
z = rcosθ

-   -
gμν = | 1 0 |
| 0 1 |
-   -

gθθ = (∂x/∂θ)2 + (∂y/∂θ)2 + (∂z/∂θ)2

= (rcosθcosφ)2 + (rcosθsinφ)2 + (-rsinθ)2

= r2(cos2θcos2φ + cos2θsin2φ + sin2θ

= r2

gφφ = (∂x/∂φ)2 + (∂y/∂φ)2 + (∂z/∂φ)2

= (-rsinθsinφ)2 + (rsinθcosφ)2 + (0)2

= r2(sin2θsin2φ + sin2θcos2φ)

= r2sin2θ

grr = (∂x/∂r)2 + (∂y/∂r)2 + (∂z/∂r)2

= (sinθcosφ)2 + (sinθsinφ)2 + (cosθ)2

= sin2θcos2φ + sin2θsin2φ + cos2θ

= sin2θ(cos2φ + sin2φ) + cos2θ

= 1

grθ = grφ = gθφ = 0```