Basic question related to the definition of affine $k$- variety The definition of affine $k$- variety $X$, I have is that $X$ is an affine scheme that is reduced and of finite type over $k$ ($k$ is a field here). The definition of finite type I have is that $X$ can be covered by a finite number of affine open subschemes of the form $Spec \ B_i$ where $B_i$ is a finitely generated $k$-algebra.
I was wondering does it then follow that every affine $k$-variety must be of the form $Spec \ A$, where $A$ is a finitely generated $k$-algebra? 
 A: By (quasi-)compactness, we can rephrase this question as follows:
If $A$ is a $k$-algebra, $f_1, \ldots , f_n \in A$ generate the unit ideal, and each of the localizations $A_{f_i}$ is finitely generated over $k$, then must $A$ be finitely generated over $k$?
The answer is yes—there is a finite set $S\subset A$ that generates each of the localizations $A_{f_i}$, and we claim that $S\cup\{f_1,\ldots , f_n\}$ generates $A$.
Indeed, for any $x\in A$, there is some $N$ such that, for all $i$, $f_i^N x$ is generated by $S\cup \{f_i\}$.  Since $f_1^N,\ldots , f_n^N$ also generate the unit ideal, $x$ itself is generated by $S\cup\{f_1,\ldots , f_n\}$.
A: Yes, this is true. A $k$-scheme $X$ might be defined to be finite type if it can be covered by finitely many affine opens of the form $\mathrm{Spec}(A)$ with $A$ a $k$-algebra of finite type, but it is in fact true that this implies the stronger condition that every affine open of $X$ is the spectrum of a finite type $k$-algebra (see http://stacks.math.columbia.edu/tag/01T2 for the particular case and http://stacks.math.columbia.edu/tag/01SQ for the general principle behind results like these). In particular if $X$ itself is affine of finite type, it must be the spectrum of a finite type $k$-algebra.
