Rectangle Piecewise Linear Approximation
- 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 , , of an interval , where each subinterval may be viewed as a “rectangle” on the -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 , a partition
induces the finite-dimensional space of CPWL functions. In the hat-function basis , any can be written as
Two canonical approximants are the linear interpolant
0
which matches 1 at the nodes, and the 2 orthogonal projection 3, characterized by
4
In nodal coordinates, 5, with coefficients obtained from a tridiagonal Gram system 6 (Berjón et al., 2015).
For discretized curves 7, the corresponding spline-type constructions are the 0-spline
8
and the 1-spline
9
which are, respectively, piecewise constant and piecewise linear discretizations of a curve 0. The associated curve metric is
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 2 of 3 into dyadic rectangles 4, and on each 5 a tensor-product polynomial with coordinate-wise degree bounded by 6. The model space is
7
The piecewise linear specialization is 8 for all 9 (Akakpo, 2011).
2. Error metrics and approximation rates
In the univariate CPWL setting, the central local error analysis is carried out in the 0 norm. If 1, 2, 3, and 4, then the interpolant satisfies
5
In the asymptotic regime where 6 is nearly constant on 7, the local squared interpolation error obeys
8
For an unconstrained best linear segment on the same interval, the asymptotic squared error is
9
and the orthogonal projection 0 asymptotically achieves the same constant. Consequently,
1
These formulas identify the standard interpolation/projection dichotomy: interpolation preserves nodal samples, while projection improves the 2 constant by the asymptotic factor 3 (Berjón et al., 2015).
The same source derives a curvature-driven partition design. If
4
then the near-optimal non-uniform partition 5 is defined by
6
Equivalently, the local knot density satisfies
7
With this choice, both interpolant and projection retain the global rate 8, 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 9 and the piecewise constant class 0 is bounded by 1, while the Hausdorff distance to the piecewise linear class 2 is bounded by 3 when 4. For a single curve sampled uniformly, the explicit bounds are
5
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 6, the piecewise linear interpolant is an under-approximation, and the error can be expressed as the area loss
7
For general increasing functions, the paper replaces this by the smooth squared integral error
8
where each 9 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
0
which converts the ordering constraints into the monotone nonnegative cone
1
One exact structural result is that for the concave quadratic
2
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 3, exact least-squares approximation with a small number of segments admits a dynamic-programming solution. The approximant
4
is optimized either under a fixed-segment constraint or under an 5-type regularization. The key object is a hybrid value function 6, representable as a finite lower envelope of positive definite quadratics,
7
This yields an exact algorithm whose complexity is bounded by 8, with empirical evidence that the representation size 9 is at most linear in 0 (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 1 is 2-biLipschitz, then for every 3 there exists a finitely piecewise linear 4-biLipschitz function 5 such that
6
The same statement holds for closed curves 7. The result improves an earlier 8-biLipschitz polygonal approximation to the sharp 9 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 0 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 1, rectangle piecewise linear approximation becomes a problem of nonlinear approximation over partitions into dyadic rectangles. For anisotropic smoothness 2, the relevant dyadic system is
3
and the harmonic mean
4
governs approximation rates. If 5 and
6
then for every 7 large enough,
8
In the piecewise linear specialization 9, this yields a full anisotropic rectangle-based affine approximation theory with the rate 0. In the associated density-estimation problem, the selected dyadic piecewise polynomial estimator is minimax rate-optimal up to a constant factor when 1 is fixed, which includes the piecewise linear case 2 (Akakpo, 2011).
A more optimization-oriented multivariate model is piecewise-convex approximation (PwCA). Here the domain is a box
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 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 5 kernel
6
is approximated on the scalar distance interval 7 by a piecewise linear function 8 built on breakpoints 9. The MIQP encoding uses convex-combination variables 00 and binary variables 01 so that
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 03 satisfies 04, and the induced Gaussian-process errors obey
05
Under the schedule 06, the cumulative regret retains the order 07 (Xie et al., 2024).
These computational realizations clarify a recurring structural point. In one-dimensional function evaluation, “rectangle” usually means the interval 08; in dyadic approximation theory, it means anisotropic Cartesian cells 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.