I'm reading an analysis book, and I'm struggling with a question. First, here is the definition for an affine function:
A function is said to be affine if it is defined by
$$g(u) = c + \sum_{i=1}^{n}a_{i}u_{i}$$
where $c$ and the $a_{i}'s$ are prescribed values. If $c = 0,$ the function is linear.
Now, here's the problem:
Fix a point $x$ in $\mathbb{R}^{n}$ and let $c$ be a point in $\mathbb{R}^{n}$ and define $\phi : \mathbb{R}^{n} : \mathbb{R}$ by $$\phi(u) = \langle c, u - x \rangle .$$
(a) Show that $\phi : \mathbb{R}^{n} \rightarrow \mathbb{R}$ is affine.
(b) Show that given any nonconstant affine function $\phi : \mathbb{R}^{n} \rightarrow \mathbb{R}$, it is possible to choose points $x, c \in \mathbb{R}^{n}$ so that $\phi : \mathbb{R}^{n} \rightarrow \mathbb{R}$ has the above form.
For (a), I used the bilinearity property of the inner product as follows:
$$\langle c, u - x \rangle = \sum_{i=1}^{n} c_{i}u_{i} - \sum_{i=1}^{n} c_{i}x_{i}.$$
I don't know how to get it into the form used in the definition, though. I also don't know how to get an arbitrary affine function into the form provided above. I'm guessing you start with $c + \sum_{i=1}^{n} a_{i}u_{i}$ and manipulate it into what we want. I tried a lot of things, but I couldn't get it.
Any help is appreciated.