# Turning varieties into affine varieties?

Given an affine variety, we can forget it into a variety. The other way round, given a variety $X$ we can look at $$spec(\mathcal O_X(X)$$

Is this necessarily an affine variety (a priori its just an affien scheme)? If so, am I right that this implys that taking spec of the global functions is left adjoint to the forgetful functor on the level of varieties?

Also, what does this functor intuitively? If you feed in an affine variety, it spits out the same variety again. If you apply it to a complete irreducible variety (for example $\mathbb P^n$) it gets transformed into a point.

-

The functor $Sch \to Ring^{op}, X \mapsto \mathcal{O}_X(X)$ is left adjoint to the functor $\text{Spec} : Ring^{op}\to Sch$.
By a variety you mean a separated integral scheme $X$ of finite type over a field $k$? Then $O_X(X)$ does not have to be of finite type over $k$. Namely, there are integral $k$-subalgebras $A,B$ of a $k$-algebra $C$ such that $A,B$ are of finite type, but $A \cap B$ is not. Then glue $Spec(A)$ and $Spec(B)$ along $Spec(C)$ to get a counterexample.
Okay, thanks I am working over $\mathbb C$ anyway :) – Jan Oct 5 '10 at 11:22