Equivalent formulations of the Zariski tangent space I read alternative definitions of the Zariski tangent space.
Let $k$ be a field.
Definition 1: The Zariski tangent space to a $k$-rational point $p$ of an affine variety $X\subset\overline k^n$, is the set of $k$-derivations of the coordinate ring $k[X]$ of $X$ at the point $p$.
Definition 2: The Zariski tangent space to a point $p$ of an affine variety $X/k\subset\overline k^n$, defined over $k$, is the set of $k$-derivations of the local ring $O_p(X)$ of $p$.
If $X$ is defined over $k$, each derivation from definition one can be extended by linearity to a derivation of the local ring of $p$, but is this correspondence surjective? Furthermore, if $X$ is an arbitrary variety, how does definition two extend to $k$-rational points of $X$?
 A: The way I defined the tangent space in my question only works for affine varieties $X/k$ defined over the non-algebraically closed field $k$. For the general variety $X$ one defines the tangent space at a point $p$ as the dual to the factor $ m_p(X)/m_p(X)^2$ of the maximal ideal $m_p(X)$ of $p$ in $X$ by its square $m_p(X)^2$
The two definitions from the question are equivalent when $X/k$ is defined over $k$ and $p$ is a $k$-rational point of $X$, in the sense that the spaces are isomorphic. However, the correspondence I suggested does not extend by linearity. Rather it may extend by continuity, given suitable topologies. Note  here a purely algebraic construction of an isomorphism. Any extension of derivations at a point $p$, needs to preserve the Leibniz rule such that if $f=\frac{f_1}{f_2}\in O_p(X)$ then
$$\overline D_p(f_1) = \overline D_p(f_2f) = \overline D_p(f_2)f(p) + f_2(p)\overline D_p(f)$$
This gives an explicit formula for the continuation $\overline D_p:O_p(X)\to k$ of $D_p:k[X]\to k$, namely
$$\overline D_p(\frac{f_1}{f_2})=\frac{D_p(f_1)f_2(p) - f_1(p)D_p(f_2)}{f_2(p)^2}$$
Easily one can see that this is an injective homomorphism and its inverse is the restriction of derivations to the coordinate ring.
