Affine function

A function $$f: \mathbb{R}^{n} \to \mathbb{R}^m$$ is called affine if it is composed of a linear function plus a constant offset, i.e. if it adheres to the form

$$f(x) = Ax+B$$

where $$A \in \mathbb{R}^{m\times n}, B\in \mathbb{R}^{m}$$. If $$f$$ is an affine function, then for any $$x,y \in \mathbb{R^n}$$ and any $$\alpha, \beta \in \mathbb{R}$$ we have

$$f(\alpha x+ \beta y) = \alpha f(x) + \beta f(y).$$

In a geometric interpretation, affine functions map straight lines to straight lines.