# KirchhoffGraph

KirchhoffGraph[kmat]

gives the graph with Kirchhoff matrix kmat.

KirchhoffGraph[{v1,v2,},kmat]

gives the graph with vertices vi and Kirchhoff matrix kmat.

# Details and Options • KirchhoffGraph[kmat] is equivalent to KirchhoffGraph[{1,2,,n},kmat] where kmat has dimensions × .
• KirchhoffGraph takes the same options as Graph.

# Background & Context

• KirchhoffGraph constructs a graph from a valid Kirchhoff matrix representation of an undirected or directed graph. Here, a Kirchhoff matrix corresponding to a graph on n vertices is a square n×n matrix defined in terms of the vertex degrees of the graph and its adjacency matrix. The Kirchhoff matrix plays a central role in spectral graph theory, which is the study of graphs based on the eigenvalues of their adjacency or Kirchhoff matrices. It can also be used for calculating resistance distances between vertices of a graph, which are defined as the effective resistances between vertices (as when a battery is attached across them) when each graph edge is replaced by a unit resistor.
• The option DirectedEdges may be used to control whether an undirected or directed graph is constructed. By default, KirchhoffGraph returns an undirected graph if the input matrix is symmetric and a directed graph otherwise. KirchhoffGraph takes the same basic options as Graph.
• The Kirchhoff matrix of a given graph (including one constructed using KirchhoffGraph) may be returned using KirchhoffMatrix. Similar functions include AdjacencyGraph (which constructs a graph from an adjacency matrix), WeightedAdjacencyGraph, and IncidenceGraph (which constructs a graph from an incidence matrix).

# Examples

open all close all

## Basic Examples(2)

Construct a graph from a Kirchhoff matrix:

 In:= Out= A symmetric Kirchhoff matrix results in an undirected graph:

 In:= Out= ## Properties & Relations(2)

Introduced in 2010
(8.0)