Let be the affine variety with coordinate ring . Its principal opens cover because . On , the localization of global sections on a principal open identifies its coordinate ring with , giving an isomorphism
On an overlap the two maps are induced by the same elements of , or equivalently by the same identification with , so they agree. Glue them to . The inverses agree on the overlaps as well and glue to its inverse. At a closed point , this is the map corresponding to the evaluation ring homomorphism , . This proves the cohomological criterion for affineness by an explicit global isomorphism.