KirchhoffMatrix

KirchhoffMatrix[g]
gives the Kirchhoff matrix of the graph g.

DetailsDetails

  • KirchhoffMatrix returns a SparseArray object, which can be converted to an ordinary matrix using Normal.
  • 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.

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

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=
Introduced in 2010
(8.0)