If a matrix `U`

is a function *U(x,y)* that
is evaluated at the points of a square grid, then `4*del2(U)`

is
a finite difference approximation of Laplace's differential operator
applied to *U*,

$$L=\frac{\Delta U}{4}=\frac{1}{4}\left(\frac{{\partial}^{2}U}{\partial {x}^{2}}+\frac{{\partial}^{2}U}{\partial {y}^{2}}\right).$$

For functions of more variables, *U(x,y,z,...)*,
the discrete Laplacian `del2(U)`

calculates second-derivatives
in each dimension,

$$L=\frac{\Delta U}{2N}=\frac{1}{2N}\left(\frac{{\partial}^{2}U}{\partial {x}^{2}}+\frac{{\partial}^{2}U}{\partial {y}^{2}}+\frac{{\partial}^{2}U}{\partial {z}^{2}}+\mathrm{...}\right),$$

where *N* is the number of dimensions in *U* and $$N\ge 2$$.