0% found this document useful (0 votes)
402 views11 pages

Johnson Graphs and Linear Algebra Insights

This document discusses the relationships between graph theory, matrix representations of graphs, and linear algebra. It explores various matrix representations of graphs, including adjacency matrices, incidence matrices, path matrices, distance matrices, and Laplacian matrices. It presents theorems regarding the properties of these matrix representations, such as how powers of the adjacency matrix can be used to count paths between vertices. It also discusses special properties of complete graphs and trees in their matrix representations, such as the eigenvalues of the adjacency matrix of a complete graph.

Uploaded by

Valerio Olgiati
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
402 views11 pages

Johnson Graphs and Linear Algebra Insights

This document discusses the relationships between graph theory, matrix representations of graphs, and linear algebra. It explores various matrix representations of graphs, including adjacency matrices, incidence matrices, path matrices, distance matrices, and Laplacian matrices. It presents theorems regarding the properties of these matrix representations, such as how powers of the adjacency matrix can be used to count paths between vertices. It also discusses special properties of complete graphs and trees in their matrix representations, such as the eigenvalues of the adjacency matrix of a complete graph.

Uploaded by

Valerio Olgiati
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

GRAPH THEORY AND LINEAR ALGEBRA

Dylan Johnson
May 3, 2017

Abstract
Graphs are an incredibly versatile structure insofar as they can model everything
from the modernity of computer science and complexity of geography, to the intricacy
of linguistic relationships and the universality of chemical structures. Representing
such graphs as matrices only enhances the computational aspects of this modeling.
Ultimately, this necessitates linear algebra.
This paper explores the relationships between graph theory, their associated ma-
trix representations, and the matrix properties found in linear algebra. It explores
not only the adjacency matrices of graphs, but also the more interesting examples
found in incidence matrices, path matrices, distance matrices, and Laplacian matrices.
Investigations include the utility of such matrix representations for various classes of
graphs, including disconnected graphs, complete graphs, and trees. In order to achieve
this goal, this paper presents some of the most interesting theorems regarding matrix
representations of graphs, and ties these theorems back to questions in graph theory
itself.
Lastly, this paper identifies certain unique properties of special classes of graphs –
namely, complete graphs and acyclic graphs (trees) – and how their specialty in graph
theory reflects in their matrix properties. Once again, this analysis uses linear algebra.
Many of such theorems suggest special relationships for these classes, some of which
have already been investigated, while others remain to be fully understood.

1
CONTENTS CONTENTS

Contents
1 Basic Graph Theory 3

2 Adjacency Matrices 3
2.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Distance and Powers of A . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.3 Eigenvalues and Complete Graphs . . . . . . . . . . . . . . . . . . . . . . . . 4

3 Incidence Matrices 5
3.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.2 Incidence and Rank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.3 Path Matrices and Incidence Matrices . . . . . . . . . . . . . . . . . . . . . . 7

4 Laplacian Matrices 7
4.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4.2 The Matrix Tree Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

5 Distance Matrices 9
5.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5.2 Distance Matrices and Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5.3 Connection Between Distance and Laplacian Matrices . . . . . . . . . . . . . 10

Bibliography 11

2
2 ADJACENCY MATRICES

1 Basic Graph Theory


Graph theory investigates the structure, properties, and algorithms associated with graphs.
Graphs have a number of equivalent representations; one representation, in particular, is
widely used as the primary definition, a standard which this paper will also adopt.
A graph, denoted G, is defined as an ordered pair composed of two distinct sets:

1. A set of vertices, denoted V (G)

2. A set of edges, denoted E(G)

The order of a graph G refers to |V (G)| and the size of a graph G refers to |E(G)|. In
other words, order refers to the number of vertices and size refers to the number of edges.
In order to perform compuptations with these graphs, we utilize matrices as an incredi-
bly valuable, alternative representation. Such representations include incidence, adjacency,
distance, and Laplacian matrices.

2 Adjacency Matrices
2.1 Definition
For a graph G of order n, the adjacency matrix, denoted A(G), of graph G is an n by n
matrix whose (i,j)-th entry is determined as follows:

1, if vertex vi is adjacent to vertex vj
Aij = (1)
0, otherwise
Adjacency matrices not only encapsulate the structure and relationships of a graph, but
also provide for an efficient method of storage and access in a computer. For this reason,
adjacency matrices are one of the most common ways of representing graphs.

