Definition

Consider a Graph with nodes .

Unweighted Adjacency Matrix

An unweighted adjacency matrix is matrix such that its element is one when there is edge from node to and zero when there is no edge.

Weighted Adjacency Matrix

An unweighted adjacency matrix is matrix such that its element is the weight of the edge between and , and is zero when there is no edge.

Examples

Given graph

Adjacency matrix

Facts

If a graph is undirected, then the adjacency matrix is Symmetric Matrix