Papers
Topics
Authors
Recent
Search
2000 character limit reached

Rectangle Piecewise Linear Approximation

Updated 10 July 2026
  • Rectangle piecewise linear approximation is a family of partition-based affine methods that represent functions or curves using piecewise linear segments over interval or box-like cells.
  • It integrates techniques from numerical analysis, approximation theory, optimization, and computational geometry to analyze error metrics and guide adaptive partitioning strategies.
  • Optimized breakpoint selection methods, including curvature-driven designs and dynamic programming, enhance accuracy and computational efficiency in both univariate and multivariate settings.

Rectangle piecewise linear approximation denotes a family of approximation schemes in which a target function or curve is represented by affine pieces on interval or box-like cells. In univariate approximation, the basic object is a continuous piecewise linear (CPWL) function on a partition T={Ii}i=1NT=\{I_i\}_{i=1}^N, Ii=[xi1,xi]I_i=[x_{i-1},x_i], of an interval I=[a,b]I=[a,b], where each subinterval may be viewed as a “rectangle” on the xx-axis; in geometric discretization, the related models are piecewise constant step functions and polygonal curves; in multivariate approximation, the cells are dyadic rectangles or box domains partitioned into convex regions (Berjón et al., 2015, Gournay et al., 2019, Akakpo, 2011, Birkelbach et al., 2023). Taken together, these uses suggest that the expression refers less to a single canonical construction than to a class of partition-based affine approximations whose mathematical emphasis varies across numerical analysis, approximation theory, optimization, and computational geometry.

1. Foundational constructions

For a scalar function f:I=[a,b]Rf:I=[a,b]\to\mathbb R, a partition

T={Ii}i=1N,Ii=[xi1,xi],a=x0<x1<<xN=bT=\{I_i\}_{i=1}^N,\qquad I_i=[x_{i-1},x_i],\quad a=x_0<x_1<\dots<x_N=b

induces the finite-dimensional space VV of CPWL functions. In the hat-function basis {φi}i=0N\{\varphi_i\}_{i=0}^N, any vVv\in V can be written as

v(x)=i=0Nv(xi)φi(x).v(x)=\sum_{i=0}^N v(x_i)\,\varphi_i(x).

Two canonical approximants are the linear interpolant

Ii=[xi1,xi]I_i=[x_{i-1},x_i]0

which matches Ii=[xi1,xi]I_i=[x_{i-1},x_i]1 at the nodes, and the Ii=[xi1,xi]I_i=[x_{i-1},x_i]2 orthogonal projection Ii=[xi1,xi]I_i=[x_{i-1},x_i]3, characterized by

Ii=[xi1,xi]I_i=[x_{i-1},x_i]4

In nodal coordinates, Ii=[xi1,xi]I_i=[x_{i-1},x_i]5, with coefficients obtained from a tridiagonal Gram system Ii=[xi1,xi]I_i=[x_{i-1},x_i]6 (Berjón et al., 2015).

For discretized curves Ii=[xi1,xi]I_i=[x_{i-1},x_i]7, the corresponding spline-type constructions are the 0-spline

Ii=[xi1,xi]I_i=[x_{i-1},x_i]8

and the 1-spline

Ii=[xi1,xi]I_i=[x_{i-1},x_i]9

which are, respectively, piecewise constant and piecewise linear discretizations of a curve I=[a,b]I=[a,b]0. The associated curve metric is

I=[a,b]I=[a,b]1

This setup makes explicit the close relation between “rectangular” approximation in the step-function sense and polygonal approximation in the affine sense (Gournay et al., 2019).

A distinct but related multivariate construction uses partitions I=[a,b]I=[a,b]2 of I=[a,b]I=[a,b]3 into dyadic rectangles I=[a,b]I=[a,b]4, and on each I=[a,b]I=[a,b]5 a tensor-product polynomial with coordinate-wise degree bounded by I=[a,b]I=[a,b]6. The model space is

I=[a,b]I=[a,b]7

The piecewise linear specialization is I=[a,b]I=[a,b]8 for all I=[a,b]I=[a,b]9 (Akakpo, 2011).

2. Error metrics and approximation rates

In the univariate CPWL setting, the central local error analysis is carried out in the xx0 norm. If xx1, xx2, xx3, and xx4, then the interpolant satisfies

xx5

In the asymptotic regime where xx6 is nearly constant on xx7, the local squared interpolation error obeys

xx8

