Nonnegative function (source code)

= Nonnegative function
{title2=$f(x)\ge0$}

A <real-valued function> $f:X\to\mathbb R$ is nonnegative when $f(x)\geq0$ for every <input> $x\in X$. For example, $f(x)=x^2$ and $g(x)=|x|$ are <nonnegative functions> on the <real line>.

Products and nonnegative <linear combinations> preserve the property: if $f,g\geq0$ and $\alpha,\beta\geq0$, then $f(x)g(x)\geq0$ and $\alpha f(x)+\beta g(x)\geq0$ at every point. A <partition of unity> uses <nonnegative functions> whose values sum to one, so its weighted combinations lie in the <convex hull> of the values being combined.