In two dimensions, although the same reasoning applies in any dimension, the problem of finding the maximum must be extended to progressively more complex functions.
The most immediate solution is to analyze the point independently along each spatial direction; in this way, the problem is reduced entirely to the one-dimensional case.
If a larger neighborhood is to be exploited, the next simplest model to use is the paraboloid, a quadratic written in the form
 |
(1.135) |
where the points
are always understood as offsets from the point being modeled, and
is the value taken by the function at that point.
Compared with the solution in which the axes are completely independent, this equation also allows points not lying on the axes to contribute actively to the solution.
Clearly, if only the five points along the axes are included in the system, the solution is exactly the same as in the case considered in the previous section.
Each data point therefore provides a constraint of the form
 |
(1.136) |
and all the constraints together generate a potentially overdetermined linear system.
In this case, there are no notable results that yield a closed-form solution; the simplest approach is to precompute a factorization of the system formed from the elements
, representing a particular neighborhood of
, in order to speed up the subsequent solution once the values
are known.
The equation (1.135) has zero gradient at the point
 |
(1.137) |
exactly as in the one-dimensional case, since the two components, namely the one along
and the one along
, remain separate during evaluation. This result can be extended to n-dimensional cases.
Paolo medici
2026-10-01