For an unconstrained best linear segment on the same interval, the asymptotic squared error is

xx9

and the orthogonal projection f:I=[a,b]Rf:I=[a,b]\to\mathbb R0 asymptotically achieves the same constant. Consequently,

f:I=[a,b]Rf:I=[a,b]\to\mathbb R1

These formulas identify the standard interpolation/projection dichotomy: interpolation preserves nodal samples, while projection improves the f:I=[a,b]Rf:I=[a,b]\to\mathbb R2 constant by the asymptotic factor f:I=[a,b]Rf:I=[a,b]\to\mathbb R3 (Berjón et al., 2015).

The same source derives a curvature-driven partition design. If

f:I=[a,b]Rf:I=[a,b]\to\mathbb R4

then the near-optimal non-uniform partition f:I=[a,b]Rf:I=[a,b]\to\mathbb R5 is defined by

f:I=[a,b]Rf:I=[a,b]\to\mathbb R6

Equivalently, the local knot density satisfies

f:I=[a,b]Rf:I=[a,b]\to\mathbb R7

With this choice, both interpolant and projection retain the global rate f:I=[a,b]Rf:I=[a,b]\to\mathbb R8, but with better constants than the uniform partition (Berjón et al., 2015).

For Sobolev-bounded curve classes, the approximation problem is formulated set-wise. In the periodic case, the Hausdorff distance between the Sobolev multiball f:I=[a,b]Rf:I=[a,b]\to\mathbb R9 and the piecewise constant class T={Ii}i=1N,Ii=[xi1,xi],a=x0<x1<<xN=bT=\{I_i\}_{i=1}^N,\qquad I_i=[x_{i-1},x_i],\quad a=x_0<x_1<\dots<x_N=b0 is bounded by T={Ii}i=1N,Ii=[xi1,xi],a=x0<x1<<xN=bT=\{I_i\}_{i=1}^N,\qquad I_i=[x_{i-1},x_i],\quad a=x_0<x_1<\dots<x_N=b1, while the Hausdorff distance to the piecewise linear class T={Ii}i=1N,Ii=[xi1,xi],a=x0<x1<<xN=bT=\{I_i\}_{i=1}^N,\qquad I_i=[x_{i-1},x_i],\quad a=x_0<x_1<\dots<x_N=b2 is bounded by T={Ii}i=1N,Ii=[xi1,xi],a=x0<x1<<xN=bT=\{I_i\}_{i=1}^N,\qquad I_i=[x_{i-1},x_i],\quad a=x_0<x_1<\dots<x_N=b3 when T={Ii}i=1N,Ii=[xi1,xi],a=x0<x1<<xN=bT=\{I_i\}_{i=1}^N,\qquad I_i=[x_{i-1},x_i],\quad a=x_0<x_1<\dots<x_N=b4. For a single curve sampled uniformly, the explicit bounds are

T={Ii}i=1N,Ii=[xi1,xi],a=x0<x1<<xN=bT=\{I_i\}_{i=1}^N,\qquad I_i=[x_{i-1},x_i],\quad a=x_0<x_1<\dots<x_N=b5

This makes the rectangle-versus-polyline contrast quantitative: step functions achieve first-order accuracy, while polygonal approximation reaches second order under one additional derivative (Gournay et al., 2019).

3. Knot placement and breakpoint optimization

The accuracy of rectangle piecewise linear approximation depends decisively on breakpoint location. In nonlinear optimization, breakpoint generation is treated as a fundamental task. An explicit recent example is the rotational adjusting method (RAM), proposed as an optimal breakpoint selection method that minimizes the approximation error between the original function and the piecewise linear function with a limited number of pieces, for both convex and concave functions. RAM rotationally adjusts the location of breakpoints based on adjacent breakpoints, the optimal positions are reached after several iterations, the optimality of the method is proved, and numerical experiments are conducted on the logarithmic function (Liu, 2024).

A complementary formulation studies knot locating by direct nonlinear programming. For a concave increasing function T={Ii}i=1N,Ii=[xi1,xi],a=x0<x1<<xN=bT=\{I_i\}_{i=1}^N,\qquad I_i=[x_{i-1},x_i],\quad a=x_0<x_1<\dots<x_N=b6, the piecewise linear interpolant is an under-approximation, and the error can be expressed as the area loss

T={Ii}i=1N,Ii=[xi1,xi],a=x0<x1<<xN=bT=\{I_i\}_{i=1}^N,\qquad I_i=[x_{i-1},x_i],\quad a=x_0<x_1<\dots<x_N=b7

