Piecewise linear function

From Wikipedia, the free encyclopedia

A function (blue) and a piecewise linear approximation to it (red).
Enlarge
A function (blue) and a piecewise linear approximation to it (red).
A piecewise linear function in two dimensions (top) and the convex polytopes on which it is linear (bottom).
Enlarge
A piecewise linear function in two dimensions (top) and the convex polytopes on which it is linear (bottom).

In mathematics, a piecewise linear function

f: \Omega \to V,

where V is a vector space and Ω is a subset of a vector space, is any function with the property that Ω can be decomposed into finitely many convex polytopes, such that f is equal to a linear function on each of these polytopes.

A special case is when f is a real-valued function on an interval [x1,x2]. Then f is piecewise linear if and only if [x1,x2] can be partitioned into finitely many sub-intervals, such that on each such sub-interval I, f is equal to a linear function

f(x) = aIx + bI.

The absolute value function f(x) = | x | is a good example of a piecewise linear function. Other examples include the square wave, the sawtooth function, and the floor function.

Important sub-classes of piecewise linear functions include the continuous piecewise linear functions and the convex piecewise linear functions.

[edit] See also