Let $d\in\mathbb N$, $k_i\in\{1,\ldots,d\}$, $M_i$ be a $k_i$-dimensional embedded $C^1$-submanifold of $\mathbb R^d$ with boundary and $f_i:M_i\to\mathbb R$.
Assume $M_1\subseteq M_2$ and $f_1=\left.f_2\right|_{M_1}$. I've read that if $f_2$ is $C^1$-differentiable, then $f_1$ is $C^1$-differentiable and $${\rm D}f_1(x_1)=\left.{\rm D}f_2(x_1)\right|_{T_{x_1}\:M_1}\;\;\;\text{for all }x_1\in M_1\tag1.$$
I wondered how trivial this claim actually is. Am I missing something or doesn't $M_1\subseteq M_2$ immediately yield $$T_{x_1}\:M_1=T_{x_1}\:M_2\tag2$$ for all $x_1\in M_1$? What's confusing me is that if $(2)$ is actually true, the restriction on the right-hand side of $(1)$ is not actually a restriction (since by the very definition of the pushforward ${\rm D}f_2(x_1)$ of $f_2$ at $x_1$ this is a map defined on T_{x_1}:M_2$).
BTW, unless $M_1=\emptyset$, am I missing something or doesn't $M_1\subseteq M_2$ necessarily imply that we need to have $k_1=k_2$?
Throughout, let $i:M_1\to M_2$ be the inclusion map.
By definition, $f_1=f_2|_{M_1}=f_2\circ i$. Thus, if $i$ is differentiable, then we just have $Df_1(x_1)=Df_2(i(x_1))\circ Di(x_1)=Df_2|_{T_{x_1}M_1}$ by the chain rule. Since we assume $M_1$ and $M_2$ are embedded $C^1$-submanifolds, the fact that the embedding $i$ is differentiable is all but tautological.
As for $M_1\subseteq M_2$ implying $T_{x_1}M_1=T_{x_1}M_2$? No.
Try, for example, $M_2=S^2$ under the standard embedding in $\mathbb{R}^3$ and $M_1=S^1$ as a great circle in $S^2$. The 1-dimensional tangent space to $M_1$ is, then, clearly not equal to the 2-dimensional tangent space to $M_2$. What is true is that $T_{x_1}M_1=Di(x_1)(T_{x_1}M_1)\subseteq T_{x_1}M_2$.