AdjacencyMatrix
AdjacencyMatrix[g] gives the adjacency matrix of graph g, where entry is 1 if vertices and are connected.
Examples
Get adjacency matrix:
g = Graph[{1 <-> 2, 2 <-> 3, 3 <-> 1}]
AdjacencyMatrix[g] // MatrixForm
(*
0 1 1
1 0 1
1 1 0
*)
AdjacencyMatrix[CompleteGraph[4]] // MatrixFormPlease visit the official Wolfram Language Reference for more details.