TOPICS
Search

Piecewise Linear Function


A piecewise linear function is a continuous function that is an affine function on each cell of a polyhedral subdivision of its domain. For a function of one real variable, the cells are intervals and the graph is a polygonal curve. The breakpoints of the intervals need not be equally spaced.

For example, let 1=x_0<x_1<...<x_n=2. Linear interpolation of the values x_i^3 gives a piecewise linear approximation to y=x^3 on [1,2]. The approximation improves as the mesh size of the partition tends to zero. The trapezoidal rule integrates this piecewise linear interpolant.

For a continuous piecewise linear function y=f(x) with breakpoints x_0<x_1<...<x_n, put Deltax_i=x_i-x_(i-1) and Deltay_i=f(x_i)-f(x_(i-1)). The exact arc length of its graph is

 L=sum_(i=1)^nsqrt((Deltax_i)^2+(Deltay_i)^2)=sum_(i=1)^nsqrt(1+((Deltay_i)/(Deltax_i))^2)Deltax_i.

For a smooth function, the lengths of its piecewise linear interpolants converge under suitable refinement to

 L=int_(x_0)^(x_n)sqrt(1+((dy)/(dx))^2)dx.

The graph of a piecewise linear function of two variables on a polygonal domain is a piecewise-linear surface. The one-variable graph is its one-dimensional analog.


See also

Linear Function, Piecewise Constant Function, Piecewise Function, Piecewise-Linear Surface

Portions of this entry contributed by Stuart Wilson

Explore with Wolfram|Alpha

Cite this as:

Weisstein, Eric W. and Wilson, Stuart. "Piecewise Linear Function." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/PiecewiseLinearFunction.html

Subject classifications