Principal open sets in affine varietes Suppose $X$ is affine algebraic variety in $n$ dimensional affine space  which ideal $I(X)$ (certainly, we mean here that $I(X)$ is the radical ideal and the field is algebraically closed) is generated by $f_1, \ldots, f_s$. Then,  by $h(x) \in K[X]$, that is not a zero divisor, we can form principal open set $V_h$ that is closed algebraic subset in the affine space of the dimension $n+1$. 
I wonder, what is the ideal of it, i.e. $I(V_h)$?
I guess, that $I(V_h)$ is generated by $f_1, \ldots, f_s$ and $t\cdot h-1$ (where $t$- is a variable for "n+1" th dimension), but I was not succeded in proving it strictly. I'm also observed that $t\cdot h-1$ is irreducible polynomial, but I was unsuccessful to push forward this idea. 
Any help will be appreciated! Thank you)
 A: Let $X \subseteq \mathbb{A}^n$ be an affine variety, and let $h$ be a regular function on $X$ which is not a zero divisor. Then indeed the open set $X_h = \{x \in X: h(x) \neq 0\}$ can be realized as an affine variety contained in $\mathbb{A}^{n+1}$, by taking the set
$$\{ (x,t) : x \in X, h(x)t -1 = 0\} \subseteq \mathbb{A}^{n} \times \mathbb{A}^1 = \mathbb{A}^{n+1}.$$
To calculate the ideal of the above embedding $X_h \subseteq \mathbb{A}^{n+1}$, we first translate to commutative algebra, and then solve.

Translating to Algebra
First write according to the embedding $X \subseteq \mathbb{A}^n$ an isomorphism of coordinate rings $A(X) \cong k[x_1,\ldots, x_n]/I$, where $I$ is the ideal of $X \subseteq \mathbb{A}^n$.
The coordinate ring of $X_h$ is exactly the localization $A(X_h) = A(X)_h = A(X)[1/h]$, which adjoins an inverse to $h$. We thus have a diagram of ring morphisms corresponding to a diagram of spaces:
$$\begin{array}{l|c r}
 \require{AMScd}\begin{CD}
k[x_1,\ldots, x_n]/I @>>> (k[x_1,\ldots, x_n]/I)_h \\
@AAA @A\rho AA \\
k[x_1,\ldots, x_n] @>>> k[x_1,\ldots,x_n]_h \\
@. @A\varphi AA \\ @. k[x_1,\ldots, x_n,t]
\end{CD} & \qquad\qquad &
\begin{CD}X @<\supseteq<< X_h \\ 
@VVV @VVV \\
\mathbb{A}^n @<\supseteq<< \mathbb{A}^n_h \\
@. @V\subseteq VV \\
@. \mathbb{A}^{n+1} \end{CD}  
\end{array}$$
The map $\varphi$ is defined by sending $t$ to $1/h$. The desired ideal is the kernel of $\rho\varphi$.

Using facts about localization
There is one essential fact we now need to finish the problem:

given a ring $R$ and a multiplicative set $S \subseteq R$, for an ideal $I \subseteq R$, we have $(R/I)[S^{-1}] = R[S^-1]/ I[S^{-1}]$.

This is a special case of exactness of localization.
This shows the kernel of $\rho$ is exactly $I_h = I k[x_1,\ldots, x_n]_h$, the ideal generated by $I$ in the localization by $h$. If $I$ is generated by $\{f_1,\ldots, f_s\}$ over $k[x_1,\ldots, x_n]$, then $I_h$ is generated by $\{f_1,\ldots, f_s\}$ over $k[x_1,\ldots, x_n]_h$.
Claim: $ker(\rho\varphi) = \varphi^{-1}(I_h) = (\tilde{f}_1,\ldots, \tilde{f}_s) + \mathrm{ker}(\varphi)$, where $\tilde{f}_i$ is the same polynomial $f_i$, but now considered as an element of $k[x_1,\ldots,x_n,t]$.
Proof: The inclusion of right in left is clear; conversely, if $g \in k[x_1,\ldots, x_n,t]$ has
$$ \varphi(g) = \sum_{i=1}^s a_i f_i,$$
then choosing $\tilde a_i \in k[x_1,\ldots, x_n,t]$ such that $\varphi(\tilde a_i) = a_i$ (by surjectivity of $\varphi$) shows that
$$ \varphi\left( g - \sum_{i=1}^s \tilde a_i \tilde f_i\right) = 0,$$
and so $g - \sum_{i=1}^s \tilde a_i \tilde f_i \in \mathrm{ker}(\varphi)$, as desired. To complete your question, one needs only to calculate the kernel of the localization map $\varphi: k[x_1,\ldots, x_n,t] \to k[x_1,\ldots, x_n]_h$.
