page_title: Piecewise linear function
section_title: Notation
hierarchical_section_title: Piecewise linear function / Notation
context_page_description: In mathematics and statistics, a piecewise linear, PL or segmented function is a real-valued function of a real variable, whose graph is composed of straight-line segments.
context_section_description: The notion of a piecewise linear function makes sense in several different contexts. Piecewise linear functions may be defined on n-dimensional Euclidean space, or more generally any vector space or affine space, as well as on piecewise linear manifolds, simplicial complexes, and so forth. In each case, the function may be real-valued, or it may take values from a vector space, an affine space, a piecewise linear manifold, or a simplicial complex. (In these contexts, the term “linear” does not refer solely to linear transformations, but to more general affine linear functions.)
  In dimensions higher than one, it is common to require the domain of each piece to be a polygon or polytope. This guarantees that the graph of the function will be composed of polygonal or polytopal pieces.
  Important sub-classes of piecewise linear functions include the continuous piecewise linear functions and the convex piecewise linear functions.
  In general, for every n-dimensional continuous piecewise linear function , there is a 
  such that
  If  is convex and continuous, then there is a 
  such that
  Splines generalize piecewise linear functions to higher-order polynomials, which are in turn contained in the category of piecewise-differentiable functions, PDIFF.
caption: A piecewise linear function in two dimensions (top) and the convex polytopes on which it is linear (bottom)