Convex Set with Empty Interior Lies in an Affine Set In Section 2.5.2 of the book Convex Optimization by Boyd and Vandenberghe, the authors mentioned without proving that "a convex set in $\mathbb{R}^n$ with empty interior must lie in an affine set of dimension less than $n$." While I can intuitively understand this result, I was wondering how it can be proved formally?

Look at $d+1$,  the largest number of affinely independent points from $C$. Let $x_0$, $\ldots$, $x_d$ one such affinely independent subset of largest size. Note that every other point is an affine combination of the points $x_k$, so lies in the affine subspace generated by them, which is of dimension $d$.  
If $d < n$ then this subspace is contained in an affine hyperplane. 
If $d=n$, then $C$ contains $d+1$ affinely independent points. Since $C$ is convex, it will also contain the convex hull of those $n+1$ points. Now, in an $n$-dimensional space the convex hull of $n+1$ affinely independent points has non-empty interior. So the interior of $C$ is non-empty. 
