Piecewise linear function (source code)

= Piecewise linear function
{wiki=Piecewise_linear_function}

A piecewise linear function is a function composed of multiple linear segments. Each segment is defined by a linear equation over a specific interval in its domain. Essentially, the function "pieces together" several lines to create a graph that can take various forms depending on the specified intervals and the slopes of the lines.