This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
 GRAPH UTILITIES PACKAGE SYMBOL

 AdjacencyMatrix[g]gives the SparseArray object representing the graph g. gives the SparseArray object representing the graph g, adding additional unconnected vertices, if necessary, to create a graph with n vertices.
• The graph g can be specified by a rule list, an adjacency matrix, or the Combinatorica representation of a graph.
• The rows/columns of the SparseArray object correspond to vertices in the order returned by VertexList[g].
The SparseArray representation of a graph specified by a rule list:
This gives a SparseArray representation of a graph specified by a Combinatorica object:
This adds an extra row and column to the adjacency matrix, corresponding to unconnected vertices:
Needs["GraphUtilities`"]
The SparseArray representation of a graph specified by a rule list:
 Out[2]//MatrixForm=

Needs["GraphUtilities`"]
This gives a SparseArray representation of a graph specified by a Combinatorica object:
 Out[2]=
 Out[3]//MatrixForm=

Needs["GraphUtilities`"]
This adds an extra row and column to the adjacency matrix, corresponding to unconnected vertices:
 Out[3]//MatrixForm=
 Out[4]=
This shows the MatrixPlot of the adjacency matrix of a GridGraph, and its graph drawing:
A second argument specifying fewer vertices than those contained in the graph is ignored: