This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
Constructing Graphs
In Mathematica, graphs can be constructed in a variety of ways. They can be built from vertices and edges directly in a symbolic form. They can come from built-in curated collections of theoretical or empirical graphs. Special graphs can be generated from parametric specifications. Random graphs following a variety of graph distributions allow one to build simulated internets or citation graphs, and test algorithms. Graphs can be fully specified by several types of matrices, or they can be imported from numerous supported file formats. Graphs can also be constructed in several steps by performing operations on graphs.
Graph construct a graph from vertices and edges
Curated Graphs
GraphData collection of theoretical graphs
ExampleData collection of empirical graphs
Parametric Graphs
CompleteGraph generate a complete or a complete -partite graph
Random Graphs
RandomGraph generate random graphs following a graph distribution
AdjacencyGraph construct a graph from an adjacency matrix
Import import graphs from different graph file formats
"GraphML"  ▪ "GXL"  ▪ "Graphlet"  ▪ "Pajek"  ▪ "TGF"  ▪ "DOT"  ▪ "DIMACS"  ▪ "Graph6"  ▪ "Sparse6"  ▪ "LEDA"
Subgraph extract subgraphs
MORE ABOUT