2.2 Distance and Powers of A


The distance between vertices vi and vj , denoted d(i, j), of a graph G is defined by the
path of minimum length between the two vertices. For example, take the graph in Figure 1.
There are two paths of length 4 between vertices v6 and v8 as depicted in Figure 2.
The adjacency matrix of a graph provides a method of counting these paths by calcu-
lating the powers of the matrices.

Theorem 2.1. Let G be a graph with adjacency matrix A and k be a positive integer. Then
the matrix power Ak gives the matrix where Aij counts the the number of paths of length k
between vertices vi and vj .

For example, return to the graph shown in Figure 2. Equation 2 depicts the adjacency
matrix of this graph, A(G), and its fourth power.

3
2.3 Eigenvalues and Complete Graphs 2 ADJACENCY MATRICES

Figure 2: Depiction of 2 Paths Between


Figure 1: Graph of Order 8 Vertices 6 and 8

   
0 1 1 0 0 1 0 0 17 11 13 11 10 4 16 2
1 0 1 0 1 0 0 0 11 18 13 17 4 9 11 6
   
1 1 0 1 0 0 1 0 13 13 28 13 16 14 13 2
   
0 0 1 0 1 0 1 0 A (G) = 11 17 13 18 4 9 11 6
4

A(G) = 
0
 (2)
 1 0 1 0 0 0 1
10
 4 16 4 15 4 10 0
1 0 0 0 0 0 1 0 4 9 14 9 4 10 4 2
  
0 0 1 1 0 1 0 0 16 11 13 11 10 4 17 2
0 0 0 0 1 0 0 0 2 6 2 6 0 2 2 3

As expected, the (6,8)-entry of A4 (G) counts the two paths between vertices v6 and v8 –
by symmetry, the same is true of the (8,6)-entry. While this result provides a useful method
of counting the number of paths between vertices in a graph, it can be extended to a similarly
interesting and logical corollary.
Corollary 2.1. Let G be a graph with adjacency matrix A and k be a positive integer. Then
the sum Sn defined by
Sn = A + A2 + ... + Ak (3)
is the n x n matrix whose (i,j)-entry counts the number of paths of length k or less between
vertices vi and vj .
Herein matrices once again provide a computationally useful tool for identifying and
organizing the properties of a graph.

2.3 Eigenvalues and Complete Graphs


A complete graph G of order n, denoted Kn , includes an edge between every pair of
vertices. For example, K5 is depicted in Figure 3.
A complete bipartite graph G of order n = p + q, denoted Kp,q , consists of two sets
U, V ⊂ E(G) for which every vertex of U is adjacent to every vertex of V , and no two vertices
within the same set are adjacent. For example, K2,3 is depicted in Figure 4.

4
3 INCIDENCE MATRICES

Figure 3: Complete Graph K5 Figure 4: Complete Bipartite Graph K3,4

The eigenvalues of a graph G are the eigenvalues of its adjacency matrix. In the
case of complete graphs – both complete and complete bipartite – some interesting patterns
emerge.

Theorem 2.2. For any positive integer n, the eigenvalues of Kn are n − 1 with multiplicity
1, and −1 with multiplicity n - 1. For any positive integer p, q, the eigenvalues of Kp,q are
√ √
pq, − pq, and 0 with multiplicity p + q − 2.

While this result is interesting in its own right, this theorem can be used to interweave a
basic result from graph theory with one in linear algebra.
In graph theory, the removal of any vertex – and its incident edges – from a complete
graph of order n results in a complete graph of order n − 1. Combining this fact with
the above result, this means that every n − k + 1 square submatrix, 1 ≤ k ≤ n, of A(Kn )
possesses the eigenvalue −1 with multiplicity k and the eigenvalue n − k + 1 with multiplicity
1. Notably, this produces a natural bound on the eigenvalues of the submatrices of A(Kn ):

−1 ≤ λi ≤ n , 1≤i≤n

This result also emerges in linear algebra, as a general property of symmetric matrices:
interlacing eigenvalues occurs for all symmetric matrices, a linear algebra equivalent to this
natural result in graph theory.

