I was recently doing an exercise and in the exercise I was given the map $\phi: \mathbb{R}^4 \rightarrow \mathbb{R}^2$ defined by $\phi(x,y,s,t) = (x^2 + y, x^2 + y^2 + s^2 + t^2 + y)$. Let $S = \phi^{-1}(0,1)$. I wanted to show that $S$ was a submanifold of $\mathbb{R}^4$ and so I needed to show that the differential $d\phi$ was surjective at every point $(x,y,s,t) \in S$. What I did was calculate its differential as
$$ d\phi = \begin{pmatrix} 2x & 1 & 0 & 0 \\ 2x & 2y + 1 & 2s & 2t \end{pmatrix} $$
Now, let's consider the map $\phi: S \rightarrow \mathbb{R}^2$. Then $\phi(x,y,s,t) = (0,1)$ on $S$. So if I naively calculate the differential here, I get the differential is the zero matrix, which obviously does not agree with my previous calculation. I kind of figure that this is because when originally calculating the differential, $(x,y,s,t)$ ranged over all of $\mathbb{R}^4$, but for the map $\phi: S \rightarrow \mathbb{R}^2$, the points $(x,y,s,t)$ are restricted to only points on $S$. However, shouldn't $d\phi = d(\phi|_S)$ because calculating the differential shouldn't depend on the path taken by the points $(x,y,s,t)$, and so even when restricting my points to $S$, I should get $d\phi = d(\phi|_S)$?
I hope my question is clear.
EDIT: I can see that a matrix representation of the differential is the Jacobian of $\phi|_S$ in local coordinates. Since these local coordinates obviously cannot be standard coordinates on $\mathbb{R}^4$, I can't just differentiate $\phi$ then restrict the derivative to $S$. I believe this answers my own question, but I will leave this open for further discussion in the case that the more knowledgeable posters would like to contribute.
As you (almost) already said, $\phi$ is constant on $S$, so $(d\phi)\big |_S = d\big(\phi\big |_S\big) = 0$. The issue addressed by the Implicit Function Theorem is that $\phi$ needs to define $S$ by the appropriate number of independent conditions, and that is that $d\phi$ be surjective at points of $S$. This surjectivity will come from directions complementary (or orthogonal) to the tangent plane of $S$.