# Graph Search: Adjacency Matrix

For each coordinate in the matrix, place a 1 if the nodes are connected and a 0 if they aren’t. In the case of a weighted graph, replace the one with the respective weight.

**Adjacency Matrix**

Node | 1 | 2 | 3 | 4 | 5 | 6 |

1 | 1 | 1 | 0 | 0 | 1 | 0 |

2 | 1 | 0 | 1 | 0 | 1 | 0 |

3 | 0 | 1 | 0 | 1 | 0 | 0 |

4 | 0 | 0 | 1 | 0 | 1 | 1 |

5 | 1 | 1 | 0 | 1 | 0 | 0 |

6 | 0 | 0 | 0 | 1 | 0 | 0 |