Extend adjacency matrix