# How to construct the graph from an adjacency matrix?

I have the following adjacency matrix:

   a  b  c  d
a [0, 0, 1, 1]
b [0, 0, 1, 0]
c [1, 1, 0, 1]
d [1, 1, 1, 0]


How do I draw the graph, given its adjacency matrix above (I've added a,b,c,d to label vertices).

I don't understand how the vertex $d$ (e.g., the row $d$) is adjacent to the vertex $b$, but the vertex $b$ (the row $b$) is not adjacent to the vertex $d$ (the column $d$).

Is this possible?

Thanks!

EDIT: Maybe it's directed? If so, would that explain why d --> b, but b =/ d?

It is a directed graph, i.e. $$\begin{matrix} a & & b\\ \updownarrow & X & \uparrow\\ c &\leftrightarrow & d \end{matrix}$$

where I used $X$ to denote a double-sided link between $a$-$d$ and $c$-$d$.

The direction of the edges is convention defined and could be reversed.

• It looks like there is a double sided link between a and c. I don't see it in your solution. – Wintermute Feb 9 '16 at 16:32
• Also, $a$ and $b$ should not be connected. – Morgan Rodgers Feb 9 '16 at 17:35
• Right, corrected. – jgyou Feb 9 '16 at 22:26