A geometric characterization of affine subspace of $\mathbb{R}^n$ Assume that $M$ is  a  submanifold  of  $\mathbb{R}^n$ with the  following  property:
For  every $x\in M$ and  $y \in \mathbb{R}^n \setminus M$, the  open straight line $\{tx+(1-t)y\mid t \in (0,1)\}$ does  not intersect $M$.

Does this  imply that $M$ is  a whole  affine sub space?

 A: I believe the answer is yes. Here's a sketch.
The crucial observation is this: Whenever $p,q\in M$, the line $\ell=\overleftrightarrow{pq}$ is entirely contained in $M$. First note that the points past $q$ on $\overrightarrow{pq}$ must all be in $M$ (if not, choosing such a point $r\notin M$, the line segment $\overline pr$ contains $q\in M$). By symmetry, all the points past $p$ on $\overleftarrow{pq}$ must be in $M$. Last, the points of $\ell$ between $p$ and $q$ must all be in $M$, as well (choose such a point $r\notin M$ and $s\in M$ past $q$).
Now consider the intersection $\mathscr S$ of $M$ with a small sphere $S^{n-1}$ centered at $p\in M$. (This must be a nonempty $(k-1)$-dimensional manifold if we pick a generic radius.) From what we've said, the lines $\overleftrightarrow{pq}$ are all contained in $M$ for $q\in\mathscr S$. For any $q,r\in\mathscr S$, joining $p$ to all the points of $\overleftrightarrow{qr}$, we subtend a $2$-dimensional sphere contained in $\mathscr S$. Picking further points, we must in fact have an entire $(k-1)$-dimensional sphere contained in $\mathscr S$. This means that $M$ lies in an affine $k$-dimensional subspace of $\Bbb R^n$.
A: Yes. First, it is not hard to show that $M$ contains lines passing through each pair of its points. Now pick  $ a \in M $. We will show that $L = M - a $ (sum of two sets in Minkowski's sense)is a vector subspace of $R^n.$ 
Proof: Note that $L$ contains $0$ and it contains all line passing through its points. Now take $x,y \in L$ and $t \in R.$ Want to show that $x+ty \in L$. To end this, note that $2x \in L$, since the line passing through $0$ and $x$ entirely belongs to $L$. Similarly $2ty \in M.$ Due to convexity of $M$(which implies the convexity of L)  we have 
$$\frac{1}{2} (2x) +\frac{1}{2} (2ty) = x+ty \in L$$
Therefore $L$ is a vector subspace, thus for a suitable matrix, say $A$ we have $L=\{x \in R^n ~ | \quad  Ax=0  \}$ , Thus $M=L+a = \{x ~| \quad Ax=b \}$ where $b=Aa$.
