Alternative characterization of a finite dimensional affine set As the definition in the S. Boyd's textbook:

My question is the following representation:

What is the relationship between this representation and the definition above it?
EX: sum of elements in bi = 1 for any d??
 A: I find that a good way to think of affine sets is as a translate of a linear subspace.
In fact, we have that a set $S$ is affine iff for any $s_0 \in S$, the set $S - \{s_0\}$ is a linear subspace.
To see this: If $S$ is affine, choose some $s_0 \in S$ and let $L=S-\{s_0\}$. Suppose $x \in L$, and let $\lambda$ be a scalar. We have $x+s_0 \in S$ and since $s_0 \in S$, we have $\lambda(x+s_0) + (1-\lambda) s_0 = \lambda x + s_0 \in S$, hence $\lambda x \in L$. Suppose $x,y \in L$, then $x+s_0, y+s_0 \in S$ and so ${1 \over 2} (x+s_0) + {1 \over 2} ( y+s_0 ) \in S$ and so ${1 \over 2} (x+y) \in L$. From the previous result, we have $2 ({1 \over 2} (x+y)) = x+y \in L$, and so $L$ is a linear subspace. Now suppose $s_0 \in S$ and $L=S - \{ s_0 \}$ is a subspace. Let $\lambda$ be a scalar, and $x,y \in S$. Then $\lambda (x-s_0) + (1 -\lambda ) (y -s_0) = \lambda x + (1 -\lambda ) y -s_0 \in L$, and so $\lambda x + (1 -\lambda ) y \in S$. Hence $S$ is affine.
Now suppose $S \subset \mathbb{R}^n$. Then $S$ is affine iff $S$ can be written in the form $S = \{ x | Bx=d \}$ for some $B,d$.
If $Bx=d, By=d$ and $\lambda$ is a scalar, then $B(\lambda x + (1-\lambda) y) = d$ hence one direction is immediate.
Now suppose $S$ is affine. If $S$ is empty, we can let $S = \{ x | 0^T x = 1 \} = \emptyset$, so suppose $S$ is non-empty. Choose $s_0 \in S$ and let $L$ be the linear subspace $S- \{ s_0 \}$. Let $B^T$ be a matrix whose columns form a basis for $L^\bot $, and notice that we can write $L = \ker B$. Then
$S = \{ x | Bx = d \}$, where $d=B s_0$. (To see this, note that $L = \{ x | Bx = 0 \}$. Hence $S = L + \{s_0\} = \{ x+s_0 | Bx = 0 \} = \{ y | B(y-s_0) = 0 \} = \{ y | By = B s_0 \} $.)