3 Incidence Matrices
3.1 Definition
For a graph G of order n and size m, the incidence matrix, denoted Q(G), of G is the n by
m matrix whose (i,j)-th entry is determined as follows:

5
3.2 Incidence and Rank 3 INCIDENCE MATRICES


1, if vertex vi is incident to edge ej
Qij = (4)
0, otherwise
Although incidence matrices are not as computationally useful as adjacency matrices, they
retain certain interesting properties using linear algebra.

3.2 Incidence and Rank


First, an observation: the column sums of Q(G) are all zero, and hence the rows of Q(G) are
linearly depedent, because the vector consisting of all 1 spans the null space of Q. Therefore,
the rank of the incidence matrix Q for any graph must be less than the order n. It turns
out, however, that for any graph G, only one of the columns is a linear combination of the
others:

Lemma 3.1. If G is a connected graph on n vertices, then rank Q(G) = n − 1.

This lemma, however, applies only to connected graphs, in which there exists a path
between any pair of vertices. A disconnected graph is a graph in which at least one pair
of vertices does not have a path between them. This describes the intuitive idea that not
all vertices need to lie on the same part of the graph, as demonstrated by the example in
Figure 5.

Figure 5: A disconnected graph of order 9

Each connected subsection of a graph G is called a component G. For connected graphs,


there is only one component. Using the previous lemma, we can produce a more general
result for any graph.

Theorem 3.1. If G is a graph on n vertices and has k connected components then rank
Q(G) = n − k.

Thus, incidence matrices capture a different aspect of graphs. While adjacency matrices
capture the density of a graph and allow for computations on relationships between vertices,
incidence matrices account for the edges’ relationships with the vertices, and therefore relate
to properties such as components.

6
3.3 Path Matrices and Incidence Matrices 4 LAPLACIAN MATRICES

3.3 Path Matrices and Incidence Matrices


Let G be a graph with size m and u, v ∈ V (G) (that is, any two vertices u and v of G). The
path matrix for vertices u and v – denoted P (u, v) – is the q by m matrix, where q is the
number of different paths between u and v, defined as follows:

1, if edge ej lies in the i − th path, vj
P (u, v)ij = (5)
0, otherwise.
In other words, a path matrix is defined for a certain pair of vertices in a graph G in which

• the rows of P (u, v) correspond to the different paths from vertex u to vertex v (which,
for example, could be counted using the m-th power of the adjacency matrix Am (G),
as described in Section 2.2)

• the columns of P (u, v) correspond each to an edge in graph G

Incredibly, there exists a connection between the incidence matrix of a graph and its path
matrix.

Theorem 3.2. Let G be a graph of order n, and at least two vertices u, v ∈ V (G). Arrange
the columns of its incidence matrix Q(G) such that they align with the columns of the path
matrix P(u,v). Then,
Q(G) ∗ P T (u, v) (mod 2) = M, (6)
where M is the matrix having all ones in two rows u and v, and zeros in the remaining n -
2 rows.

Herein incidence matrices again encapsulate the edge and vertex relationships, rather
than just the vertex relationships found in adjacency matrices. One of the most powerful
matrix representations, however, has yet to come.

4 Laplacian Matrices
4.1 Definition
The degree of a vertex vi , denoted di , is the total number of other vertices to which vertex
i is adjacent. That is, the degree of each vertex is how many edges are incident from that
vertex. This provides us with a basis of knowledge for defining the Laplacian matrix, which
at first glance seems entirely arbitrary, but has a number of incredible properties. The
Laplacian Matrix of a Graph G, denoted L(G), is the n by n matrix defined as follows:

−1, if vertex vi is adjacent to vertex vj
Lij = 0, if vertex vi is not adjacent to vertex vj (7)
di , if i = j

Thus, a Laplacian matrix has the degrees of each of its vertices along its diagonal, and a −1
elsewhere if two vertices are adjacent. Otherwise, every other entry consists of all zeros.

7
4.2 The Matrix Tree Theorem 4 LAPLACIAN MATRICES

If we define D0(G) to be a diagonal matrix whose entries are the degrees of each vertex,
then the Laplacian Matrix of a graph G can be equivalently defined as

L(G) = D0(G) − A(G) (8)

Remarkably, Laplacian Matrices can also be expressed in terms of Incidence Matrices.