For general increasing functions, the paper replaces this by the smooth squared integral error

T={Ii}i=1N,Ii=[xi1,xi],a=x0<x1<<xN=bT=\{I_i\}_{i=1}^N,\qquad I_i=[x_{i-1},x_i],\quad a=x_0<x_1<\dots<x_N=b8

where each T={Ii}i=1N,Ii=[xi1,xi],a=x0<x1<<xN=bT=\{I_i\}_{i=1}^N,\qquad I_i=[x_{i-1},x_i],\quad a=x_0<x_1<\dots<x_N=b9 is the square of the local signed integral error. The resulting knot-location problem is nonconvex; it is solved by sequential quadratic programming and by a spectral projected gradient method after the transformation

VV0

which converts the ordering constraints into the monotone nonnegative cone

VV1

One exact structural result is that for the concave quadratic

VV2

the optimal knot locations are uniformly spaced. Outside this special case, the numerical experiments show that optimized non-uniform knots cluster where the function bends more sharply (Ugaz et al., 2019).

When breakpoints are constrained to a fixed candidate grid VV3, exact least-squares approximation with a small number of segments admits a dynamic-programming solution. The approximant

VV4

is optimized either under a fixed-segment constraint or under an VV5-type regularization. The key object is a hybrid value function VV6, representable as a finite lower envelope of positive definite quadratics,

VV7

This yields an exact algorithm whose complexity is bounded by VV8, with empirical evidence that the representation size VV9 is at most linear in {φi}i=0N\{\varphi_i\}_{i=0}^N0 (Troeng et al., 2018).

4. Geometric curve approximation and boundary discretization

In geometric function theory, piecewise linear approximation is constrained not only by fidelity but also by metric distortion. If {φi}i=0N\{\varphi_i\}_{i=0}^N1 is {φi}i=0N\{\varphi_i\}_{i=0}^N2-biLipschitz, then for every {φi}i=0N\{\varphi_i\}_{i=0}^N3 there exists a finitely piecewise linear {φi}i=0N\{\varphi_i\}_{i=0}^N4-biLipschitz function {φi}i=0N\{\varphi_i\}_{i=0}^N5 such that

{φi}i=0N\{\varphi_i\}_{i=0}^N6

The same statement holds for closed curves {φi}i=0N\{\varphi_i\}_{i=0}^N7. The result improves an earlier {φi}i=0N\{\varphi_i\}_{i=0}^N8-biLipschitz polygonal approximation to the sharp {φi}i=0N\{\varphi_i\}_{i=0}^N9 form (Pratelli et al., 2015).

This theorem is used explicitly as a boundary discretization tool in rectangle- or grid-based approximation of higher-dimensional mappings. On each side of a square or rectangle, one has a one-dimensional boundary map; replacing it by a polygonal map with bi-Lipschitz constant vVv\in V0 preserves boundary injectivity and gives compatible edge data for piecewise affine interior extensions. The paper also discusses snapping polygonal vertices to a rectangular grid, with the caveat that this step is not proved explicitly there; the stated implication is that sufficiently small perturbations of vertices preserve the bi-Lipschitz constants up to the desired tolerance (Pratelli et al., 2015).

A different but complementary geometric framework studies Hausdorff distances between continuous Sobolev balls and sets of piecewise constant or piecewise linear discretizations. There the emphasis is not on bi-Lipschitz control but on norm-preserving discretization and on constructive smoothing back to regular curves via uniformly spaced B-splines whose coefficients are described in terms of Eulerian numbers (Gournay et al., 2019).

5. Multivariate rectangles, anisotropy, and piecewise-convex box models

On vVv\in V1, rectangle piecewise linear approximation becomes a problem of nonlinear approximation over partitions into dyadic rectangles. For anisotropic smoothness vVv\in V2, the relevant dyadic system is

vVv\in V3

and the harmonic mean

vVv\in V4

governs approximation rates. If vVv\in V5 and

vVv\in V6

then for every vVv\in V7 large enough,

vVv\in V8

