Graphs and Matrices

Matrix representations of graphs go back a long time and are still in some areas the only way to represent graphs. Adjacency matrices represent adjacent vertices and incidence matrix vertex-edge incidences. Both are fully capable of representing undirected and directed graphs. Matrix representations provide a bridge to linear algebra-based algorithms for graph computation.

Matrix Graph Constructors

(RefLink[AdjacencyGraph, paclet:ref/AdjacencyGraph]) — graph from an adjacency matrix

(RefLink[IncidenceGraph, paclet:ref/IncidenceGraph]) — graph from an incidence matrix

Matrix Graph Representations

(RefLink[AdjacencyMatrix, paclet:ref/AdjacencyMatrix]) — vertex-vertex adjacency matrix

(RefLink[IncidenceMatrix, paclet:ref/IncidenceMatrix]) — vertex-edge incidence matrix

(OrangeLink[Sparse Arrays », paclet:guide/SparseArrays])

(RefLink[SparseArray, paclet:ref/SparseArray]) — create and represent a sparse matrix