In my algebraic geometry course, we are studying tangent space and there is something I don't really understand. We define the tangent space as follows.
Let $a \in X$ be an variety. By chosing an affine neighborhood of $a$ we assume that $X \subset \mathbb A^n$ and that $a = 0$ is the origin. Then $$T_aX = V(f_1:f \in I(X))$$ is the tangent space of $X$ at $a$, where $f_1$ denotes the linear term of $f\in I(X)$.
Thereafter, my teacher said that in the above definition of the tangent space, we had embedded $X$ in $\mathbb A^n$ but there are many other ways to embbed $X$ in some $\mathbb A^k$ and it is not at all obvious that the tangent space has the same dimension in these different embeddings. And then we showed the following statement that gives a definition of the tangent space that is independant of the embedding we chosed.
The tangent space is isomorphic to be the dual space of $I_a/I_a^2$, where $I_a$ is the unique maximal ideal in $\mathcal O_{X, a}$ (the stalk of the regular function at $a$).
Here are my questions: Why does we need this statement to ensure that the dimension of the tangent space do not depend on the embedding ? The tangent space is an affine variety, so it exists on its own and does not depends on any embedding right ? Moreover, as it is a vector space, the dimensons (the "topological" one and the "vector space" one) coincide and the dimension as a vector space is strictly related to the space itself, not on any embedding.. Why isn't the invariance of the dimension obvious ?
Well in your definition the tangent space is constructed from an embedding of $X$, so there is no guarantee that the tangent space that is constructed from another embedding is isomorphic to this one.