How can I show that $(U, \mathcal{O}_X|_U)$ is a scheme? 
Let $(X, \mathcal{O}_X)$ be a scheme. $U\subset X$ an open subset. I want to show that $(U, \mathcal{O}_X|_U)$ is a scheme.

We have the following definition:

A scheme is a locally ringed space $(X,O_X)$ s.t. $X$ admits an open cover $\{U_i\}_i$ and there exists rings $(A_i)_i$ such that $$\left(U_i, \mathcal{O}_X|_{U_i}\right)\cong \left(\operatorname{Spec}(A_i), \mathcal{O}_{\operatorname{Spec}(A_i)}\right)~~~~~~~~~~~(1)$$

In my opinion it is clear that $(U, \mathcal{O}_X|_U)$ is a locally ringed space, since this is induced by the fact that $(X, \mathcal{O}_X)$ is a scheme.
But now I want to show the rest, and there I somehow get in trouble. I know that $X=\bigcup_i U_i$, so therefore I wanted to define $V_i=U\cap U_i$, then $U=\bigcup_i V_i$ is an open cover. But now I don't see how to find such rings $(A_i)_i$ such that $(1)$ is satisfied. Because I also only know that they exists for $(X, \mathcal{O}_X)$. One idea was to take $U_i=\operatorname{Spec}(A_i)$ this can be done by the isomorphism in $(1)$, would this help?
Can someone help me further? It would be nice if you could use my definition above.
 A: 
Let $(X, \mathcal{O}_X)$ be a scheme. $U\subset X$ an open subset. I want to show that $(U, \mathcal{O}_X|_U)$ is a scheme.

Answer: The pair $(U, (\mathcal{O}_X)_U)$ is a locally ringed space and given any point $x\in U$ there is an open affine scheme $x\in V:=Spec(A)\subseteq X$ containing $x$. Since $x\in V \cap U$ and since $V\cap U \subseteq V$ is an open set, there is a basic open set $x\in D(f):=Spec(A_f)$ containing $x$. It follows $D(f) \subseteq U$ and hence $(U, (\mathcal{O}_X)_U)$ has an open cover consisting of affine schemes.
"Thanks a lot for your answer. I still have some questions. Did I get it correctly that V only exists since (X,OX) is a scheme right, so X=⋃iSpec(Ai) where in your case you pick one specific Ai and denote it by A. Now my second question is, why is U⊂V? Then the third question is, does this basic open set D(f) exists by definition of openess since V∩U is open or why does it exists. And then the last is why is D(f)⊂U? Could you maybe explain this?"
There is an $i$ with $x\in V_i:=Spec(A_i)$ and $V_i \cap U$ is open in $V_i$. Since $D(f)$ is a basis for the topology on $V_i$ it follows $x\in D(f) \subseteq U$. Hence $U$ has an open cover of affine schemes.
