# affine function definition

If we define the affine function as

$f(\lambda x + (1-\lambda)y) = \lambda f(x) + (1-\lambda)f(y)$ for every $x,y \in R^d$ and $\lambda \in R$

How to show that it is equivalent to the definition

$f(x) = Ax +f(0)$ for some $k\times d$ matrix $A$

Thank you!

-

$(\Longrightarrow)$ Suppose first that $f(\lambda x + (1-\lambda)y) = \lambda f(x) + (1-\lambda) f(y)$ for all $x, y \in \mathbb{R}^d$ and $\lambda \in \mathbb{R}$. Let $$g(x) = f(x) - f(0).$$ We have to show that $g$ is linear. This means that we have to check that

• $g(cx) = cg(x)$ for all $x \in \mathbb{R}^d$ and $c \in \mathbb{R}$.

• $g(x+y) = g(x) + g(y)$ for all $x, y\in \mathbb{R}^d$

For the first point, note that $$g(cx) = f(cx) - f(0)$$ by definition. Also, our hypothesis gives $f(cx) = cf(x) + (1-c)f(0)$ (by taking $\lambda = c$ and $y = 0$). You take it from here.

For the second point, note that $$g(x + y) = f(x+y) - f(0)$$ by definition. Also, our hypothesis gives $f(x+y) = \frac{1}{2}f(2x) + \frac{1}{2}f(2y)$ (why?) and that $f(2x) = 2f(x) - f(0)$ (why?). You take it from here.

$(\Longleftarrow)$ Suppose now that $f(x) = Ax + f(0)$ for some $k \times d$ matrix $A$. If $x,y \in \mathbb{R}^d$ and $\lambda \in \mathbb{R}$, then \begin{align*} f(\lambda x + (1-\lambda)y) & = A(\lambda x + (1-\lambda)y) + f(0) \\ & = \ldots \\ & = \ldots \\ & = \lambda f(x) + (1-\lambda) f(y), \end{align*} where the $\ldots$ means I've left the details for you to fill in.

-
This brings another question: How to show any linear mapping is of the form Ax for some matrix A? Thank you! – Salih Ucan Feb 5 '13 at 9:50
That's basic linear algebra. (Are you taking a linear algebra class?) Any matrix $A$ determines a linear map in the obvious way: that is, $h(x) = Ax$ is linear. Conversely, any linear map $h$ can be represented as a matrix by choosing bases for the domain and target. In particular, if $\{e_1, \ldots, e_d\}$ is a basis for the domain, then we can take $$A = [h(e_1) \cdots h(e_d) ]$$ as the matrix, where each $h(e_i) \in \mathbb{R}^k$ is written as a column. – Jesse Madnick Feb 5 '13 at 9:54
Thank you Jesse! yes i am studying linear algebra now.. – Salih Ucan Feb 5 '13 at 10:03