The AdjacencyMatrix command returns the adjacency matrix of a graph G whose rows and columns are indexed by the vertices. The entry i,j of this matrix is 1 if there is an edge from vertex i to vertex j and 0 otherwise.
The default output is an n by n Matrix with the following properties:
If G is directed or undirected: datatype=anything and order=C_order
If G is undirected: shape=symmetric, storage=triangular[upper],
If G is directed: storage=rectangular, shape=
If G is sparse, i.e., |E| << |V|^2 then storage=sparse will be used.
G ≔ Graph⁡1,2,3,4,Trail⁡1,2,3,4,1
G≔Graph 1: an undirected unweighted graph with 4 vertices and 4 edge(s)
H ≔ Digraph⁡1,2,3,4,Trail⁡1,2,3,4,1
H≔Graph 2: a directed unweighted graph with 4 vertices and 4 arc(s)
Download Help Document
What kind of issue would you like to report? (Optional)