I would like to prove the following statement. Let $n \in \mathbb{N}$ be arbitrary and $\emptyset \neq S \subseteq \mathbb{R}^n$. Then $\phi : S \rightarrow \mathbb{R}$ is affine iff there exists $\alpha_1, ..., \alpha_n, \beta$, each of them $\in \mathbb{R}$, such that $\phi(x) = \sum_{i=1}^n\alpha_ix_i \ + \beta$, for all $x \in S.$
I am familiar with the fact that, provided that $0 \in S$, $\phi \in \mathbb{R}^S$ is affine iff $\phi - \phi(0)$ is a linear map on $S$ and I believe this will be useful.