In mathematics and statistics, a piecewise linear, PL or segmented function is a real-valued function defined on the real numbers or a segment thereof, whose graph is composed of straight-line sections. It is a piecewise-defined function, each of whose pieces is an affine function. In mathematics and statistics, a piecewise linear, PL or segmented function is a real-valued function defined on the real numbers or a segment thereof, whose graph is composed of straight-line sections. It is a piecewise-defined function, each of whose pieces is an affine function. Usually – but not always – the function is assumed to be continuous; in that case, its graph is a polygonal curve.