Here is the wikipedia entry for adjacency matrix. How to convert your data to that, depends on what do you have. What's the format of your graph representation? How you would get the list of nodes? How you can get the list of adjacent nodes for a given node?
With that you can build the matrix.