Linear algebra and graph theory