# Quasiaffine scheme/Codimension one/Introduction/Section

One can show that for an open affine subset ${\displaystyle {}U\subseteq X}$ the closed complement ${\displaystyle {}Y=X\setminus U}$ must be of pure codimension one (${\displaystyle {}U}$ must be the complement of the support of an effective divisor). In a regular or (locally ${\displaystyle {}\mathbb {Q} }$)- factorial domain the complement of every effective divisor is affine, since the divisor can be described (at least locally geometrically) by one equation. But it is easy to give examples to show that this is not true for normal three-dimensional domains. The following example is a standard example for this phenomenon and it is in fact given by a forcing algebra.

## Example

Let ${\displaystyle {}K}$ be a field and consider the ring

${\displaystyle {}R=K[x,y,u,v]/(xu-yv)\,.}$

The ideal ${\displaystyle {}{\mathfrak {p}}=(x,y)}$ is a prime ideal in ${\displaystyle {}R}$ of height one. Hence the open subset ${\displaystyle {}U=D(x,y)}$ is the complement of an irreducible hypersurface. However, ${\displaystyle {}U}$ is not affine. For this we consider the closed subscheme

${\displaystyle {}{\mathbb {A} }_{K}^{2}\cong Z=V(u,v)\subseteq \operatorname {Spec} {\left(R\right)}\,}$

and ${\displaystyle {}Z\cap U\subseteq U}$. If ${\displaystyle {}U}$ were affine, then also the closed subscheme ${\displaystyle {}Z\cap U\cong {\mathbb {A} }_{K}^{2}\setminus \{(0,0)\}}$ would be affine, but this is not true, since the complement of the punctured plane has codimension ${\displaystyle {}2}$.