Tangent space of a scheme and subschemes of length two I found in Huybrecht's book Fourier Mukai transforms in Algebraic Geometry the following statement 
A tangent vector $v$ at $x \in X$ is the data of a length two subscheme $Z$ concentrated at x
Here $X$ is a $k$-scheme and $x$ is a closed point of $X$.
I tried to prove this equivalence, but I am not sure whether I did it correctly or not. I know that tangent vectors are in bijection with the set of $k$-scheme homomorphisms $Hom_{k} \left( \text{Spec} \; k[\epsilon], X \right)$, where I set $k[\epsilon] = k[\epsilon] \left/ (\epsilon^2) \right.$. Now my idea was to do the following:
To every $\phi \in Hom_{k} \left( \text{Spec} \; k[\epsilon], X \right)$ I attach its schematic image $Z_{\phi}$. This is a subscheme of $X$ supported at $x$ and the stalk at $x$ is given by $\mathcal{O}_{X,x} \left/ \text{ker} \phi_{x} \simeq k[\epsilon] \right.$ for every morphism which is not the trivial one (i.e. the one factorizing for the inclusion of the closed point, which gives a subscheme of length 1). Therefore, $Z_{\phi}$ is the required subscheme.
For every subscheme $i : Z \rightarrow X$ of length two let us consider $\mathcal{O}_{Z,x} \simeq \mathcal{O}_{X,x} \left/ \mathcal{I}_{Z,x} \right.$. As this is a length 2 module over $\mathcal{O}_{X,x}$, and $\mathcal{O}_{X,x}$ is a local ring, we have a short exact sequence
$$
0 \rightarrow k(x) \rightarrow \mathcal{O}_{X,x} \left/ \mathcal{I}_{Z,x} \right. \rightarrow k(x) \rightarrow 0
$$
of $k(x)$-vector spaces. Therefore, $\mathcal{O}_{X,x} \left/ \mathcal{I}_{Z,x} \simeq k(x) \oplus k(x) \right.$ as a vector space, and the multiplication on the left can easily be transferred on the right because $\left( m_{x} \left/ \mathcal{I}_{Z,x} \right. \right)^2 = 0$, namely we have $(a,b) \cdot (c,d) = (ac, ad+bc)$. We now define $\mathcal{O}_{X,x} \rightarrow k[\epsilon]$ as the composition of the projection $\mathcal{O}_{X,x} \rightarrow \mathcal{O}_{Z,x}$, the isomorphism $\mathcal{O}_{X,x} \left/ \mathcal{I}_{Z,x} \simeq k(x) \oplus k(x) \right.$ and the map $(a,b) \mapsto a + \epsilon b$.
Is this correct? I fear it is not, because it seems like all the subschemes have the same structure sheaf, namely $k[\epsilon]$, with the same multiplication structure.
 A: 
Is this correct? I fear it is not, because it seems like all the subschemes have the same structure sheaf, namely $k[ϵ]$, with the same multiplication structure.

This is a crucial point. Remember, that a closed subscheme $Z \subset X$ is an equivalence class of closed immersions $Z \hookrightarrow X$, where two such morphisms $f, g$ are equivalent if and only if there is an isomphism $\phi: Z \to Z$, making the following diagram commute:
$$\begin{align*}Z & \xrightarrow{f} X\\
\phi \downarrow & \nearrow g \\
Z\end{align*}$$
So both things can happen:

*

*You can have two different morphisms $f, g: Z \hookrightarrow X$, which define the same subscheme $Z \subset X$.

*You can have two different subschemes $Z_1, Z_2 \subset X$, which are abstractly isomorphic as schemes $Z_1 \cong Z_2$, but not as subschemes of $X$,
even if they have the same points in $X$.

So much for the general theory, now to your question.

A tangent vector $v$ at $x∈X$ is the data of a length two subscheme $Z$ concentrated at $x$.

$\DeclareMathOperator{\Spec}{Spec}$I don't belive the claim of Huybrechts is true as written.

*

*You already mentioned the first problem I see: The zero-vector, which is the morphism $\Spec(k[\epsilon]) \to \Spec(k) \to X$, does not define a subscheme of length two.


*Two different morphisms $f,g: \Spec(k[\epsilon]) \to X$(i.e. two different tangent vectors), define the same subscheme in $X$, if there is an isomorphism of $k[\epsilon]$ commuting with $f$ and $g$.
But any such isomorphism is given by a map $k[\epsilon] \to k[\epsilon], \epsilon \mapsto c \cdot \epsilon$ for any $c \in k \setminus \{0\}$. So two tangent vectors  define the same subscheme if and only if they differ by a scalar.
Those two points show, that the length two subschemes concentrated at $x$ are rather the projectification of the tangent vectors, i.e. the space $\mathbb{P}(T_x)$ (or $\mathbb{P}(T_x^*)$, depending on your notation).
