Suppose I have a sequence of numbers $x = (x_1, x_2, \dots x_n)$.
I’m interested in the sum of squared differences: $$\sum_{i=1}^{n-1} (x_{i+1} - x_i)^2.$$
I can treat the sequence as a function on the $n$ vertices of a path graph $G$ and form the Laplacian matrix $L_G$. Then the sum above is simply $x^\top L_G x$.
Taking it one step further, I’d like to look at the second differences: $$\sum_{i=2}^{n-1} (x_{i+1} - 2x_i + x_{i-1})^2.$$ Again, this can be expressed of the form $x^\top M x$ for a matrix $M$.
My question is: can $M$ be defined for a more general graph than just the path graph in a meaningful/interesting way? It’s almost like the “square” of the Laplacian, but not exactly.