Discretiazation of a PDE
You might be wondering where such kind of matrix structures appear. A simple example is the discretization of PDE (partial differential equations) such as:
$$ -\nabla u = f(x) $$
If we consider a discretization with finite differences you can approximate your u_i as:
$$ u’’(x) \approx \frac{u_{i-1} - u_i - u_{i+1}}{h^2} $$.
In a 2D setting you can apply the same discretization of course for the y
-direction in the same manner.