This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

KirchhoffMatrix

KirchhoffMatrix[g]
gives the Kirchhoff matrix of the graph g.
  • The diagonal entries equal the degree of .
  • An entry is if vertex is adjacent to .
  • The vertices are assumed to be in the order given by VertexList[g].
  • The Kirchhoff matrix for a graph will have dimensions × where is the number of vertices.
The Kirchhoff matrix of an undirected graph:
The Kirchhoff matrix of a directed graph:
The Kirchhoff matrix of an undirected graph:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]//MatrixForm=
 
The Kirchhoff matrix of a directed graph:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]//MatrixForm=
The Kirchhoff matrix of an undirected graph is symmetric:
The Kirchhoff matrix of a directed graph can be unsymmetric:
The Kirchhoff matrix of a non-simple graph and its simple graph is the same:
KirchhoffMatrix works with large graphs:
Use MatrixPlot to visualize the matrix:
Rows and columns of the Kirchhoff matrix follow the order given by VertexList:
Use KirchhoffMatrix to construct a graph from a Kirchhoff matrix:
The degree of vertices can be found using the diagonal of the Kirchhoff matrix:
The number of rows or columns of the Kirchhoff matrix is equal to the number of vertices:
The off-diagonal entries of a Kirchhoff matrix are or :
For a complete graph, all entries outside the diagonal are in the Kirchhoff matrix:
A complete -partite graph has off-diagonal block entries:
In particular, TuranGraph and StarGraph are bipartite:
A path graph will have or in the diagonal and off-diagonal bands:
New in 8