Dimension of affine variety Assume that I have $k$ polynomials $f_1(x_1,\ldots x_n),f_2(x_1,\ldots x_n),\ldots f_k(x_1,\ldots x_n)$ in $n>k$ variables.  Is it possible to calculate, ,i.e., does there exist  a fast algorithm, the
 dimension of the variety  $Z(f_1,\ldots f_k)$? 
Does there exist a good criterion to check if the dimension of $Z(f_1,\ldots f_k)$ is $n-k$ when all $f_i$ are quadratic polynomials?
 A: The codimension of $X=Z(f_1,\ldots,f_k)$  in $\mathbf{A}^n$ equals $k$, or equivalently,  the dimension of $X$ is $n-k$,  if  $(f_1,\ldots,f_k)$ is a regular sequence. 
Let me explain what a regular sequence is. Sorry if I'm writing things you already know.
Let $A$ be a noetherian ring. An element $x\in A$ is called regular if the multiplication by $x$ is injective. A sequence $(x_1,\ldots,x_n)$ of elements $x_1,\ldots,x_n\in A$ is said to be a regular sequence if $x_1$ is regular and the image of $x_i$ in $A/(x_1A+\ldots+ x_{i-1}A)$ is regular for all $i=2,\ldots,n$. 
You can use Krull's principal ideal theorem to show that any ideal $I$ of $A$ which can be generated by a regular sequence $(x_1,\ldots,x_r)$ satisfies $\textrm{ht}( I) = r$.
So one way to find out if the dimension of $X$ is $n-k$ is to check the above condition. 
If $k=1$ and $f_1\neq 0$ we're good.
Let's see how it goes for $k=2$. Let's suppose that $f_1\neq 0$ and that $f_2 $ is not contained in the ideal $(f_1)$. Now, you have to check that the image of $f_2$ in $k[x_1,\ldots,x_n]/(f_1)$ is regular. So you  compute the quotient and check if it's an integral domain. If it's an integral domain, we're good. If not, it might be a bit more difficult to check if $f_2$ is regular in $k[x_1,\ldots,x_n]/(f_1)$. I wouldn't know a fast way of checking if this element is a non-zero divisor at the moment. 
This is not a complete answer but I hope it at least helped a bit.
A: You should calculate the Poincare series $P_X(t)$ of the coordinate ring $k[X].$ The the order of the pole $t=1$ is exactly the dimension  of the affine variete $X.$  Some  of computer algebra systems  allows  a Poincare series calculation for an  input set of   polynomials.
