Finding the basis of a vector space: question about methodology Problem: Find a basis of the vector space $\{x \in \mathbb F^n \mid x_1 + \cdots + x_n = 0\}$.
Solution: 
The vector space in question is exactly
$$\left \{ \begin{pmatrix} -x_2 - \cdots - x_n \\ x_2 \\ \vdots \\ x_n  \end{pmatrix} \; : \; x_2, \ldots, x_n \in \mathbb F \right \}.$$
Setting one variable equal to 1 and the rest to 0 gives us the following set of vectors
$$\left\{\begin{pmatrix} -1 \\ 1 \\ 0 \\ \vdots \\ 0  \end{pmatrix} , \begin{pmatrix} -1 \\ 0 \\ 1 \\ \vdots \\ 0  \end{pmatrix} , \cdots , \begin{pmatrix} -1 \\ 0 \\ 0 \\ \vdots \\ 1  \end{pmatrix} ,   \right\}. $$
My question is

Why does the "setting $x_2 = 1$ and the rest to 0" method always work? I understand that in this specific situation we get linearly independent and spanning vectors, but I'm not sure why it's true generally.

 A: What's really happening is that any vector in your space may be decomposed uniquely as
$$(-x_2 - \cdots - x_n, x_2, \ldots, x_n) = x_2(-1,1,0,\ldots,0) + x_3(-1,0,1,\ldots,0) + \cdots + x_n(-1,0,\ldots,0,1).$$
This is exactly what it means for $(-1,1,0,\ldots,0), \ldots, (-1,0,\ldots,0,1)$ to form a basis for your space: the existence of the decomposition means that the vectors span, and the uniqueness means that the vectors are linearly independent.
A: You don't just set $x_2$ to $1$ and "the rest to $0$", you do this in turn, for every $x_j$ for $j = 2,\dots,n$.
The condition:
$x_1 + x_2 + \cdots + x_n = 0$
means we can choose $n-1$ of the $x_j$ freely, and then our last choice is:
$x_k = -x_1 -\cdots - x_{k-1} - x_{k+1} -\cdots - x_n$ (with obvious modifications if $k = 1$ or $k = n$).
Ideally, we'd like to use the standard basis $\{e_j\}$ as much as we can (its elements have a lot of zero coordinates, which makes linear independence easy to verify). The only trouble is, none of the $e_j$ are in our subspace (the sum of coordinates is always $1$, for any $e_j$).
So we pick any group of $n-1$ of the $e_j$ to "start with" (since we know we need $n-1$ coordinates to specify an element of our subspace). The "natural" choice is to leave out either $e_1$ or $e_n$.
Your text opted to leave out $e_1$. Now all of $e_2,\dots,e_n$ have $0$ as the first coordinate. So if we use:
$\{e_2-e_1,\dots,e_n-e_1\}$ it is clear all of our vectors now belong to our subspace, and if:
$c_1(e_2 - e_1) + \cdots + c_{n-1}(e_n - e_1) = 0$, then:
$-(c_1 +\cdots+c_n)e_1 + c_1e_2 +\cdots + c_{n-1}e_n = 0$, and by the linear independence of the $e_j$, we must have: $c_2 =\cdots = c_{n-1} = 0$ (as well as $c_1 +\cdots + c_{n-1} = 0$, too, but that's not particularly interesting).
Basically, if your vector space has $k$ "free parameters" (which in this case are the $x_2,\dots,x_n$), so that it has a dimension of $k$, choosing each parameter set to one, and the rest to zero, is setting up an isomorphism (bijective linear map) with $\Bbb R^k$. In this particular instance, we have $k = n-1$, and the linear map can be realized by the matrix:
$A = \begin{bmatrix}-1&-1&\cdots&-1\\1&0&\dots&0\\0&1&\dots&0\\ \vdots&\vdots&\ddots&\vdots\\0&0&\dots&1\end{bmatrix}$
which has rank $n-1$ (this is not a bijection $\Bbb R^{n-1} \to \Bbb R^n$, but rather a bijection of $\Bbb R^{n-1} \to \text{im }A$).
This method may not always give the easiest way to pick a basis, especially if there are a lot of simultaneous conditions to satisfy (for example, the conditions may be inconsistent, or perhaps redundant, which may not be obvious from the outset).
