What are the differences among an affine variety, a vector space, and a projective variety? What are the differences among an affine variety, a vector space, and a projective variety?
Are there some nice examples to explain this? 
Edit: For example, what is the difference between the following: $k^n$ ($k$ is the ground field) as a vector space, and $k^n$ as an affine variety (what are the equations satisfied by $k^n$)? Why is $k^n$ not a projective variety? 
Why do we need to introduce projective varieties (do they have some advantages over affine varieties)? 
Why are $GL_n$ and $SL_n$ algebraic varieties? (What equations are satisfied by $GL_n$ and $SL_n$)?Are $GL_n$ and $SL_n$ projective varieties? 
Can some variety be both affine and projective? 
Thank you.
 A: As a set, the vector space $k^n$ and the affine space $k^n$ are the same but as spaces they are thought as having slightly different structures over them. As a vector space you have a neutral element $\vec{0}$ under addition and two vectors can be added together $\vec{v}+\vec{u}$, however as an affine space you think of the elements as points generalizing Euclidean space: you do not distinguish a particular origin $\vec{0}$, you cannot add points but you can attach the vector space $k^n$ to a particular point $P$ of the affine $k^n$ establishing a reference system and allowing you to substract points considering the vector from one to the other $P-Q:=\vec{PQ}$; thus you can reach any other point by the action of any vector onto your chosen point of origin $Q=P+\vec{v}$. Therefore an affine space $A$ is a set of points together with a reference system (think of coordinates) given by the action of a vector space $V$ on it, so $(A=k^n, V=k^n)=:\mathbb{A}^n_{k}$ is a bigger structure than $V=k^n$ by itself.
The affine space $\mathbb{A}^n_{k}$ is not a projective space because for example it is not compact whereas any projective space is a compact topological space. Moreover, a projective space $\mathbb{P}^n_{k}$ is constructed in a different manner than affine space: given a reference frame (origin) on $\mathbb{A}^n_{k}$, think of all the straight lines that go through it and parametrize them by a set. In this sense, whereas the points of $\mathbb{A}^n_{k}$ are in one-to-one correspondence with $k^n$, the points of $\mathbb{P}^n_{k}$ are in one-to-one correspondence with one-dimensional vector subspaces of $k^{n+1}$, i.e. a point of $\mathbb{P}^n_{k}$ is an equivalence class of points $(x_1,...,x_{n+1})$ where any other $(\lambda x_1,...,\lambda x_{n+1})$ is in the same class for all nonzero $\lambda\in k$. You should think of this as $\mathbb{A}^n_{k}$ with an infinite point added for every direction. For example the real projective plane $\mathbb{P}^2_{\mathbb{R}}$ can be showed to be $\mathbb{A}^2_{\mathbb{R}}\cup \mathbb{P}^1_{\mathbb{R}}$ which is a compactification of the affine plane since you are adding a circunference boundary at infinity with every point identified with its opposite (think of a circe, the interior would be your affine plane and the circunference would be $\mathbb{P}^1_{\mathbb{R}}$ where if you travel from the origin and reach the boundary you reappear in the opposite point of the circunference). Nevertheless projective spaces can be charted by affine spaces, like manifolds can be charted by $\mathbb{R}^n$, since they are the easiest example of projective varieties.
Projective varieties are introduced because for example, working with compact spaces is much better technically (e.g. you can do integration over the whole space). In algebraic geometry working projectively is natural, since adding the points at infinity simplifies and unifies a lot of results: for example Bézout's theorem is a great simple result which needs the possibility of two curves intersecting at infinity. This is the case of two parallel straight lines which do not intersect in $\mathbb{A}^2_{k}$ but can be thought to meet at the same point at infinity, i.e. intersect within $\mathbb{P}^2_{k}$. The name "projective" actually reflects this since its origin comes from descriptive geometry where two parallel lines in perspective meet at a single point of the horizon (line of sight).
There are similar reasons to work over the complex numbers $k=\mathbb{C}$ or any other algebraically closed field so that your polynomial equations have always solutions. That is the reason why most of the time one wants to work in complex projective space $\mathbb{CP}^n$ or in its projective subvarieties.
Thus, the advantages of projective varieties are many and fundamental to the development of geometry.
A: I will just answer part of this(the only part I really know well enough to answer):
$GL(n)$ is a variety when you consider it embedded in affine $n^2$-space(an $n \times n$ matrix has a clear basis of $n^2$ elements), because of the polynomial equation for the determinant(it's complicated, but its just polynomial in the matrix entries). $SL(n)$ has the same thing going on.
EDIT: As far as the difference between $k^n$ as a vector space and $k^n$ as an affine variety: Set theoretically I don't think there is any difference. When we consider $k^n$ a variety, we consider it as the set of zeroes of an $n$ variable polynomial, $f(x_1, \dots, x_n)$. What is this polynomial? Just $f = 0$ actually.
A: 
What are the differences among an affine variety, a vector space, and a projective variety? Are there some nice examples to explain this?
For example, what is the difference between the following: $k^n$ ($k$ is the ground field) as a vector space, and $k^n$ as an affine variety (are the equations satisfied by $k^n$). Why is $k^n$ not a projective variety?

Cf. 1st and 2nd paragraphs of Javier's answer.
To be short, the largest difference between an affine variety and a projective variety is the latter can have points at infinity. An affine space $k^n$ can also be regarded as a $k$-vector space, but a priori it is not doted with any vector space structure.
The set of equations satisfied by $k^n$ is $\emptyset$.

Why do we need to introduce projective varieties (do they have some advantages over affine varieties)?

Cf. third paragraph of Javier's answer concerning Bézout's theorem.

Why are $GL_n$ and $SL_n$ algebraic varieties? (What equations are satisfied by $GL_n$ and $SL_n$)?

If we consider $GL_n$ and $SL_n$ as subsets of $k^{n^2}$, I don't think that $GL_n$ is an algebraic variety, because it is not a closed subset under usual topology. However, when $GL_n \subset k^{n^2 + 1}$, we can identify it with the algebraic variety $$\{(M,x) \mid x\det{M} = 1\}.$$
As for $SL_n \subset k^{n^2}$, the answer is "yes", because it is set of zeros of the polynomial equation $\det(M) - 1 = 0$.

Are $GL_n$ and $SL_n$ projective varieties?

See below.

Can some variety be both affine and projective?

Given an affine variety, one can always complete it to a projective variety. But given a projective variety, sometimes there doesn't exist any atlas containing it to become an affine variety.
