In the mathematical field of graph theory, the Laplacian matrix, also called the graph Laplacian, admittance matrix, Kirchhoff matrix or discrete Laplacian, is a matrix representation of a graph. Named after Pierre-Simon Laplace, the graph Laplacian matrix can be viewed as a matrix form of the negative discrete Laplace operator on a graph approximating the negative continuous Laplacian obtained by the finite difference method.
The Laplacian matrix relates to many useful properties of a graph. Together with Kirchhoff's theorem, it can be used to calculate the number of spanning trees for a given graph. The sparsest cut of a graph can be approximated through the Fiedler vector — the eigenvector corresponding to the second smallest eigenvalue of the graph Laplacian — as established by Cheeger's inequality. The spectral decomposition of the Laplacian matrix allows constructing low dimensional embeddings that appear in many machine learning applications and determines a spectral layout in graph drawing. Graph-based signal processing is based on the graph Fourier transform that extends the traditional discrete Fourier transform by substituting the standard basis of complex sinusoids for eigenvectors of the Laplacian matrix of a graph corresponding to the signal.
The Laplacian matrix is the easiest to define for a simple graph, but more common in applications for an edge-weighted graph, i.e., with weights on its edges — the entries of the graph adjacency matrix. Spectral graph theory relates properties of a graph to a spectrum, i.e., eigenvalues, and eigenvectors of matrices associated with the graph, such as its adjacency matrix or Laplacian matrix. Imbalanced weights may undesirably affect the matrix spectrum, leading to the need of normalization — a column/row scaling of the matrix entries — resulting in normalized adjacency and Laplacian matrices.
G
n
v1,\ldots,vn
Li,j:=\begin{cases} \deg(vi)&if i=j\\ -1&if i ≠ j and viisadjacenttovj\\ 0&otherwise, \end{cases}
L=D-A,
where D is the degree matrix and A is the adjacency matrix of the graph. Since is a simple graph, only contains 1s or 0s and its diagonal elements are all 0s.
Here is a simple example of a labelled, undirected graph and its Laplacian matrix.
We observe for the undirected graph that both the adjacency matrix and the Laplacian matrix are symmetric, and that row- and column-sums of the Laplacian matrix are all zeros (which directly implies that the Laplacian matrix is singular).For directed graphs, either the indegree or outdegree might be used, depending on the application, as in the following example:
In the directed graph, both the adjacency matrix and the Laplacian matrix are asymmetric. In its Laplacian matrix, column-sums or row-sums are zero, depending on whether the indegree or outdegree has been used.The oriented incidence matrix B with element Bve for the vertex v and the edge e (connecting vertices and , with i ≠ j) is defined by
Bve=\left\{\begin{array}{rl} 1,&ifv=vi\\ -1,&ifv=vj\\ 0,&otherwise. \end{array}\right.
L=BBsf{T}
An alternative product
Bsf{T}B
The Laplacian matrix of a directed graph is by definition generally non-symmetric, while, e.g., traditional spectral clustering is primarily developed for undirected graphs with symmetric adjacency and Laplacian matrices. A trivial approach to apply techniques requiring the symmetry is to turn the original directed graph into an undirected graph and build the Laplacian matrix for the latter.
In the matrix notation, the adjacency matrix of the undirected graph could, e.g., be defined as a Boolean sum of the adjacency matrix
A
AT
A
A vertex with a large degree, also called a heavy node, results in a large diagonal entry in the Laplacian matrix dominating the matrix properties. Normalization is aimed to make the influence of such vertices more equal to that of other vertices, by dividing the entries of the Laplacian matrix by the vertex degrees. To avoid division by zero, isolated vertices with zero degrees are excluded from the process of the normalization.
The symmetrically normalized Laplacian matrix is defined as:
Lsym:=(D+)1/2L(D+)1/2=I-(D+)1/2A(D+)1/2,
D+
The elements of are thus given by
sym | |
L | |
i,j |
:=\begin{cases} 1&ifi=jand\deg(vi) ≠ 0\\ -
1 | |
\sqrt{\deg(vi)\deg(vj) |
The symmetrically normalized Laplacian matrix is symmetric if and only if the adjacency matrix is symmetric.
For a non-symmetric adjacency matrix of a directed graph, either of indegree and outdegree can be used for normalization:
The left (random-walk) normalized Laplacian matrix is defined as:
Lrw:=D+L=I-D+A,
D+
rw | |
L | |
i,j |
:=\begin{cases} 1&ifi=jand\deg(vi) ≠ 0\\ -
1 | |
\deg(vi) |
&ifi ≠ jandviisadjacenttovj\\ 0&otherwise. \end{cases}
Similarly, the right normalized Laplacian matrix is defined as
LD+=I-AD+
The left or right normalized Laplacian matrix is not symmetric if the adjacency matrix is symmetric, except for the trivial case of all isolated vertices. For example,
The example also demonstrates that ifG
D+A
Lrw:=D+L=I-D+A
Lrw
LD+=I-AD+
AD+
For a non-symmetric adjacency matrix of a directed graph, one also needs to choose indegree or outdegree for normalization:
The left out-degree normalized Laplacian with row-sums all 0 relates to right stochastic+A | |
D | |
out |
+ | |
AD | |
in |
Common in applications graphs with weighted edges are conveniently defined by their adjacency matrices where values of the entries are numeric and no longer limited to zeros and ones. In spectral clustering and graph-based signal processing, where graph vertices represent data points, the edge weights can be computed, e.g., as inversely proportional to the distances between pairs of data points, leading to all weights being non-negative with larger values informally corresponding to more similar pairs of data points. Using correlation and anti-correlation between the data points naturally leads to both positive and negative weights. Most definitions for simple graphs are trivially extended to the standard case of non-negative weights, while negative weights require more attention, especially in normalization.
The Laplacian matrix is defined by
L=D-A,
where D is the degree matrix and A is the adjacency matrix of the graph.
For directed graphs, either the indegree or outdegree might be used, depending on the application, as in the following example:
Graph self-loops, manifesting themselves by non-zero entries on the main diagonal of the adjacency matrix, are allowed but do not affect the graph Laplacian values.
For graphs with weighted edges one can define a weighted incidence matrix B and use it to construct the corresponding symmetric Laplacian as
L=BBsf{T}
We thus reuse the definition of the weightless incidence matrix B with element Bve for the vertex v and the edge e (connecting vertexes and , with i > j) defined by
Bve=\left\{\begin{array}{rl} 1,&ifv=vi\\ -1,&ifv=vj\\ 0,&otherwise. \end{array}\right.
We now also define a diagonal matrix W containing the edge weights. Even though the edges in the definition of B are technically directed, their directions can be arbitrary, still resulting in the same symmetric Laplacian matrix L defined as
L=BWBsf{T}
The construction is illustrated in the following example, where every edge is assigned the weight value i, with
Just like for simple graphs, the Laplacian matrix of a directed weighted graph is by definition generally non-symmetric. The symmetry can be enforced by turning the original directed graph into an undirected graph first before constructing the Laplacian. The adjacency matrix of the undirected graph could, e.g., be defined as a sum of the adjacency matrix
A
AT
A
Alternatively, the symmetric Laplacian matrix can be calculated from the two Laplacians using the indegree and outdegree, as in the following example:
The sum of the out-degree Laplacian transposed and the in-degree Laplacian equals to the symmetric Laplacian matrix.The goal of normalization is, like for simple graphs, to make the diagonal entries of the Laplacian matrix to be all unit, also scaling off-diagonal entries correspondingly. In a weighted graph, a vertex may have a large degree because of a small number of connected edges but with large weights just as well as due to a large number of connected edges with unit weights.
Graph self-loops, i.e., non-zero entries on the main diagonal of the adjacency matrix, do not affect the graph Laplacian values, but may need to be counted for calculation of the normalization factors.
The symmetrically normalized Laplacian is defined as
Lsym:=(D+)1/2L(D+)1/2=I-(D+)1/2A(D+)1/2,
where L is the unnormalized Laplacian, A is the adjacency matrix, D is the degree matrix, and
D+
The symmetrically normalized Laplacian is a symmetric matrix if and only if the adjacency matrix A is symmetric and the diagonal entries of D are nonnegative, in which case we can use the term the symmetric normalized Laplacian.
The symmetric normalized Laplacian matrix can be also written as
Lsym:=(D+)1/2L(D+)1/2=(D+)1/2BWBsf{T}(D+)1/2=SST
The random walk normalized Laplacian is defined as
Lrw:=D+L=I-D+A
where D is the degree matrix. Since the degree matrix D is diagonal, its inverse is simply defined as a diagonal matrix, having diagonal entries which are the reciprocals of the corresponding diagonal entries of D. For the isolated vertices (those with degree 0), a common choice is to set the corresponding element to 0. The matrix elements of are given by
rw | |
L | |
i,j |
:=\begin{cases} 1&if i=j and \deg(vi) ≠ 0\\ -
1 | |
\deg(vi) |
&if i ≠ j and viisadjacenttovj\\ 0&otherwise. \end{cases}
The name of the random-walk normalized Laplacian comes from the fact that this matrix is , where is simply the transition matrix of a random walker on the graph, assuming non-negative weights. For example, let denote the i-th standard basis vector. Then is a probability vector representing the distribution of a random walker's locations after taking a single step from vertex ; i.e., . More generally, if the vector is a probability distribution of the location of a random walker on the vertices of the graph, then is the probability distribution of the walker after steps.
The random walk normalized Laplacian can also be called the left normalized Laplacian
Lrw:=D+L
D+
P=D+A
In the less uncommonly used right normalized Laplacian
LD+=I-AD+
AD+
For a non-symmetric adjacency matrix of a directed graph, one also needs to choose indegree or outdegree for normalization:
The left out-degree normalized Laplacian with row-sums all 0 relates to right stochastic+A | |
D | |
out |
+ | |
AD | |
in |
Negative weights present several challenges for normalisation:
For an (undirected) graph G and its Laplacian matrix L with eigenvalues :
\begin{align} λi&=
sf{T}L | |
v | |
i |
vi\\ &=
sf{T}M | |
v | |
i |
sf{T}Mvi\\ &=\left(M
sf{T}\left(M | |
v | |
i\right) |
vi\right).\\ \end{align}
Because can be written as the inner product of the vector with itself, this shows that and so the eigenvalues of are all non-negative.
Lrw=
| ||||
I-D |
\left(I-Lsym\right)
| ||||
D |
i.e., is similar to the normalized Laplacian . For this reason, even if is in general not symmetric, it has real eigenvalues — exactly the same as the eigenvalues of the normalized symmetric Laplacian .
The graph Laplacian matrix can be further viewed as a matrix form of the negative discrete Laplace operator on a graph approximating the negative continuous Laplacian operator obtained by the finite difference method.(See Discrete Poisson equation)[2] In this interpretation, every graph vertex is treated as a grid point; the local connectivity of the vertex determines the finite difference approximation stencil at this grid point, the grid size is always one for every edge, and there are no constraints on any grid points, which corresponds to the case of the homogeneous Neumann boundary condition, i.e., free boundary. Such an interpretation allows one, e.g., generalizing the Laplacian matrix to the case of graphs with an infinite number of vertices and edges, leading to a Laplacian matrix of an infinite size.
The generalized Laplacian
Q
\begin{cases} Qi,j<0&ifi ≠ jandviisadjacenttovj\\ Qi,j=0&ifi ≠ jandviisnotadjacenttovj\\ anynumber&otherwise. \end{cases}
Notice the ordinary Laplacian is a generalized Laplacian.
The Laplacian of a graph was first introduced to model electrical networks.In an alternating current (AC) electrical network, real-valued resistances are replaced by complex-valued impedances.In models of such networks, the entries of the adjacency matrix are complex, but the Kirchoff matrix remains symmetric, rather than being Hermitian.Such a matrix is usually called an "admittance matrix", denoted
Y
There are other situations in which entries of the adjacency matrix are complex-valued, and the Laplacian does become a Hermitian matrix. The Magnetic Laplacian for a directed graph with real weights
wij
\gammaq(i,j)=
i2\piq(wij-wji) | |
e |
q
q=1/4
The deformed Laplacian is commonly defined as
\Delta(s)=I-sA+s2(D-I)
where I is the identity matrix, A is the adjacency matrix, D is the degree matrix, and s is a (complex-valued) number. [5]
The standard Laplacian is just and is the signless Laplacian.
The signless Laplacian is defined as
Q=D+A
D
A
L
Q
Q=RRsf{T}
Q
xsf{T}Qx=xsf{T}RRsf{T}x\impliesRsf{T}x=0.
x ≠ 0
An analogue of the Laplacian matrix can be defined for directed multigraphs.[7] In this case the Laplacian matrix L is defined as
L=D-A
where D is a diagonal matrix with Di,i equal to the outdegree of vertex i and A is a matrix with Ai,j equal to the number of edges from i to j (including loops).