Tangent space of a point of an affine variety Let $k$ be a field.
Let $f_1,\dots f_r$ be polynomials in $k[x_1,\dots,x_n]$.
Let $V$ be an affine variety in $k^n$ defined by $f_1,\dots f_r$, i.e. $V = \{p \in k^n| f_i(p) = 0$ for all $i\}$.
Let $p = (a_1,\dots,a_n)$ be a point of $V$.
Let $L_i$ be the hyperplane defined by $\sum_k \frac{\partial f_i}{\partial x_k}(p)(x_k- a_k) = 0$.
Let $T_p = \bigcap_i L_i$.
Let $g_1,\dots g_s$ be polynomials in $k[x_1,\dots,x_n]$.
Suppose $V = \{p \in k^n| g_i(p) = 0$ for all $i\}$.
Let $L_i'$ be the hyperplane defined by $\sum_k \frac{\partial g_i}{\partial x_k}(p)(x_k - a_k) = 0$.
Let $T_p' = \bigcap_i L_i'$.
Is $T_p = T_p'$? If this is not the case, what if $k$ is algebraically closed?

This is a  nice  question which permits to  illustrate the superiority of schemes over classical varieties.  
Every ideal $I\subset k[x_1,...,x_n]$ yields a subscheme $V(I)\subset \mathbb A^n_k$ and this yields is a perfect  bijective correspondence between ideals of  $k[x_1,...,x_n]$ and closed subschemes of $\mathbb A^n_k$.
Consider for example the ideals $I=(x,y),J=(y,x^2), K= (x^2,y^2) \subset k[x,y]$.
They correspond to three schemes $V(I), V(J), V(K)\subset \mathbb A^2_k$ which are different although their underlying set is the same singleton set $\lbrace  (0,0) \rbrace$.
The best proof  that they are different is that their tangent spaces at their single point are the different subvectorspaces of $k^2$ equal respectively to zero, the $x$-axis $y=0$ and the whole  space $k^2$.  
Classically one would be baffled because one would have to say that $I,J,K$ define the same subvariety of $\mathbb A^2_k$ but that the ideals $J$ and $K$ don't allow to define the tangent space.
The way out would have been to declare that the correct ideal of a subvariety $V$ is the ideal $i(V)$ of polynomials vanishing on the variety $V$, which corresponds (by the Nullstellensatz) in the case of an algebraically closed field to  $V(\sqrt I)$ where $I$ is any ideal for which  $V(I)=V$ set-theoretically .  
The scheme point of view is clearer, more refined and perfectly solves the conundrum posed in the question about  the tangent space of a variety defined by two  different sets of polynomials $f_1,\dots f_r$ and $g_1,\dots g_s$: we do not have $T_p=T'_p$ in general because we do not have $V(f_1,\dots f_r)=V(g_1,\dots g_s)$  scheme-theoretically
