Projective spaces as affine varieties This works over the reals but not over the complex field. Consider the set of all $n\times n$ matrices $A$
such that
1. $A^2=A$
2.$A^T=A$
3. $\mathrm{Trace}(A)=1$
The first condition makes $A$ a projection to a subspace of $\mathbb{R}^n$. The second ensures that $A$ is diagonalizable so its eigenvalues are all 0 or 1.The third guarantees that the image of the projection is one-dimensional. Such matrices are in a 1-1 correspondence with one-dimensional subspaces and so constitute $\mathbb{R}P^{n-1}$. 
This seems to represent real projective spaces as affine varieties, with plenty of induced nonzero regular functions. How do we reconcile this with the fact that projective spaces have only constant regular functions?
This does not work over the complexes since $A$ would have to equal its conjugate transpose (to be guaranteed diagonalizable) and conjugation is not algebraic.
This is puzzling me to no end...
 A: The fundamental problem seems to be the confusion between the notions of "real algebraic variety" and "algebraic variety over the reals".  Given the similarity in words, it is easy to make this mistake.
You can find a discussion of the distinction in chapter 2 of Coste's lecture notes on real algebraic sets.  Both objects are topological spaces with sheaves of commutative rings, but the former is made by gluing algebraic subsets of $\mathbb{R}^n$, while the latter is made by gluing prime spectra of finite type commutative rings over $\mathbb{R}$.
There is a functor that sends an algebraic variety $X/\mathbb{R}$ to the real algebraic set $X^{ras}$ whose points are the real points of $X$.  Your example demonstrates that this functor does not reflect the property of being affine (i.e., if $X^{ras}$ is affine, $X$ is not necessarily affine).  Neither sheaves of regular functions nor the topological space are preserved by this functor, so you can't reasonably expect global functions to be preserved.
As it happens, there is a more general statement, also mentioned in Coste's lecture notes:

All quasi-projective real algebraic varieties are affine.

In particular, for any quasi-projective variety $Y/\mathbb{R}$, there exists an affine variety $X/\mathbb{R}$, such that $X^{ras} \cong Y^{ras}$.
A: The theorem that projective spaces are not affine varieties is a theorem over the complex numbers. As you note, your construction fails over the complex numbers, so there is no contradiction.
To give an even simpler example over the reals, $\mathbb {RP}^1=S^1$ is the vanishing set of $x^2+y^2-1=0$.
I think you're slightly confused about what the functions of your conditions are. Every matrix satisfying condition $1$ is diagonalizable. Indeed, all matrices satisfying a polynomial equation without repeated roots are diagonalizable, and $A^2-A=0$ certainly has no repeated roots. The second condition ensures that the kernel is the orthogonal complement of the image, which is the only way to ensure that there is a unique projection with a given image. Remove it, and you have an affine bundle on $\mathbb P^n$, which is of course perfectly alright.
If you take $AA^T=0$ to not be the conjugate-transpose in the complex case, then you get an affine subvariety of $\mathbb P^n$ - the complement of the hypersurface of points corresponding to lines where a certain bilinear form on $\mathbb C^{n+1}$ is nonzero, that is, the vanisihing set of a degree two polynomial equation.
A: A number of "proofs" that regular functions on projective space must be constants use a hand-waving argument that appears to to be valid for projective space over arbitrary fields or even rings ("polynomials on open affines induce homogeneous polynomials on $\mathbb{A}^{n+1}$, QED"). The main point is that  the canonical map $\pi:\mathbb{A}^{n+1}\setminus\{0\}\to k\mathbb{P}^n$ is an open mapping so that regular functions on $k\mathbb{P}^n$ must factor through it. This proof uses the projective Nullstellensatz in an essential way --- so it requires the field to be algebraically closed.
A: More thoughts: On $\mathbb{R}P^1$ functions that are locally polynomial must be constant (the standard proof still applies since it doesn't use the field being algebraically closed). Here is a map that identifies $\mathbb{R}P^1$ with $S^1$: $f:[x:y]\mapsto \left(\frac{x^2-y^2}{x^2+y^2},\frac{2xy}{x^2+y^2}\right)$. Regular functions on $S^1$ pull back to rational functions (homogeneous of degree 0) on $\mathbb{R}P^1$ whose denominators never vanish. If we regard such functions as regular, we get plenty of nonconstant regular functions on $\mathbb{R}P^1$. So the key is how we define regular functions: if they must be local polynomials, they are constants. If they are nonsingular rational functions, it is easy to find regular functions that are not constant. When the field is algebraically closed, the Nullstellensatz  implies that nowhere-singular rational functions are polynomials. (I may be opening myself up to flames for asking stupid questions, but I'm writing a book on algebraic geometry and want these little issues beaten to death). Thanks for your answers and comments!
A: The example ${\mathbb R}{\mathbb P}^1 = V(x^2+y^2 -1)$ seems compelling as are the other arguments, that real projective space can have nonconstant regular functions.
But what about Hartshorne, Algebraic Geometry, (II, Theorem 5.19) which says, that for $k$ a field, $A$ a finitely generated $k$-Algebra, $X$ a projective scheme over $A$ and $\mathcal F$ a coherent ${\mathcal O}_X$-module on $X$, the $A$-module $\Gamma(X,{\mathcal F})$ is finitely generated.
There seems to be no restriction to $k$ algebraically closed there, and also such an restriction is not made in (I, Theorem 3.9A) on which the proof of (II, 5.19) depends.
