Find the adjacency matrices for the directed graphs in (a) and (b).

Two vertices in a graph are adjacent if there exists an edge between them. The entry in row i and column j of the adjacency matrix for a graph is the number of one-edge paths that take you from vertex i to vertex j.
(a)
• None of the vertices have edges that connect them to themselves
• v₁ shares 2 edges with v₂ and 1 edge with v₃
• v₂ shares 2 edges with v₁ and no edges with v₃
• v₃ shares 1 edge with v₁ and none with v₂
So, the adjacency matrix is
[tex]\begin{bmatrix}0&2&1\\2&0&0\\1&0&0\end{bmatrix}[/tex]
(b)
• Only v₁ has a loop that connects it to itself
• v₁ shares 2 edges with v₃ and none with either of v₂ or v₄
• v₂ shares 1 edge with v₃ and none with either v₁ or v₄
• v₃ shares 2 edges with v₁, 1 with v₂, and 2 with v₄
• v₄ shares 2 edges with v₃ and none with either v₁ or v₂
The adjacency matrix is then
[tex]\begin{bmatrix}1&0&2&0\\0&0&1&0\\2&1&0&2\\0&0&2&0\end{bmatrix}[/tex]