Tutorials › Graph Theory (Undergraduate) › The Laplacian Quadratic Form And Edge Energy

Adjacency and Laplacian Matrices · Tutorial 623 of 799

The Laplacian Quadratic Form And Edge Energy

Learn to compute Laplacian energy from edge differences and prove that zero energy means the vector is constant on each connected component.

Intermediate 10 min read

What You'll Learn

  • Derive the edge-sum formula for the Laplacian quadratic form.
  • Explain why the formula is independent of how edges are oriented.
  • Calculate energy both from edges and from a Laplacian matrix.
  • Characterize zero-energy vectors on connected and disconnected graphs.
  • Identify common errors involving signs and double-counting.

From the Laplacian to Edge Energy

The graph Laplacian turns local differences between neighboring vertex values into a single quadratic quantity. Its quadratic form measures how much a real-valued vector changes across the edges: a vector that assigns similar values to adjacent vertices has small energy, while a vector with large jumps across edges has larger energy. This tutorial derives that interpretation directly from the definition of the Laplacian and uses it to characterize exactly when the energy is zero.

Throughout, graphs are finite and simple, and vectors are real-valued. For a graph \(G=(V,E)\), the degree matrix \(\mathbf{D}\) has \(\deg(v)\) in the diagonal entry indexed by \(v\), and zeros elsewhere. The adjacency matrix \(\mathbf{A}\) has entry \(1\) at \(u,v\) when \(uv\in E\), and \(0\) otherwise. The Laplacian is \(\mathbf{L}=\mathbf{D}-\mathbf{A}\). We write \(x_v\) for the coordinate of a vector \(x\) at vertex \(v\).

Definition: The Laplacian energy of a real vector \(x=(x_v)_{v\in V}\) is the quadratic form \(x^{\mathsf T}\mathbf{L}x\). For an edge \(uv\), its contribution to the edge-energy sum is the squared difference \((x_u-x_v)^2\).

The word “energy” here is a name for this particular quadratic form; no physical interpretation is needed. The crucial feature is that the contribution of an edge depends only on the difference between the values at its endpoints.

The Edge-Energy Identity

Theorem: For every finite simple undirected graph \(G=(V,E)\) and every real vector \(x=(x_v)_{v\in V}\), $$ x^{\mathsf T}\mathbf{L}x=\sum_{uv\in E}(x_u-x_v)^2. $$

Proof. Since \(\mathbf{L}=\mathbf{D}-\mathbf{A}\), expand the quadratic form as $$ x^{\mathsf T}\mathbf{L}x =\sum_{v\in V}\deg(v)x_v^2-\sum_{u\in V}\sum_{v\in V} A_{uv}x_ux_v. $$ In the first sum, \(x_v^2\) occurs once for each edge incident with \(v\). Thus the first sum can be written \(\sum_{uv\in E}(x_u^2+x_v^2)\). In the second sum, each undirected edge \(uv\) contributes twice: once as \(A_{uv}x_ux_v\) and once as \(A_{vu}x_vx_u\). Because \(A_{uv}=A_{vu}=1\), the second sum is \(2\sum_{uv\in E}x_ux_v\). Subtracting gives $$ x^{\mathsf T}\mathbf{L}x =\sum_{uv\in E}(x_u^2+x_v^2-2x_ux_v) =\sum_{uv\in E}(x_u-x_v)^2. $$ The final equality uses \(a^2+b^2-2ab=(a-b)^2\) for each edge. If \(V\) is empty, both sums are empty and equal to zero, so the identity also holds in that case. \(\square\)

This identity also explains the connection with an oriented incidence matrix. If each edge is assigned a direction, the corresponding incidence-matrix coordinate of \(x\) is either \(x_u-x_v\) or \(x_v-x_u\), depending on that direction. Squaring removes the sign, so the sum of squared incidence coordinates is the same edge energy, whatever orientations are chosen.

Worked Example: Energy on a Path

Let \(G\) have vertex set \(V=\{1,2,3,4\}\) and edge set \(E=\{12,23,34\}\), and let \(x=(1,3,2,0)^{\mathsf T}\). The degrees are \(1,2,2,1\), so, in the vertex order \(1,2,3,4\), $$ \mathbf{L}= \begin{pmatrix} 1&-1&0&0\\ -1&2&-1&0\\ 0&-1&2&-1\\ 0&0&-1&1 \end{pmatrix}. $$

Compute the energy edge by edge. On \(12\), the difference is \(x_1-x_2=1-3=-2\), so the contribution is \((-2)^2=4\). On \(23\), the difference is \(x_2-x_3=3-2=1\), so the contribution is \(1^2=1\). On \(34\), the difference is \(x_3-x_4=2-0=2\), so the contribution is \(2^2=4\). Therefore the edge sum is \(4+1+4=9\).

Check directly with the matrix. Multiplication gives $$ \mathbf{L}x= \begin{pmatrix} 1-3\\ -1+6-2\\ -3+4-0\\ -2+0 \end{pmatrix} = \begin{pmatrix} -2\\3\\1\\-2 \end{pmatrix}. $$ Hence \(x^{\mathsf T}\mathbf{L}x=1(-2)+3(3)+2(1)+0(-2)=-2+9+2+0=9\), agreeing with the edge calculation.

When Is the Energy Zero?

Theorem: For a finite simple graph \(G=(V,E)\) and a real vector \(x\), \(x^{\mathsf T}\mathbf{L}x=0\) if and only if \(x_u=x_v\) for every edge \(uv\in E\). Equivalently, \(x\) is constant on each connected component of \(G\). This includes isolated vertices, on which the value may be arbitrary.

