Consider a (semi-)Riemannian manifold $(M,g)$ of dimension $m$, and a submanifold $(N,g|_N) \subset (M,g)$ of dimension $n$, such that the change of coordinates from $N$ to $M$ is given by the smooth map:
\begin{align*} \phi:N &\to M \\ (y^1,...,y^n) &\mapsto (\phi^1,...,\phi^n,...,\phi^m) \end{align*}
where $\{y^1,...,y^n\}$ is a local coordinatization of $N$.
If $\{x^1,...,x^m\}$ is a local coordinatization of $M$, define the line-element on M by:
$$ ds^2 := g_{\mu \nu} \ \mathrm{dx}^\mu \otimes \mathrm{dx}^\nu $$
I want to understand the following equality.
$$ \boxed{\phi^* (ds^2) = g_{\mu \nu} \ \mathrm{d\phi}^\mu \otimes \mathrm{d\phi}^\nu} $$
In particular, why is this true? An explanation in local coordinates would be helpful.
My understanding is that $\phi^* (ds^2) \equiv g|_N$.