# Jacobian matrix and dimension of variety

I have 2 questions about the dimension of a complex variety:

1) Suppose I have a variety $V$ in $\mathbb{C}^n$ and an ideal $I$ such that $V=V(I)$ ($I$ may not be radical, i.e., it may differ from $I(V)$). Can we detect the dimension of $V$ from the rank of the Jacobian matrix $J_p(I)$, where $p$ runs over $V$?

Of course, we have

$$\dim V=n-\min_p \mathrm{rank} J_p(\sqrt{I}),$$

where $p$ runs over the set of smooth points of $V$. So I wonder if we can replace $\sqrt{I}$ by $I$ in the above formula when $p$ runs over some subset of $V$.

2) With the above assumption, is it true that

$$\dim (V\cap(\mathbb{C}^*)^n)=n-\mathrm{rank} J_p(I)$$

for some $p\in V\cap(\mathbb{C}^*)^n$? (Here, of course, $\mathbb{C}^*=\mathbb{C}-\{0\}$).

I am grateful for any answer/comment.

Edit: Thanks a lot for the prompt answer! Now if I add the assumption that $I$ has generators consisting of irreducible polynomials, is there any hope that the formulae hold?

2nd edit: Thanks again. For your first example, as far as I know, $\mathrm{rank}J_p(I)=2$ for general point $p\in C$. Please note that my question is that whether the formula holds generically.

I think we can exclude your second example by adding further assumption that $I$ contains no products of linear polynomials (e.g., $I$ is contained in a prime ideal which is generated by polynomials of degrees at least 2). Actually, I am interested in homogeneous ideal $I$ whose generators are of the same degree. With all of these additional assumptions, do you think that the formulae can be true?

For the Jacobian criterion it is fundamental to consider $I(V)$ and not just an ideal $I$ such that $V = V(I)$. For instance, take $I = ((x-1)^2)$. Then $V(I) = \{p\}\subset\mathbb{A}^1$. We have $rank (J_p(I)) = 0$. However, $dim(V) = 0\neq dim(\mathbb{A}^1)-rank (J_p(I))$.

The answer is negative also if the polynomials generating $I$ are irreducible. For instance, consider the quadric surface $Q$ given by $$\det \left(\begin{matrix} x & y \\ y & z \end{matrix}\right) =0$$ and the cubic surface $S$ given by $$\det \left(\begin{matrix} x & y & z \\ y & z & w \\ z & w & x \end{matrix}\right) =0$$ On a general point $p = [u^3:u^2v:uv^2:v^3]\in Y$ we have $Jac(Q)(p) = (uv^2,-2u^2v,u^3,0)$ and $Jac(S)(p) = (v^2(u^4-v^4),-2uv(u^4-v^4),u^2(u^4-v^4),0)$. Therefore, $\mathbb{T}_pQ = \mathbb{T}_pS$ for a general point $p\in Y$. This means that, if $Y\subset\mathbb{P}^3$ is the twisted cubic then $Q\cap S = Y$ set-theoretically. However, scheme-theoretically $Q$ and $S$ cut $Y$ twice.

Now, take the affine chart $w\neq 0$. Then, if $I =(xz-y^2,x^2z-x-y^2x+2yz-z^3)$ we have that $V(I)$ is the affine twisted cubic $C$. However, $rank(Jac_{(0,0,0)}(I)) = 1$. Then $$dim(\mathbb{A}^3)- rank(Jac_{(0,0,0)}(I)) = 2 \neq dim(C) = 1.$$

A simpler example: take the two curves $C = \{y-x^2 = 0\}$ and $L = \{y = 0\}$ in $\mathbb{A}^2$. Note that $L$ is the tangent line of $C$ in $(0,0)$. Both $C$ and $L$ are irreducible. Now, if $I = (y-x^2,y)$ then $V(I) = \{(0,0)\}$. On the other hand the scheme defined by $I$ is non-reduced. Indeed it is the origin with multiplicity two. In this case $rank(Jac_{(0,0)}(I)) = 1$, and $$dim(\mathbb{A}^2)- rank(Jac_{(0,0,0)}(I)) = 1 \neq dim(V(I)) = 0.$$