We only give a sketch. (1). There always exists a natural scheme morphism
-
and
is affine if and only if this morphism is an isomorphism. It is always an open embedding
(because it is an isomorphism on the
,
),
and the image is
. This is everything if and only if the extended ideal is the unit ideal.
(2). We write
and consider the natural morphism
-
corresponding to the ring inclusion
.
This morphism is again an open embedding and its image is everything.