This should be an elementary question for anyone who knows SGA by heart (alas, not for me). It smells a lot like a descent problem. All schemes are supposed to be noetherian, and all morphisms to be locally of finite presentation.


Let $X$ be a scheme of finite type over a (base) scheme $S$, and let $R \subseteq X(S)$ be a subset of the set of $S$--rational points of $X$. Denote by $\overline R$ the smallest closed subscheme of $X$ whose $S$--rational points contain $R$.


Let $f:S'\to S$ be a (base--change) morphism of schemes, write $X' := X\times\_SS'$ and denote by $R'$ the image of $R$ in $X(S') = X'(S')$. Again, let $\overline{R'}$ be the smallest closed subscheme of $X'$ whose $S'$--rational points contain $R'$. Then, $\overline{R'}$ is contained in $\overline R\times\_SS'$, and the question is:



> 
> Suppose $f:S'\to S$ is flat. Does the equality $\overline{R'} = \overline R \times\_SS'$ hold?
> 
> 
> 


Clearly some hypothesis on $f$ is needed, and I just guess it's flatness. 



When does Zariski closure commute with base change?
It seems that the condition you need is that the generic points of $S'$ go to generic points of $S$; this is much weaker than flatness.


Assuming this condition, we can reduce to the case that $S$ and $S'$ are both $Spec$ of some field and we can also assume that $\overline{R} = X$. If $X$ is a variety over a field $k$ any Zariski dense subset of $X(k)$ is also dense as a subset of $X(K)$ where $K$ is any extension field of $X$, proving the claim.