Assigning any arbitrary orientation to a graph G – that is, assigning a fixed, arbitrary
direction to each edge – the Laplacian matrix of G can be expressed in terms of the incidence
matrix of the oriented representation:

L(G) = Q(G)Q(G)T (9)

For example, take the basic graph in Figure 6:

Figure 6: Laplacian Matrix Example

The Laplacian Matrix for this graph, including its relationship to the adjacency and
inciddence matrices, is shown in Equation 10:

         
2 −1 −1 2 0 0 0 1 1 1 0 1 1 −1 0
L(G) = −1 2 −1 = 0 2 0 − 1 0 1 = −1 −1 0  ∗ 0 −1 1 
−1 −1 2 0 0 2 1 1 0 0 1 −1 1 0 −1
(10)

4.2 The Matrix Tree Theorem


A spanning tree of a graph G is a tree which is a subgraph of G. That is, a spanning tree
is a tree on the same vertex set as G which uses some subset of E(G) such that every single
vertex is adjacent to at least one edge. As one can imagine, counting all of the spanning
subtrees of a graph G can rapidly become an arduous task. However, there exists an effective
solution, and it makes use of Laplacian Matrices.
Namely, one of the most useful, elegant theorems in graph theory is that of The Matrix
Tree Theorem.
Theorem 4.1 (Matrix Tree Theorem). Let G be a graph of order n. Then the cofactor
of any element of L(G) equals the number of spanning trees of G.

8
5 DISTANCE MATRICES

That is, all cofactors of a Laplacian matrix are the same, and that shared value counts
the number of spanning trees of the graph G!
Return to the above example. Taking the (2,3)-cofactor of the Laplacian Matrix of the
triangle:

2+3 2
−1
C23 = (−1) ∗ = (−1) ∗ (−2 − 1) = 3 (11)
−1 −1
which corresponds to the 3 spanning trees of the graph, depicted in Figure 7.

Figure 7: The Three Spanning Trees of K3

It can be easily checked that every other cofafctor of the Laplacian matrix produces the
same result.

5 Distance Matrices
5.1 Definition
For a graph G of order n, the distance matrix, denoted D(G), of graph G is an n by n matrix
whose (i,j)-th entry is the distance between vertices vi and vj . Naturally, this means that
D(G) is a symmetric matrix whose diagonal consists entirely of zeros.

5.2 Distance Matrices and Trees


When distance matrices are applied to trees, an interesting generality emerges:

Theorem 5.1. Let T be a tree with order n. Then the determinant of D(T ) is given by

det D(T ) = (−1)n−1 (n − 1) ∗ 2n−2 (12)

While this may seem a trivial result, it has profound implications. First, as a direct
connection to linear algebra, because the determinant is nonzero for all trees of order n ≥ 3,
the distance matrix of all trees is nonsingular. That is, all distance matrices of trees have
an inverse
Second, because the determinant depends only on the size of the matrix, and not on the
placement of entries, the result depends only on the size of a given tree, independent of its
structure or shape. That is, of the nn−2 trees of order n, every single one of their distance
matrices has the same determinant. This suggests an underlying similarity between all trees,
a similarity which has persisted in myriad other results regarding trees, and an even greater
diversity of conjectures.

9
5.3 Connection Between Distance and Laplacian Matrices 5 DISTANCE MATRICES

5.3 Connection Between Distance and Laplacian Matrices


Finally, there exists a connection between the distance and Laplacian matrices of a tree:

Theorem 5.2. Let T be a tree of order n with Laplacian matrix L and distance matrix D.
Then

LDL = -2L

Once again, there exists a pattern for trees which does not occur for other graphs, and it
emerges for all trees of a given order, regardless of their structure or shape. It suggests an
underlying similarity of great interest.

10
REFERENCES REFERENCES

References
[1] Graph Matrices. [Link]
PDF, 2010. [Online; accessed 16-03-2017].

[2] R.B. Bapat. Graphs and Matrices. Hindustan Book Agency, New Delhi, India, 2010.

[3] Gary Chartrand and Ping Zhang. A First Course in Graph Theory. Dover Publications,
Boston, 2012.

[4] Douglas E. Ensley and J. Winston Crawley. Discrete Mathematics. John Wiley and Sons,
Inc., Hoboken, New Jersey, 2006.

[5] Laszlo Lovasz. Eigenvalues of Graphs. [Link]


