Introduction

In the context of spatial random effects modeled via a discretized Gaussian Markov Random Field (GMRF), the spatial field \(w(s)\) is constructed as:

\[ w(s) = \sum_{g=1}^{G} \xi_g(s) \, \tilde{w}_g \]

where: - \(G\) = total number of vertices in the triangulation - \(\{\xi_g(s)\}\) = basis functions - \(\{\tilde{w}_g\}\) = zero-mean Gaussian random variables forming a GMRF

The basis functions are chosen to be piecewise linear on each triangle. This document explains what this means and why indicator functions cannot be used instead.


Definition of Piecewise Linear Basis Functions

For a fixed basis function \(\xi_g(s)\) associated with a specific vertex \(g\):

  • At vertex \(g\): \(\xi_g(s) = 1\) (when \(s\) is exactly at vertex \(g\))
  • At any other vertex \(h \neq g\): \(\xi_g(s) = 0\) (when \(s\) is at vertex \(h\))
  • Inside any triangle: \(\xi_g(s)\) decreases linearly from 1 at vertex \(g\) to 0 along the opposite edge

Geometric Shape

If you plot \(\xi_g(s)\) over the 2D domain, it looks like a tent or pyramid: - Peak of height 1 at its own vertex \(g\) - Zero at all neighboring vertices - Forms flat, sloping planes across each triangle that contains \(g\)

Concrete Example with 3 Vertices

Consider a triangle with vertices \(A, B, C\):

Basis Function Value at A Value at B Value at C
\(\xi_A(s)\) 1 0 0
\(\xi_B(s)\) 0 1 0
\(\xi_C(s)\) 0 0 1
  • \(\xi_A(s)\): Inside the triangle, decreases linearly from 1 at \(A\) to 0 along edge \(BC\)
  • \(\xi_B(s)\): Inside the triangle, decreases linearly from 1 at \(B\) to 0 along edge \(AC\)
  • \(\xi_C(s)\): Inside the triangle, decreases linearly from 1 at \(C\) to 0 along edge \(AB\)

At the midpoint of edge \(BC\), \(\xi_A = 0\).


Comparison: Indicator Function

An indicator function for vertex \(g\) would be:

\[ \xi_g(s) = \begin{cases} 1 & \text{if } s \text{ is exactly at vertex } g \\ 0 & \text{otherwise} \end{cases} \]

This is essentially a “spike” of zero width, with no support on edges or triangle interiors.


Why Indicator Functions Fail

Property Piecewise Linear (Tent) Indicator (Spike)
Continuity of \(w(s)\) Continuous everywhere Discontinuous; zero almost everywhere
Interpolation between vertices Weighted average of three corner values No interpolation; \(w(s)=0\) between vertices
Gradients / derivatives Well-defined (piecewise constant) Not defined (Dirac delta)
Spatial correlation Controlled by GMRF precision matrix Pure white noise at vertices, zero elsewhere

What Happens with Indicator Functions?

If indicator functions were used:

\[ w(s) = \sum_{g=1}^{G} \xi_g(s) \tilde{w}_g \]

  • At vertex \(A\): \(w(A) = \tilde{w}_A\)
  • At vertex \(B\): \(w(B) = \tilde{w}_B\)
  • At any non-vertex point \(s\): \(w(s) = 0\)

The field would be zero everywhere except at discrete vertex points — completely useless for representing a continuous spatial random field.


Why Piecewise Linear is Necessary

The piecewise linear basis functions are the simplest choice that provides:

  1. Continuity: \(w(s)\) is continuous across the entire domain
  2. Interpolation: Any point inside a triangle gets a weighted average of the three \(\tilde{w}_g\) at its corners
  3. Differentiability: Gradients exist (piecewise constant), essential for SPDE approaches involving differential operators like the Laplacian
  4. Local dependence: Value at any point depends only on the three vertices of its containing triangle

1D Analogy

Think of approximating a smooth curve \(f(x)\) on a line divided into intervals:

  • Piecewise linear (“hat functions”): Produces a continuous, connected line — a good approximation
  • Indicator functions: Just disconnected spikes — a terrible approximation

Conclusion

Indicator functions cannot be used because \(w(s)\) would be zero almost everywhere, undefined on triangle interiors, and unable to represent the spatial continuity, smoothness, or gradients required by the GMRF and the underlying SPDE.

The piecewise linear basis function is the minimal choice that yields a continuous, differentiable (piecewise), interpolating spatial field with local dependence structure suitable for GMRF modeling.