[Math] How to gain an intuition of the affine function’s definition

affine-geometrylinear algebra

Here is the definition of Affine Functions according to Stephan Boyd (EE263 Stanford) :
Affine Boyd

1- I believe linearity is more restrictive property of a function than being affine since it requires $f(0) = 0.$
I wonder, how is it the case that by imposing a constraint, namely $\alpha + \beta = 1$, we achieve a less restrictive property?

2- How can we get an intuitive feeling of the concept of affinity via this definition?

Thanks

Best Answer

Let's use another definition of an affine function.

A function ${f}\colon \mathbb R^n \to \Bbb R^m$ is called affine if and only if $$f(\mathbf{x}) = \mathbf{A}\mathbf{x} + \mathbf{b}$$ for some $\mathbf{A} \in \Bbb R^{m \times n}$ and $\mathbf{b} \in \Bbb R^m$.

Let $f\colon \Bbb R^n \to \Bbb R^m$ be an affine function and $\alpha,\beta \in \Bbb R$. Then \begin{align*} f(\alpha \cdot \mathbf{x} + \beta \cdot \mathbf{y}) &= \mathbf{A}(\alpha \mathbf{x} + \beta \mathbf{y}) + \mathbf{b}\\&=\alpha \mathbf{A}\mathbf{x} + \beta\mathbf{A}\mathbf{y} + \mathbf{b}\\ &\\ \alpha\cdot f(\mathbf{x}) + \beta\cdot f(\mathbf{y}) &= \alpha(\mathbf{A}\mathbf{x}+\mathbf{b}) + \beta(\mathbf{A}\mathbf{y} + \mathbf{b})\\ &=\alpha\mathbf{A}\mathbf{x}+\alpha\mathbf{b} + \beta\mathbf{A}\mathbf{y}+\beta\mathbf{b}\\ &=\alpha\mathbf{A}\mathbf{x}+ \beta\mathbf{A}\mathbf{y}+(\alpha+\beta)\mathbf{b} \end{align*}

So for affine functions to we require in general that $\alpha+\beta = 1$ for the relation $f(\alpha\mathbf{x}+\beta\mathbf{y}) = \alpha f(\mathbf{x}) + \beta f(\mathbf{y})$ to hold. In other words, these definitions are equivalent as long as $\alpha + \beta = 1$.

Related Question