In the piecewise linear specialization vVv\in V9, this yields a full anisotropic rectangle-based affine approximation theory with the rate v(x)=i=0Nv(xi)φi(x).v(x)=\sum_{i=0}^N v(x_i)\,\varphi_i(x).0. In the associated density-estimation problem, the selected dyadic piecewise polynomial estimator is minimax rate-optimal up to a constant factor when v(x)=i=0Nv(xi)φi(x).v(x)=\sum_{i=0}^N v(x_i)\,\varphi_i(x).1 is fixed, which includes the piecewise linear case v(x)=i=0Nv(xi)φi(x).v(x)=\sum_{i=0}^N v(x_i)\,\varphi_i(x).2 (Akakpo, 2011).

A more optimization-oriented multivariate model is piecewise-convex approximation (PwCA). Here the domain is a box

v(x)=i=0Nv(xi)φi(x).v(x)=\sum_{i=0}^N v(x_i)\,\varphi_i(x).3

and the approximation splits the box into exactly two regions separated by an interface hyperplane. In each region, the function is approximated by the maximum of affine hyperplanes; continuity across the interface is enforced structurally through a rotation-and-shift parameterization of paired hyperplanes. The principal MILP advantage is that the corresponding formulation requires only one auxiliary binary variable, in contrast to simplex-based piecewise linear approximation, whose formulations require more binaries and more auxiliary variables. The paper emphasizes that PwCA is a two-region approximation, not a full tessellation into axis-aligned rectangles, although the ambient domain is rectangular (Birkelbach et al., 2023).

6. Computational realizations: GPU, MILP, and MIQP

One computational line is hardware-oriented CPWL evaluation. For GPU-based applications, the univariate approximation is stored by nodal values in a 1D texture. On a uniform partition, evaluation reduces to constant-time index computation and hardware linear interpolation; on a non-uniform partition, interval search is required, typically by binary search. The theoretical appeal of the optimized partition v(x)=i=0Nv(xi)φi(x).v(x)=\sum_{i=0}^N v(x_i)\,\varphi_i(x).4 is therefore balanced against the practical advantage of uniform partitions on current GPUs (Berjón et al., 2015).

A second line embeds rectangle piecewise linear approximation directly into mathematical programming. In acquisition-function optimization for Bayesian optimization, the Matérn v(x)=i=0Nv(xi)φi(x).v(x)=\sum_{i=0}^N v(x_i)\,\varphi_i(x).5 kernel

v(x)=i=0Nv(xi)φi(x).v(x)=\sum_{i=0}^N v(x_i)\,\varphi_i(x).6

is approximated on the scalar distance interval v(x)=i=0Nv(xi)φi(x).v(x)=\sum_{i=0}^N v(x_i)\,\varphi_i(x).7 by a piecewise linear function v(x)=i=0Nv(xi)φi(x).v(x)=\sum_{i=0}^N v(x_i)\,\varphi_i(x).8 built on breakpoints v(x)=i=0Nv(xi)φi(x).v(x)=\sum_{i=0}^N v(x_i)\,\varphi_i(x).9. The MIQP encoding uses convex-combination variables Ii=[xi1,xi]I_i=[x_{i-1},x_i]00 and binary variables Ii=[xi1,xi]I_i=[x_{i-1},x_i]01 so that

Ii=[xi1,xi]I_i=[x_{i-1},x_i]02

with adjacency constraints ensuring that only two adjacent breakpoints are active. This is a standard interval-based rectangle encoding in the scalar radius variable rather than a box partition in the full input space. The approximation error Ii=[xi1,xi]I_i=[x_{i-1},x_i]03 satisfies Ii=[xi1,xi]I_i=[x_{i-1},x_i]04, and the induced Gaussian-process errors obey

Ii=[xi1,xi]I_i=[x_{i-1},x_i]05

Under the schedule Ii=[xi1,xi]I_i=[x_{i-1},x_i]06, the cumulative regret retains the order Ii=[xi1,xi]I_i=[x_{i-1},x_i]07 (Xie et al., 2024).

These computational realizations clarify a recurring structural point. In one-dimensional function evaluation, “rectangle” usually means the interval Ii=[xi1,xi]I_i=[x_{i-1},x_i]08; in dyadic approximation theory, it means anisotropic Cartesian cells Ii=[xi1,xi]I_i=[x_{i-1},x_i]09; in mixed-integer formulations, it often means the interval cell selected by binary variables in a convex-combination encoding; and in box-domain convexification, it can denote the ambient hyperrectangle even when the internal partition is not axis-aligned. This suggests that rectangle piecewise linear approximation is best understood as a partition-centric methodology whose invariant core is local affine representation, but whose geometry, optimality criteria, and solver interfaces are field-dependent.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Rectangle Piecewise Linear Approximation.