Singular points of a variety I am trying to understand the proof of this result as formulated in
chapter 1 of Hartshorne's Book :
Let $Y$ be a variety. Then the set  $\mathsf{Sing}(Y)$  of singular points of $Y$ 
is a proper closed subset.
To prove that  $\mathsf{Sing}(Y)$ is a closed subset of $Y,$  It is sufficient to show  that $\mathsf{Sing}(Y_i)$ is closed for some open covering $\{Y_i\}_{i\in I}$ of $Y.$ I don't understand why ? my idea is to show that $\mathsf{Sing}(Y)=\bigcap_i\mathsf{Sing}(Y_i)$  is it the good way ? if yes how I can prove it ? 
I have another problem in the second part of the proof precisely : Since any variety is birationally equivalent to a hypersurface in some projective space therefore we may assume that $Y$ is a hypersurface in $\mathbb{P}^{n}.$  but I don't understand how we can reduce to the case of a hypersurface in $\mathbb {A}^n.$ 
Any help would be appreciated, Thanks.
 A: For the first point: he is not saying that $\mathrm{Sing}\left(Y\right) = \cap_{i} \mathrm{Sing}\left(Y\right)$. He is using a generic topologic argument: you can check a set is closed checking the intersections with every element of an open cover.
For the second point: he wants to show this subset is proper. So what cares is that it is not the whole variety. Then he can consider just an open set and check it contains points which are not singular. First, he takes a projective hypersurface, which is birational to $Y$. It is ok since they "share" an open suset. Then, since it is easier to work in affine space, you can cut even more this open subset with one of the open sets which cover $\mathbb{P}^{n}$ (see prop. 3.3 for instance). Then you reduced everything to affine space. Since there you prove there are non singular point, we are done, since implies $\mathrm{Sing}\left(Y\right)$ is not the whole $Y$.
A: For your first question, consider the proposition: A subset $E$ of a topological space $X$ is closed iff there exists a finite open cover $U_1, \ldots, U_n$ of $X$ such that $E \cap U_i$ is closed in $U_i$, for each $i$. To apply this to the problem, note that $\text{Sing}(Y_i) = \text{Sing}(Y) \cap Y_i$, since being a singular point is intrinsic to a variety.
For your second question, notice that Hartshorne's proof of the fact that a variety of dimension $r$ is birational to a hypersurface in $\mathbb{P}^{r+1}$, actually shows that any variety is birational to a hypersurface in $\mathbb{A}^{r+1}$.