2007. [Online; accessed 17-03-2017].

[6] Damir Vukiccevic and Ivan Gutman. Laplacian Matrix and Distance Matrices in Trees.
[Link] 2004. [Online; ac-
cessed 17-03-2017].

11

Common questions

Powered by AI

The Laplacian matrix, defined with diagonal entries equal to the degree of each vertex and -1 for adjacent vertices, enables calculations related to spanning trees due to its structural characteristics. The Matrix Tree Theorem states that the cofactor of any element in the Laplacian matrix equals the number of spanning trees in the graph. Since the structure of the Laplacian matrix inherently reflects the connectivity properties of the graph, the computation of cofactors allows for efficient enumeration of spanning trees .

The Laplacian matrix is an n by n matrix where n is the number of vertices in the graph. It is defined such that each diagonal element Lii equals the degree of vertex vi, the off-diagonal element Lij equals -1 if the vertices vi and vj are adjacent, and 0 if they are not. Therefore, it combines information about vertex degrees and adjacency, reflecting overall graph connectivity .

An adjacency matrix allows for determining the distance between vertices in a graph by computing the powers of the matrix. The element in the ith row and jth column of the k-th power of the adjacency matrix represents the number of paths of length k between the vertices vi and vj. Specifically, for a least path (minimal distance), considering powers of adjacency matrices helps in identifying and counting paths of various lengths .

In the context of trees, distance matrices are related to Laplacian matrices through the equation LDL = -2L, where L is the Laplacian matrix and D is the distance matrix. This relationship exists for all trees of a given order, indicating an underlying pattern. It reveals that trees, regardless of their diverse structures, contain inherent similarities in their mathematical representation, particularly in how the concepts of distance and connectivity (central to Laplacians) interplay .

Distance matrices in trees are significant because they exhibit properties that are invariant across different tree structures of the same order. The determinant of distance matrices for trees depends solely on the order of the tree and is given by (-1)^(n-1) * (n-1) * 2^(n-2), which is nonzero, indicating nonsingularity. This result hints at a fundamental similarity between trees with the same number of vertices, regardless of their structure, emphasizing an underlying uniformity .

The Matrix Tree Theorem effectively utilizes Laplacian matrices to address and simplify complex graph-theoretical problems by enabling the enumeration of spanning trees. Through this theorem, any cofactor of the Laplacian matrix equates to the number of spanning trees in the graph. This not only offers a computationally efficient method to count spanning trees but also deepens the understanding of the graph's structure. The ability to use a single cofactor value, shared across all elements of the Laplacian matrix, underscores the theorem's elegance and utility in mathematical graph analysis .

Laplacian matrices provide insights into graph connectivity by being expressible in terms of the incidence matrix. When assigning an arbitrary direction to a graph, the Laplacian matrix can be represented by the product of the incidence matrix and its transpose. This representation inherently captures the connectedness by considering incidence relationships and allows determination of components through the rank of the Laplacian matrix, which corresponds to the number of independent cycles in the graph, linking it to graph connectivity properties .

The order (number of vertices) and size (number of edges) of a graph significantly influence its matrix representations. For instance, the adjacency matrix is an n x n matrix where n is the graph order, and its entries are determined by the adjacency of vertices, reflecting graph size implicitly. On the other hand, the distance matrix depends on both graph order and size through the path lengths it represents. Therefore, permutations in either order or size will alter these matrix representations, affecting computations reliant on them .

Incidence matrices differ from adjacency matrices in that they capture different graph properties. Adjacency matrices focus on the vertex-vertex relationships, detailing the direct connections or adjacency between different vertices. In contrast, incidence matrices capture edge-vertex relationships, relating more to graph connectivity and component properties. This means incidence matrices are better suited for computations involving edge-centric properties, such as determining spanning trees, while adjacency matrices are more suited to evaluating direct connectivity and vertex-centric computations .

The relationship between the incidence and path matrices is established through an equation that involves arranging the columns of an incidence matrix to align with those of the path matrix. The product of the incidence matrix and the transpose of the path matrix, under modulus 2, results in a matrix with specific patterns of ones and zeros, encapsulating the vertex and edge relationships in a graph. This highlights how edge relationships captured by incidence matrices align with the path representations in path matrices .

You might also like