Here a path is a sequence of distinct vertices with consecutive vertices adjacent, and two vertices are in the same connected component when there is a path between them (a vertex is also considered connected to itself). The equivalence says that zero energy imposes one equality for every edge; along paths, those equalities force all the values in a component to agree.

Proof. By the edge-energy identity, \(x^{\mathsf T}\mathbf{L}x\) is a finite sum of nonnegative real numbers, one term \((x_u-x_v)^2\) for each edge. The sum equals zero if and only if every term equals zero: if any term were positive, the sum would be positive, and if all terms are zero, their sum is zero. For a real number, \((x_u-x_v)^2=0\) holds exactly when \(x_u=x_v\). This proves the first equivalence, including the case \(E=\varnothing\), where the edge condition is vacuous and the energy is zero.

Now suppose every edge has equal endpoint values. If two vertices lie in the same connected component, there is a path \(v_0,v_1,\ldots,v_k\) between them. For each \(i\) with \(0\le i<k\), the edge \(v_iv_{i+1}\) gives \(x_{v_i}=x_{v_{i+1}}\). Chaining these equalities gives \(x_{v_0}=x_{v_k}\). Thus the vector is constant on each component. Conversely, if \(x\) is constant on each component, the endpoints of every edge belong to the same component, so each edge has equal endpoint values and every squared difference is zero. For an isolated vertex there is no incident edge imposing a constraint, and its component consists of that vertex alone. If \(V=\varnothing\), the unique empty vector is constant on every component vacuously. \(\square\)

Worked Example: A Graph with Two Components and an Isolated Vertex

Let \(G\) have vertex set \(V=\{1,2,3,4,5,6\}\) and edge set \(E=\{12,23,45\}\). Its components are \(\{1,2,3\}\), \(\{4,5\}\), and the isolated vertex \(\{6\}\). Take \(x=(4,4,4,-3,-3,11)^{\mathsf T}\).

The edge differences are \(x_1-x_2=4-4=0\), \(x_2-x_3=4-4=0\), and \(x_4-x_5=-3-(-3)=0\). The energy is therefore \(0^2+0^2+0^2=0\). The vector is constant on each component: its values are \(4\), \(-3\), and \(11\), respectively. The isolated vertex may indeed carry the value \(11\), since no edge touches it.

As a check with the matrix, the degrees are \(1,2,1,1,1,0\), and $$ \mathbf{L}x= \begin{pmatrix} 4-4\\ 2(4)-4-4\\ 4-4\\ -3-(-3)\\ -3-(-3)\\ 0 \end{pmatrix} = \begin{pmatrix}0\\0\\0\\0\\0\\0\end{pmatrix}. $$ Thus \(x^{\mathsf T}\mathbf{L}x=0\), as before.

Now change only the second coordinate and take \(y=(4,5,4,-3,-3,11)^{\mathsf T}\). The edge differences are \(4-5=-1\), \(5-4=1\), and \(-3-(-3)=0\), so the energy is \((-1)^2+1^2+0^2=2\). Directly, \(\mathbf{L}y=(-1,2,-1,0,0,0)^{\mathsf T}\), and \(y^{\mathsf T}\mathbf{L}y=4(-1)+5(2)+4(-1)+(-3)(0)+(-3)(0)+11(0)=-4+10-4=2\). The values differ across edges \(12\) and \(23\), and those differences account for all the energy.

Reading the Formula and Avoiding a Pitfall

Every edge contributes a nonnegative amount. An edge contributes zero exactly when its endpoints have the same value; changing the values at vertices that are not joined by a path does not, by itself, create energy between those components. The formula is also unchanged if the endpoints of an edge are written in the opposite order, because \((x_u-x_v)^2=(x_v-x_u)^2\).

Common mistake: counting an undirected edge twice. In the path example, the three edge contributions are \(4\), \(1\), and \(4\), so the energy is \(9\). A mistaken calculation might list both \(12\) and \(21\), both \(23\) and \(32\), and both \(34\) and \(43\) as separate edges, giving \(2(4+1+4)=18\). That is not the sum over \(E\): each undirected edge appears once in the edge sum. The adjacency-matrix part of the proof does count each edge twice, but that is precisely why it gives the term \(2x_ux_v\), which combines with the degree terms to produce one squared difference per edge.

The identity is useful whenever a Laplacian quadratic form needs a direct interpretation: instead of multiplying matrices, one can inspect differences across edges. Conversely, it lets us recognize zero energy without solving a matrix equation. The result here concerns the quadratic form itself; the componentwise description also indicates why disconnected graphs allow independent constant values on their different components.

Check Your Understanding

Use the edge-energy identity in each question, and state any assumptions you need.

  1. For the graph with \(V=\{a,b,c\}\), \(E=\{ab,bc\}\), and \(x=(2,-1,3)^{\mathsf T}\), calculate the edge energy and verify it using \(\mathbf{L}\).
  2. Prove directly from the edge-energy identity that \(x^{\mathsf T}\mathbf{L}x\ge 0\) for every real vector \(x\).
  3. For a graph with no edges, what does the identity say about the energy of an arbitrary vector?
  4. Suppose \(x_u=x_v\) on every edge. Explain why values at the ends of any path are equal.
  5. Give a concrete example of a zero-energy vector on a disconnected graph whose values are not all equal.