Zariski tangent space of a point viewed as a point of a subvariety

Let $X \subset \mathbb{C}^n$ be an affine variety (not irreducible). Let $Y$ be a subvariety of $X$ (again not irreducible). How can we relate the Zariski tangent space at $P \in Y$ and at $P \in X$?

(Corrected after Mariano's comments) Based on my understanding, we do have a homomorphism $T_P Y \rightarrow T_P X$ of vector spaces, but can we say something more? For example, what can we say about the dimensions of the two vector spaces $T_PY$ and $T_PX$?

-
Do you mean "not irreducible" or "not necessarily irreducible"? –  Nils Matthes Jul 20 '13 at 19:36
@NilsMatthes: Yes, i mean "not necessarily irreducible" :) –  Manos Jul 20 '13 at 19:37
What homomorphism $T_pX\to T_pY$ do you have in mind? Notice that there are tons of such homomorphisms, simply because we could take the zero map, say, but presumably you have in mind a natural one. –  Mariano Suárez-Alvarez Jul 20 '13 at 19:39
@MarianoSuárez-Alvarez: Yes you are right, i mean the canonical one. –  Manos Jul 20 '13 at 19:41
Dear @Manos, But the isomorphism is, in general, non-canonical, as it involves the choice of a basis. So if you're looking for a canonical map, choosing an isomorphism between a finite dimensional vector space and its dual is probably not going to help you. –  Keenan Kidwell Jul 20 '13 at 21:10

The natural $\Bbb{C}$-linear map $$T_P(Y) \rightarrow T_P(X)$$ is indeed injective. This follows from the fact that it is dual to the $\Bbb{C}$-linear map $$\mathfrak{m}_{X,P}/\mathfrak{m}_{X,P}^2 \rightarrow \mathfrak{m}_{Y,P}/\mathfrak{m}_{Y,P}^2$$ which is surjective, since $Y$ is a subvariety of $X$. Hence one always has
$$\dim T_P(Y) \leq \dim T_P(X)$$
and this result cannot be improved; you can have strict inequality (e.g. $X=\Bbb{A}^1$, $Y=P$ for some point $P \in \Bbb{A}^1$) and you can have equality (e.g. $X=\Bbb{A}^2$, $Y=V(y^2-x^3)$ and $P=(0,0)$).
One more question please, to make sure i understand correctly the definitions: if all the gradients of the generators of the vanishing ideal of an affine variety $X$ of $\mathbb{C}^n$ are zero at a certain point $P$, then this means that the Zariski tangent space at this point is the entire $\mathbb{C}^n$. Right? –  Manos Jul 20 '13 at 23:25