A function is called an affine function if the domain of the function is an affine set and if for all \(x,y \in \boldsymbol{dom} f\) and \(\theta\) with \(0 \leq \theta \leq 1\), we have
\[f(\theta x + (1-\theta) y) = \theta f(x) + (1-\theta) f(y)\]An affine funciton is both a [Convex Function] and a concave function. Conversely if a function is both convex and concave it is an affine function.