X projective variety, connected, constant morphism (counterexample?) Let $X$ be a projective $k$-variety and $Y$ a quasi-affine $k$-variety. Assume
that $X$ is connected. Show that every morphism of $k$-varieties $X \to Y$ is constant, i.e., its image consists of a single point.
I was able to prove this exercice in my course notes (very introductory AG). A natural question, I next asked myself, was: what is the relevance of the condition that $X$ is projective? What if we remove this condition or change it, where would things go wrong? I have not yet acquired an intuitive and flexible to understand what's "really" going on in AG.
Can somebody, maybe, provide a counterexample and/or explain intuitvely why the condition that $X$ is projective is necessary. 
 A: The hypothesis of projectivity is not really necessary, it's enough to assume that $X$ is complete. (The wikipedia article should explain it very well.) Completeness is an analogue of compactness in algebraic geometry and in fact the definition mimics the characterization of compact spaces. 
It is a fundamental property that projective varieties are complete, being closed subvarieties of projective spaces which are complete. This forces morphisms into affine varieties to be constant. 
The intuitive reason behind this is that "image of a compact space is compact, in particular closed". If you have a map $X \rightarrow \mathbb{A}_{1}$, where $X$ is complete and connected, then the image of this morphism will also be complete, closed and connected. It cannot be the whole space, since $\mathbb{A}_{1}$ is not complete, so it must be a single point. It follows that such $X$ doesn't admit non-constant maps into any affine space, so in particular into any affine variety. 
You can prove that $\mathbb{A}_{1}$ is not complete by exhibiting a subvariety of $\mathbb{A} _{1} \times \mathbb{A} _{1}$ such that its image under projection is not closed. One such example is the hyperbola defined by the equation $xy = 1$. Its image under the projection is the affine line minus one point, so it is not closed. 
It may seem a little surprising at first that affine varieties cannot be "compact", because our intuition derived from the reals says that spaces defined by equations inside $\mathbb{R}^{n}$ can often be compact, like the circle $x^{2} + y^{2} = 1$. However, this is false if you're working over the complex numbers and using holomorphic equations. Then the described submanifold will be compact if and only if it is a finite set of points.  
