Abstract
Let \(G\) be a simple graph with order \(n\), \(n\ge 5\), and adjacency matrix \(\mathbf{A}(G)\). In this paper, we determine the number of all substructures having at most four edges in terms of its adjacency matrix \(\mathbf{A}(G)\) together with some
graph invariants determined by \(\mathbf{A}(G)\). Then, as applications, we provide an algebraic expression for the second Zagreb index and \(||\mathbf{A}^4||\) of a graph.