Tangent space of an immersed submanifold If $M$ is a smooth manifold and $S$ is an embedded submanifold, then for any point $p \in S$, the tangent space $T_p(S)$ is characterized as $T_p(S) = \{v \in T_p(M) \colon v(f) = 0, f \in C^{\infty}(M)\}$, where $f$ restricted to $S$ is just the $0$ fuction and $T_p{M}$ is the tangent space to $M$ at $p$.
Now, this characterization of the tangent space isn't true for immersed subamnifolds of $M$ and I'm looking for a counter example. I was thinking about taking $M = \mathbb{R}^2$ and $S$ to be the Figure-8 space and $p$ to be the point $(0,0)$, but I'm not sure how to compute the tangent space at that point.
 A: Your idea to use the figure-eight immersed submanifold is OK. To compute $T_{(0,0)}S$ as a subspace of $T_{(0,0)}M$ recall that $T_{(0,0)}S$ is generated by $\frac{\partial}{\partial t} \Bigr|_{(0,0)}$ and mapping it by $di_{\big|(0,0)}$ we get that:
$$di_{\big|(0,0)}\left(\frac{\partial}{\partial t} \Bigr|_{(0,0)}\right) = 2\cos(0)\frac{\partial}{\partial x} \Bigr|_{(0,0)} + \cos(0)\frac{\partial}{\partial y} \Bigr|_{(0,0)} = 2\frac{\partial}{\partial x} \Bigr|_{(0,0)} + \frac{\partial}{\partial y} \Bigr|_{(0,0)} $$
And so $T_{(0,0)}S = \text{span}\left\{2\frac{\partial}{\partial x} \Bigr|_{(0,0)} + \frac{\partial}{\partial y} \Bigr|_{(0,0)}\right\}$
The trick now is to find a curve, which is smooth in $M$, lies inside $S$ but not smooth in $S$. Such curve is taking the curve in the opposite direction. So if $\gamma(t) = (\sin 2t, \sin t)$ parametrizes the submanifold, take $\gamma_1(t) = (\sin 2t, -\sin t)$
Now take any $f \in C^{\infty}(M)$ s.t. $f$ is $0$ on $S$. So we have $0 = f \circ \gamma_1(t) = f(\sin 2t,-\sin t) \in C^{\infty}(\mathbb{R})$. Take the derivative at $t=0$ to get:
$$0 = f_x(0,0) \cdot \frac{d(\sin 2t)}{dt}(0) + f_y(0,0) \cdot \frac{d(-\sin t)}{dt}(0) = \left(2\frac{\partial}{\partial x} \Bigr|_{(0,0)} - \frac{\partial}{\partial y} \Bigr|_{(0,0)}\right)f$$
So if the characterization was right then $v = 2\frac{\partial}{\partial x} \Bigr|_{(0,0)} - \frac{\partial}{\partial y} \Bigr|_{(0,0)} \in T_{(0,0)}S$, which is obviously wrong, as it's not in the span of $2\frac{\partial}{\partial x} \Bigr|_{(0,0)} + \frac{\partial}{\partial y} \Bigr|_{(0,0)}$. Hence we derive a contradiction.
