1 Introduction

Let \(G=\left( V(G), E(G)\right) \) be a finite simple graph, where V(G) is the set of vertices of G, and E(G) is the set of its edges. If \(|V(G)|=n\) and \(|E(G)|=m\), we say that G is a graph of order n and size m. Let \(V(G)=\{v_1, v_2,\ldots , v_n\}\) and \(E(G)=\{e_1, e_2,\ldots , e_m\}\). The incidence matrix of G is the matrix \(B(G)=(b_{ij})_{n \times m}\) whose rows and columns are indexed by the vertices and edges of G, respectively. The (ij)-th entry \(b_{ij}\) of B(G) is equal to 1, if \(v_i\) is incident with \(e_j\), and \(b_{ij}=0\), if \(v_i\) and \(e_j\) are not incident. The degree of the vertex \(v_i\) will be denoted by \(d_G(v_i)\), for \(1\le i\le n\), while \(\Delta (G)=\max \limits _{1\le i\le n} \{d_G(v_i)\}\) and \(\delta (G)=\min \limits _{1\le i\le n} \{d_G(v_i)\}\) will be the maximum and the minimum degree of G, respectively. When there is no confusion, we write \(\Delta \) and \(\delta .\) In addition, if \(d_G(v_i)=r\), for each \(1\le i\le n\), G is called an r-regular graph. If either \(d_G(v_i)=r\) or \(d_G(v_i)=k\), for each \(1\le i\le n\), then G is an (rk)-bidegreed graph. If G is a graph that is bipartite and bidegreed, then G is an (rk)-semiregular graph.

Let \(A(G)=(a_{ij})_{n \times n}\) be the adjacency matrix of G, whose (ij)-th entry \(a_{ij}\) is defined by \(a_{ij}=1\), if \(v_i\) and \(v_j\) are adjacent vertices, and \(a_{ij}=0\), otherwise. The characteristic polynomial \(P_G(x)=\det \left( xI_n-A(G)\right) \) of G is the characteristic polynomial of its adjacency matrix, where \(I_n\) is the \(n \times n\) identity matrix. The (adjacency) eigenvalues \(\lambda _1(G)\ge \lambda _2(G)\ge \cdots \ge \lambda _n(G)\) of G are the eigenvalues of A(G). Since A(G) is real and symmetric, the eigenvalues of G are all real. If \(\lambda _1>\lambda _2>\cdots >\lambda _t\) are the distinct eigenvalues of G, then the (adjacency) spectrum of G will be denoted by \(\textrm{Spec}(G)=\left( \begin{array}{cccc} \lambda _1 &{} \lambda _2 &{} \cdots &{} \lambda _t \\ a_1 &{} a_2 &{} \cdots &{} a_t \\ \end{array} \right) , \) where \(a_i\), for \(1\le i\le t\), is the algebraic multiplicity of the eigenvalue \(\lambda _i\). In particular, \(\lambda _1(G)\), as the largest eigenvalue of G, is called the spectral radius (or index) of G, and when there is no confusion of what G is, we shall only write \(\lambda _1\). It is well-known (see, for example, [6]) that \(\sum \limits _{i=1}^{n} \lambda _i(G)=0\) and \(\sum \limits _{i=1}^{n} \lambda _i^2(G)=2\,m\). Another frequently used results related to the eigenvalues of a graph are the Courant-Weyl inequalities and the Interlacing Theorem:

Theorem 1.1

[6, Theorem 1.3.15] Let A and B be \(n\times n\) Hermitian matrices. Then,

$$\begin{aligned} \lambda _i(A+B)\le \lambda _j(A)+\lambda _{i-j+1}(B), \, 1\le j\le i\le n, \end{aligned}$$
(1.1)
$$\begin{aligned} \lambda _i(A+B)\ge \lambda _j(A)+\lambda _{i-j+n}(B), \, 1\le i\le j\le n. \end{aligned}$$
(1.2)

Theorem 1.2

[6, Corollary 1.3.12] Let G be a graph with n vertices and eigenvalues \(\lambda _1 \ge \lambda _2 \ge \cdots \ge \lambda _n,\) and let H be an induced subgraph of G with m vertices. If the eigenvalues of H are \(\mu _1 \ge \mu _2 \ge \cdots \ge \mu _m,\) then for \(i=1,\ldots ,m,\)

$$\begin{aligned} \lambda _{n-m+i} \le \mu _i \le \lambda _i. \end{aligned}$$

The energy \({\mathcal {E}}(G)\) of G was first introduced by Gutman [9] to be the sum of all absolute eigenvalues of G:

$$\begin{aligned} {\mathcal {E}}(G)=\sum \limits _{i=1}^n |\lambda _i(G)|. \end{aligned}$$
(1.3)

Despite a lot of research have been done on studying different aspects of this graph invariant, graph energy still remains intriguing to researchers. For more details about graph energy and its application in mathematical chemistry, we refer the readers to, for example, [12,13,14, 18] and references therein.

Let \(S\subseteq V(G)\) and \(|S|=\sigma \), where \(0\le \sigma \le n\). For G a simple graph of order n and size m, denote by \(G_S\) the self-loop graph of G at S, i.e. \(G_S\) is the graph of order n and size m, obtained from G by attaching a self-loop (or simply a loop) at each vertex from the set S. For clarity, m always denotes the number of ordinary edges and the number of loops \(\sigma \) is not incorporated in m. When \(\sigma =0\), we write G instead of \(G_S\), while when \(\sigma =n\), we will use the notation \({\widehat{G}}\). The adjacency matrix \(A(G_S)\) of \(G_S\) takes the form \(A(G_S) = A(G)+{\mathfrak {I}}_S\), where \({\mathfrak {I}}_S\) is the “almost” identity matrix, with exactly \(\sigma \) ones on the main diagonal corresponding to S and all other entries equal to zero. The (adjacency) eigenvalues \(\lambda _1(G_S)\ge \lambda _2(G_S)\ge \cdots \ge \lambda _n(G_S)\) of \(G_S\) are the eigenvalues of the matrix \(A(G_S)\), and since \(A(G_S)\) is square and symmetric, these eigenvalues are reals.

Recently, Gutman et al. [15] has initiated the study of the spectral properties of \(A(G_S)\), amongst which we have the following relations.

Lemma 1.3

[15] Let \(S\subseteq V(G)\) and \(|S|=\sigma .\) Let \(G_S\) be a self-loop graph of order n and size m. Let \(\lambda _1(G_S) \ge \cdots \ge \lambda _n(G_S)\) be the eigenvalues of \(G_S.\) Then,

  1. (i)

    \(\displaystyle \sum ^n_{i=1} \lambda _i(G_S)=\sigma ,\)

  2. (ii)

    \(\displaystyle \sum ^n_{i=1} \lambda ^2_i(G_S)=2m+\sigma .\)

The energy \({\mathcal {E}}(G_S)\) of \(G_S\) [15] of order n and \(|S|=\sigma \) is defined as

$$\begin{aligned} {\mathcal {E}}(G_S)=\sum \limits _{i=1}^{n} \left| \lambda _i(G_S)-\frac{\sigma }{n}\right| . \end{aligned}$$
(1.4)

Since the research topics related to the energy of self-loop graphs are relatively new, we refer the readers to the several papers that have been published on this subject so far: [1,2,3, 17, 19, 25, 26]. Application-wise, self-loop graphs have also classically been found to manifest in mathematical chemistry, cf. [10, 11, 20].

In the paper, we adapt commonly used notations in Spectral Graph Theory. The complement \({\overline{G}}\) of a graph G is the graph with the same set of vertices as G such that two distinct vertices in \({\overline{G}}\) are adjacent whenever they are not adjacent in G. The line graph L(G) of a graph G is the graph whose vertices are the edges of G, with two vertices in L(G) adjacent whenever the corresponding edges in G have exactly one vertex in common. \(K_n\) is the complete graph of order n, while the complete multipartite graph \(K_{n_1, n_2,\ldots , n_k}\) is the complement of the graph \(G=K_{n_1}\,{\dot{\cup }}\,K_{n_2}\,{\dot{\cup }}\cdots {\dot{\cup }}\,K_{n_k}\), where \({\dot{\cup }}\) stands for disjoint union. If \(n_1=n_2=\cdots =n_k=p\), we will use the label \(K_{k\times p}\). The first Zagreb index \(M_1(G)\) of G is defined as [16]: \(M_1(G)=\sum \limits _{i=1}^{n} d^2_G(v_i)\), while the first Zagreb index \(M_1(G_S)\) of \(G_S\) is [26]: \(M_1(G_S)=\sum \limits _{i=1}^{n} d^2_{G_S}(v_i)\), where \(d_{G_S}(v_i)\) is the degree of the vertex \(v_i\) in \(G_S\). In particular, if \(v \in S,\) then \(d_{G_S}(v) = d_{G}(v) +2.\) In Sect. 4, we will also discuss semiregular graphs, for clarity, we explain the notion of semiregular matrices, cf. [28]. A nonnegative matrix A is row-regular (resp. column-regular) if all of its row (resp. column) sums are equal. A is row-semiregular (resp. column-semiregular) if there exists a permutation matrix P such that \(P^TAP=\begin{pmatrix} 0 &{} B \\ C &{} 0 \end{pmatrix}\) where B and C are both row-regular (resp. column-regular). Then, the matrix A is said to be regular (resp. semiregular) if A is both row-regular and column-regular (resp. row and column-semiregular). For the remaining basic terminology and additional details, the reader is referred to [5] and [6].

The paper is organized as follows. In Sect. 2, we establish that \({\mathcal {E}}(G\setminus S) < {\mathcal {E}}(G_S)\) for a set S of independent vertices in G,  and prove several results related to the line graph \(L(G_S)\) of \(G_S\). Here, we show that every eigenvalue of \(L(G_S)\) must be not less than \(-2.\) The relation between the characteristic polynomials of the line graph \(L({\widehat{G}})\) of \({\widehat{G}}\) and its counterpart L(G) is derived. In Sect. 3, some bounds on the eigenvalues of a self-loop graph are given, together with some lower bounds on its energy. Moreover, we show that the energy of a connected regular complete multipartite graph is not greater than the energy of the corresponding self-loop graph. In Sect. 4, besides an upper bound, we give a lower bound for the spectral radius of a self-loop graph in terms of \(M_1(G)\) and \(\delta (G).\) We also present two Nordhaus–Gaddum-type bounds for the spectral radius of \(G_S\). In Sect. 5, a Nordhaus–Gaddum-type bound for the energy of a self-loop graph in terms of its order and the number of loops is exposed.

2 The Line Graph of a Self-Loop Graph

Let \({\mathcal {M}}_{m,n}\) be the set of \(m\times n\) complex matrices, and let \(M\in {\mathcal {M}}_{m,n}\). We write \(M^{\star }\) for the Hermitian adjoint of M. The singular values \(s_1(M) \ge s_2(M) \ge \cdots \ge s_n(M)\) of a matrix M are the square roots of the eigenvalues of \(MM^{\star }\). Since \(A=A(G)\) is a real and symmetric square matrix, it holds that \(s_i(A)=|\lambda _i(G)|\), for \(1\le i\le n\), and hence the energy of G of order n is the sum of the singular values of its adjacency matrix [23].

In [8], the following theorem regarding the singular values of a matrix has been proved:

Theorem 2.1

[8, Theorem 2.2] For a partitioned matrix \(C=\left( \begin{array}{cc} A &{} X \\ Y &{} B \\ \end{array} \right) \), where both A and B are square matrices, we have:

$$\begin{aligned} \sum \limits _{j} s_j(A)+\sum \limits _{j} s_j(B)\le \sum \limits _{j} s_j(C). \end{aligned}$$

Recall that vertices, or edges, of a graph are said to be independent if they are pairwise non-adjacent.

Theorem 2.2

Let G be a graph of order n \((n\ge 2)\), and let S be a set of independent vertices in G, such that \(|S|=\sigma \), \(1\le \sigma \le n-1\). Let \(G_S\) be the graph obtained by attaching a loop at each vertex in the set S. Then,

$$\begin{aligned} {\mathcal {E}}(G\setminus S) < {\mathcal {E}}(G_S), \end{aligned}$$

where \(G\setminus S\) is the graph obtained from G by deleting all vertices from the set S.

Proof

The adjacency matrix \(A(G_S)\) of \(G_S\) is of the following form

$$\begin{aligned} A(G_S)=\left( \begin{array}{cc} A(G\setminus S) &{} M^{T} \\ M &{} I_{\sigma } \\ \end{array} \right) , \end{aligned}$$

where the matrix \(M=(m_{ij})_{\sigma \times (n-\sigma )}\) satisfies that \(m_{ij}=1\) if the vertex \(i\in S\) is adjacent to the vertex \(j\in V(G)\setminus S\), and \(m_{ij}=0\), otherwise.

By Theorem 2.1, we find:

$$\begin{aligned}&{\mathcal {E}}(G\setminus S)+\sigma = \sum \limits _{i=1}^{n-\sigma } |\lambda _i(A(G\setminus S))|+\sum \limits _{i=1}^{\sigma } |\lambda _i(I_{\sigma })| = \sum \limits _{i=1}^{n-\sigma } s_i(A(G\setminus S))+ \sum \limits _{i=1}^{\sigma } s_i(I_{\sigma })\\&\quad \le \sum \limits _{i=1}^{n} s_i(A(G_S))=\sum \limits _{i=1}^{n} |\lambda _i(A(G_S))|=\sum \limits _{i=1}^{n} \left| \lambda _i(A(G_S))-\frac{\sigma }{n}+\frac{\sigma }{n}\right| \\&\quad < \sum \limits _{i=1}^{n} \left| \lambda _i(A(G_S))-\frac{\sigma }{n} \right| +\sigma = {\mathcal {E}}(G_S)+\sigma , \end{aligned}$$

where the last inequality follows from the fact that \(A(G_S)\) has at least one non-positive eigenvalue [1, Theorem 2.6]. \(\square \)

In a similar way, one can prove the following statement:

Theorem 2.3

Let G be a graph of order n \((n\ge 2)\), and let Q be a set of vertices which form a clique in G, such that \(|Q|=\sigma \), \(1\le \sigma \le n-1\). Let \(G_Q\) be a graph obtained by attaching a loop at each vertex in the set Q. Then

$$\begin{aligned} {\mathcal {E}}(G\setminus Q) < {\mathcal {E}}(G_Q). \end{aligned}$$

Let G be a graph of order n \((n\ge 2)\), and let \(G_S\) be the self-loop graph of G such that \(S\subseteq V(G)\) and \(|S|=\sigma \). Following [21], we can define:

Definition 2.4

The line graph \(L(G_S)\) of \(G_S\) is a graph whose vertices are the edges of \(G_S\), with two vertices in \(L(G_S)\) adjacent whenever the corresponding edges in \(G_S\) have exactly one vertex in common. Each loop attached at a vertex v in \(G_S\) is the vertex with a loop in \(L(G_S)\), and this vertex is adjacent to those vertices in \(L(G_S)\) which correspond to the edges of \(G_S\) incident with the vertex v in \(G_S\).

Let us notice that vertices with loops in \(L(G_S)\) form a set of independent vertices, as well as that the line graph L(G) of G is an exact (i.e. induced) subgraph of \(L(G_S)\).

From the definition, it follows that the adjacency matrix \(A(L(G_S))\) of \(L(G_S)\) is of the following form

$$\begin{aligned} A(L(G_S))=\left( \begin{array}{cc} A(L(G)) &{} M^{T} \\ M &{} I_{\sigma } \\ \end{array} \right) . \end{aligned}$$

Here, M stands for the loop-edge adjacency matrix. Precisely, if \(G_S\) is a self-loop graph of order n, size m and \(|S|=\sigma \), then \(M=(m_{ij})_{\sigma \times m}\), where \(m_{ij}=1\) if the loop i is adjacent to the edge j in \(L(G_S)\), and \(m_{ij}=0\) otherwise. Observe that when \(\sigma =n\), then \(M=B(G)\), where B(G) is the incidence matrix of G.

Corollary 2.5

Let G be a graph of order n \((n\ge 2)\). Suppose \(\emptyset \ne S\subseteq V(G)\). Then,

$$\begin{aligned} {\mathcal {E}}(L(G))<{\mathcal {E}}(L(G_S)). \end{aligned}$$

Proof

The proof follows from Theorem 2.2 applied to the set S of vertices with loops in \(L(G_S)\). \(\square \)

The incidence matrix \(B(G_S)\) of \(G_S\) can be defined in full analogy with the incidence matrix B(G) of G. Suppose that G is a graph of order n and size m, with the set of vertices \(V(G)=\{v_1, v_2,\ldots , v_n\}\), and the set of edges \(E(G)=\{e_1, e_2,\ldots , e_m\}\). Let \({\mathcal {L}}=\{e_{m+1}, e_{m+2},\ldots , e_{m+\sigma }\}\) be the set of loops of \(G_S\). The incidence matrix \(B(G_S)=(b^S_{ij})\) of \(G_S\) is an \(n\times (m+\sigma )\) matrix defined as

$$\begin{aligned} b^S_{ij}=\left\{ \begin{array}{ll} 1, &{} \hbox {if}\, v_i\, \hbox { and}\, e_j\, \hbox { are incident;} \\ 0, &{} \hbox {otherwise.} \end{array} \right. \end{aligned}$$

Actually, \(B(G_S)=\left( B(G)\,|\,N\right) \), where N can be interpreted as the vertex-loop incidence matrix of \(G_S\). Precisely, N is a \(n\times \sigma \) matrix, such that in each column of N there is exactly one 1, and all other entries are equal to 0.

We find it is convenient to define the incidence matrix of a self-loop graph \(G_S\) in this way. Namely, if we were to define the signless Laplacian matrix \(Q(G_S)=(q_{ij})_{n \times n}\) of \(G_S\) by analogy with how the Laplacian matrix of a self-loop graph is defined in [2], i.e.

$$\begin{aligned} q_{ij}=\left\{ \begin{array}{lll} 1, &{} \hbox {if vertices }\,v_i \,\hbox {and}\, v_j\,\hbox { are adjacent,} \\ 0, &{} \hbox {if vertices} \,v_i \,\hbox {and}\, v_j\,\,\hbox { are not adjacent,} \\ d_G(v_i)+1, &{} \hbox {if}\, i=j \,\hbox {and}\, v_i\in S,\\ d_G(v_i), &{} \hbox {if}\, i=j\,\hbox { and} v_i\not \in S, \end{array} \right. \end{aligned}$$

we would obtain that \(B(G_S)B(G_S)^T=Q(G_S)\). An analogous relation holds for the corresponding matrices of graphs without loops, i.e., \(B(G)B(G)^T=Q(G)\), where Q(G) is the signless Laplacian matrix of G,  see [6, Equation (7.29)].

Theorem 2.6

For every eigenvalue \(\lambda \) of \(L(G_S),\) \(\lambda \ge -2\).

Proof

Let \(N^T=({\mathfrak {n}}_{ij})_{\sigma \times n}\) and \(B(G)=(b_{jk})_{n\times m}\). The (ik)-th entry of the matrix \(N^TB(G)\) is equal to \(\sum _{p=1}^{n} {\mathfrak {n}}_{ip}b_{pk}\). The addition \({\mathfrak {n}}_{ip}b_{pk}\), for every \(p=1, 2, \ldots , n\), is equal to 1 when \({\mathfrak {n}}_{ip}=1\) and \(b_{pk}=1\), which means that both the loop i and the edge k are incident with the vertex p in G, i.e. that the loop i is adjacent to the edge k in \(L(G_S)\). Since there is at most one loop attached at each vertex of G, it follows that \(N^TB(G)=M\). So, we have:

$$\begin{aligned} B(G_S)^T B(G_S)&=\left( \begin{array}{cc} B(G)^TB(G) &{} B(G)^TN \\ N^TB(G) &{} N^TN \\ \end{array} \right) = \left( \begin{array}{cc} A(L(G))+2I_m &{} M^T \\ M &{} I_\sigma \\ \end{array} \right) \\&= A(L(G_S))+2\,{\mathfrak {I}}_m, \end{aligned}$$

since \( B(G)^TB(G)=A(L(G))+2I_m\) (see [6, Equality (1.2)]). Here, \({\mathfrak {I}}_m\) is the square matrix of order \(m+\sigma \) with exactly m ones on the main diagonal, and all other entries equal to zero, i.e.

$$\begin{aligned} {\mathfrak {I}}_m=\left( \begin{array}{cc} I_m &{} O^T \\ O &{} O \\ \end{array} \right) . \end{aligned}$$

For any vector \(x\in {\mathbb {R}}^{m+\sigma }\), we find

$$\begin{aligned} x^T B(G_S)^T B(G_S)\,x=(B(G_S) x)^T B(G_S)\,x\ge 0, \end{aligned}$$

which means that \(B(G_S)^T B(G_S)\) is a positive-semidefinite matrix. By applying Inequality (1.2) from Theorem 1.1 to matrices \(B(G_S)^T B(G_S)\) and \(-2\,{\mathfrak {I}}_m\), we obtain

$$\begin{aligned} \lambda _{m+\sigma }(L(G_S))\ge \lambda _{m+\sigma }(B(G_S)^T B(G_S))+\lambda _{m+\sigma }(-2\,{\mathfrak {I}}_m)\ge -2. \end{aligned}$$

\(\square \)

The following statement will be used in the proof of Theorem 2.8.

Lemma 2.7

[6, Equation (2.29)] Let M be a non-singular square matrix. If Q is also a square matrix, then,

$$\begin{aligned} \det \left( \begin{array}{cc} M &{} N \\ P &{} Q \\ \end{array} \right) =\det (M) \det (Q-P\,M^{-1}\,N). \end{aligned}$$

Theorem 2.8

Let G be a graph of order n and size m. Then,

$$\begin{aligned} P_{L({\widehat{G}})}(\lambda )=(\lambda -1)^{n-m}\lambda ^m P_{L(G)}\left( \frac{\lambda ^2-\lambda -2}{\lambda }\right) . \end{aligned}$$

Proof

Since the adjacency matrix \(A(L({\widehat{G}}))\) of \(L({\widehat{G}})\) is of the form

$$\begin{aligned} A(L({\widehat{G}}))=\left( \begin{array}{cc} I_n &{} B(G) \\ B(G)^T &{} A(L(G)) \\ \end{array} \right) , \end{aligned}$$

by Lemma 2.7, we obtain:

$$\begin{aligned} P_{L({\widehat{G}})}(\lambda )&= \det \left( \lambda I_{m+n}-A(L({\widehat{G}}))\right) \\&= \det \left( (\lambda -1)I_n\right) \det \left( \lambda I_m-A(L(G))-B(G)^T((\lambda -1)I_n)^{-1}B(G)\right) \\&= (\lambda -1)^n\,\det \left( \lambda I_m-A(L(G))-\frac{1}{\lambda -1}B(G)^T\,B(G)\right) \\&= (\lambda -1)^n\,\det \left( \lambda I_m-A(L(G))-\frac{1}{\lambda -1}\left( A(L(G))+2I_m\right) \right) \\&= (\lambda -1)^n\,\det \left( \frac{\lambda ^2-\lambda -2}{\lambda -1}I_m-\frac{\lambda }{\lambda -1}A(L(G))\right) \\&= (\lambda -1)^{n-m}\lambda ^m\det \left( \frac{\lambda ^2-\lambda -2}{\lambda }I_m-A(L(G))\right) \\&= (\lambda -1)^{n-m}\lambda ^mP_{L(G)}\left( \frac{\lambda ^2-\lambda -2}{\lambda }\right) . \end{aligned}$$

\(\square \)

3 Some New Bounds for the Eigenvalues of Self-Loop Graphs and its Energy

In this section, some bounds for the eigenvalues of a self-loop graph are exposed, together with some lower bounds for the energy of such a graph. We start with the following statement:

Theorem 3.1

Let G be a graph of order n, whose eigenvalues with respect to the adjacency matrix are \(\lambda _1(G)\ge \lambda _2(G)\ge \cdots \ge \lambda _n(G)\). Let \(G_S\) be the self-loop graph of G, such that \(S\subseteq V(G)\) and \(|S|=\sigma \) \((0\le \sigma \le n)\). Then, for the eigenvalues \(\lambda _i(G_S)\), \(1\le i\le n\), of \(G_S\) the following holds

$$\begin{aligned} \lambda _i(G)\le \lambda _i(G_S)\le \lambda _i(G)+1, \, 1\le i\le n. \end{aligned}$$
(3.1)

The left-hand side inequality in (3.1) is attained for \(\sigma =0\), while the right-hand side inequality for \(\sigma =n\).

Proof

The adjacency matrix \(A(G_S)\) of \(G_S\) is of the form \(A(G_S)=A(G)+{\mathfrak {I}}_{S}\), where A(G) is the adjacency matrix of G, while \({\mathfrak {I}}_{S}\) is a matrix with exactly \(\sigma \) ones on the main diagonal and all other entries equal to zero. The eigenvalues of \({\mathfrak {I}}_{S}\) are \([1]^{\sigma }\) and \([0]^{n-\sigma }\).

Let us suppose that \(0<\sigma <n\). Then, for \(i=j\), from Inequality (1.1), we find

$$\begin{aligned} \lambda _i(G_S)\le \lambda _i(G)+1,\, 1\le i\le n, \end{aligned}$$

while from Inequality (1.2), we obtain

$$\begin{aligned} \lambda _i(G_S)\ge \lambda _i(G),\, 1\le i\le n. \end{aligned}$$

For the equalities, we adopt the argument of [15, Lemma 1, proof]: the case when \(\sigma =0\) is clear because \(G_S\) coincides with G;  when \(\sigma =n,\) \(\lambda _i(G_S)=\lambda _i(G)+1\) due to \(A(G_S)=A(G)+I_n.\) \(\square \)

Remark 3.2

Since \(\lambda _1(G)\le \Delta \), using Theorem 3.1, we obtain \(\lambda _1(G_S)\le \Delta +1\), which is given by [1, Theorem 5.1].

Corollary 3.3

Let \(G_S\) be the self-loop graph of a graph G of size m, and \(\lambda _1(G_S)\) be the spectral radius of \(G_S.\) Then,

$$\begin{aligned} \lambda _1(G_S) \le \frac{1}{2}(1+\sqrt{1+8m}). \end{aligned}$$
(3.2)

Proof

By Stanley’s Inequality in [27], \(\lambda _1(G) \le \frac{1}{2} (-1 + \sqrt{1+8\,m}).\) The inequality (3.2) follows immediately from Theorem 3.1. \(\square \)

Let us recall the following statement.

Theorem 3.4

[1, Theorem 5.2] Let G be a connected graph of order n and size m. If \(S \subseteq V(G)\) with \(|S|=\sigma ,\) then

$$\begin{aligned} \lambda _1(G_S) \ge \frac{2m}{n} + \frac{\sigma }{n}. \end{aligned}$$

If G is a \((k,k+1)\)-bidegreed graph for some \(k \in {{\mathbb {N}}},\) such that

$$\begin{aligned} d_G(v) = {\left\{ \begin{array}{ll} k, &{} \text { if } v\in S, \\ k+1, &{} \text { if } v \in V(G)\backslash S, \end{array}\right. } \end{aligned}$$

where \(d_G\) is the degree of vertices of G,  then \(\lambda _1(G_S) = \dfrac{2\,m}{n} + \dfrac{\sigma }{n}.\)

Theorem 3.5

Let G be a graph of order n \((n\ge 2)\) and \(S\subseteq V(G), |S|=\sigma \). Then,

$$\begin{aligned} {\mathcal {E}}(G_S)\ge 2\lambda _1(G_S)-\frac{2\sigma }{n}. \end{aligned}$$

The equality is attained if \(G_S=K_n^{\sigma }\), where \(K_n^{\sigma }\) is a graph obtained by attaching a loop at each of \(\sigma \) \((0\le \sigma \le n)\) chosen vertices of the complete graph \(K_n\).

Proof

Let \(\lambda _1(G_S)\ge \lambda _2(G_S)\ge \cdots \ge \lambda _n(G_S)\) be the eigenvalues of \(G_S\), and let k \((1\le k\le n)\) be the greatest integer such that \(\lambda _k(G_S)\ge \frac{\sigma }{n}\). Since \(\sum \limits _{i=1}^{n} \lambda _i(G_S)=\sigma \), we have \(\sum \limits _{i=1}^{n} \left( \lambda _i(G_S)-\frac{\sigma }{n}\right) =0\). So,

$$\begin{aligned} {\mathcal {E}}(G_S)=\sum \limits _{i=1}^{n} \left| \lambda _i(G_S)-\frac{\sigma }{n}\right| =2\,\sum \limits _{i=1}^{k} \left( \lambda _i(G_S)-\frac{\sigma }{n}\right) \ge 2\,\left( \lambda _1(G_S)-\frac{\sigma }{n}\right) , \end{aligned}$$

since according to Theorem 3.4, it holds that \(\lambda _1(G_S)\ge \frac{\sigma }{n}\). The second part of the statement can be verified by the direct computation using the results of Theorem 4.12 in the next section. \(\square \)

Using Theorems 3.4 and 3.5, it follows:

Corollary 3.6

Let G be a connected graph of order n \((n\ge 2)\) and size m, and let \(S\subseteq V(G)\) and \(|S|=\sigma \) \((0\le \sigma \le n)\). Then

$$\begin{aligned} {\mathcal {E}}(G_S)\ge \frac{4m}{n}. \end{aligned}$$

Now, let us recall the statements which we will use in the proof of Corollary 3.9.

Theorem 3.7

[6, Theorem 3.2.1] Let \(\lambda _1(G)\) be the index of a graph G, and let \({\overline{d}}\) be its average degree. Then \({\overline{d}}\le \lambda _1(G)\le \Delta \). Moreover, \({\overline{d}}=\lambda _1(G)\) if and only if G is regular. For a connected graph G, \(\lambda _1(G)=\Delta \) if and only if G is regular.

Theorem 3.8

[5, Theorem 6.7] A graph has exactly one positive eigenvalue if and only if its non-isolated vertices form a complete multipartite graph.

Corollary 3.9

Let G be a regular complete multipartite graph. Then, for every \(S \subseteq V(G),\) \({\mathcal {E}}(G_S)\ge {\mathcal {E}}(G)\).

Proof

If we suppose that G has k classes of p vertices, i.e. the order n of G is \(n=k\,p\), then the spectrum of G is (see [5], p.73): \(\textrm{Spec}(G)=\left( \begin{array}{ccc} n-p &{} 0 &{} -p \\ 1 &{} n-k &{} k-1 \\ \end{array} \right) .\) So we find \({\mathcal {E}}(G)=2\lambda _1(G)=2(n-p)\). Since G is an \((n-p)\)-regular, \(|E(G)|=\frac{n(n-p)}{2}\), which means \({\mathcal {E}}(G)=\frac{4}{n}|E(G)|\). Therefore, the proof follows from Corollary 3.6. \(\square \)

Next, we provide an analogous result to Theorem 3.5. Consequently, the regularity condition in Corollary 3.9 can be relaxed under certain conditions.

Theorem 3.10

Let G be a graph of order \(n \ge 4.\) Let \(S\subset V(G)\), where \(|S|=\sigma \) and \(1\le \sigma \le \frac{n}{2}\). If the induced subgraph on S is not a complete graph, then

$$\begin{aligned} {\mathcal {E}}(G_S) \ge 2 \lambda _1(G_S). \end{aligned}$$

Proof

It holds \(\sum ^n_{i=1} \lambda _i(G_S) = \sigma ,\) so

$$\begin{aligned} {{\mathcal {E}}}(G_S) = 2 \sum ^t_{i=1} \left( \lambda _i(G_S) - \frac{\sigma }{n} \right) , \end{aligned}$$
(3.3)

where t is the greatest integer such that \(\lambda _i(G_S) \ge \frac{\sigma }{n}.\) Since the induced subgraph on S is not a complete graph, there are two non-adjacent vertices in S,  i.e., \(2\widehat{K_1}\) is an induced subgraph of \(G_S.\) By Theorem 1.2, we get

$$\begin{aligned} \lambda _i (G_S) \ge \lambda _i (2 \widehat{K_1}) = 1, \quad i=1,2. \end{aligned}$$

Thus, it follows from (3.3) and \(\sigma \le \frac{n}{2}\) that

$$\begin{aligned} {{\mathcal {E}}}(G_S) \ge 2\lambda _1(G_S) + 2\left( 1- \frac{2\sigma }{n}\right) \ge 2 \lambda _1(G_S). \end{aligned}$$

\(\square \)

Corollary 3.11

If G is a complete multipartite graph of order \(n \ge 4\) and \(S \subset V(G),\) \(1 \le |S|\le \frac{n}{2},\) and the induced subgraph on S is not a complete graph, then \({\mathcal {E}}(G_S) \ge {\mathcal {E}}(G).\)

4 Nordhaus–Gaddum-Type Bounds for Spectral Radius of Self-Loop Graphs

In this section, we establish Nordhaus–Gaddum-type bounds, as well as some lower and upper bounds, for the spectral radius of \(G_S.\) Precisely, we give a new definition of the complement \(\overline{G_S}\) of \(G_S\) (see Definition 4.3) and find bounds for the sum of some particular eigenvalues of \(G_S\) and \(\overline{G_S}\).

We will start with an upper bound for the spectral radius of \(G_S.\)

Theorem 4.1

Let \(G_S\) be the self-loop graph of G of order \(n \ge 2,\) size \(m \ge 1,\) and \(|S|=\sigma .\) Then,

$$\begin{aligned} \lambda _1(G_S) \le \frac{\sigma }{n} + \sqrt{\frac{\sigma (n-1)(n-\sigma )}{n^2} + \frac{2m(n-1)}{n}}. \end{aligned}$$
(4.1)

Proof

In the following, for simplicity, we write \(\lambda _i=\lambda _i(G_S), i=1,...,n.\) By Lemma 1.3(i),

$$\begin{aligned} \lambda _1 - \sigma = - (\lambda _2 + \cdots + \lambda _n). \end{aligned}$$
(4.2)

Thus, by Cauchy-Schwarz Inequality, we have

$$\begin{aligned} \lambda _2^2 + \cdots + \lambda _n^2 \ge \frac{(\lambda _1-\sigma )^2}{n-1}. \end{aligned}$$
(4.3)

Lemma 1.3 and equation (4.3) imply that

$$\begin{aligned} 2m+\sigma&= \lambda _1^2 + (\lambda ^2_2+\cdots + \lambda _n^2) \\&\ge \lambda _1^2 +\frac{(\lambda _1-\sigma )^2}{n-1} \\&= \frac{n\lambda _1^2-2\sigma \lambda _1 + \sigma ^2}{n-1}, \end{aligned}$$

or equivalently,

$$\begin{aligned} n\lambda _1^2 - 2 \sigma \lambda _1 + \sigma ^2- (n-1)(2m+\sigma ) \le 0. \end{aligned}$$
(4.4)

The roots of \(n\lambda _1^2 - 2 \sigma \lambda _1 + \sigma ^2- (n-1)(2\,m+\sigma )=0\) are as follows:

$$\begin{aligned} x_i&= \frac{\sigma }{n} \pm \sqrt{\frac{\sigma ^2}{n^2} - \frac{\sigma ^2}{n} + \frac{n-1}{n}(2m+\sigma )} \\&= \frac{\sigma }{n} \pm \sqrt{\frac{\sigma (n-1)(n-\sigma )}{n^2} + \frac{2m(n-1)}{n}}. \end{aligned}$$

It follows from (4.4) that

$$\begin{aligned} \lambda _1 \le \frac{\sigma }{n} + \sqrt{\frac{\sigma (n-1)(n-\sigma )}{n^2} + \frac{2m(n-1)}{n}}. \end{aligned}$$

\(\square \)

Corollary 4.2

When \(\sigma =0,\) (4.1) reduces to \(\lambda _1(G) \le \sqrt{\dfrac{2\,m(n-1)}{n} }\) given by Nosal [24].

Definition 4.3

Let \(G_S\) be the self-loop graph of G of order n,  size m,  and \(S \subseteq V(G)\) with \(|S|=\sigma .\) Define the complement \(\overline{G_S}\) of \(G_S\) to be \({\overline{G}}_S,\) i.e., the graph obtained from \({\overline{G}}\) by attaching loops at (its) vertices belonging to the set S.

This definition of \(\overline{G_S}\) satisfies the property \(\overline{\overline{G_S}} = G_S.\) There is another possible definition of \(\overline{G_S}\) recently considered in [26], by taking \(\overline{G_S}:= {\overline{G}}_{V \backslash S}.\) Despite the latter definition also satisfies \(\overline{\overline{G_S}} = G_S,\) our definition of \(\overline{G_S}\) gives a natural generalization of a Nordhaus–Gaddum-type bound for \(\lambda _1(G_S)\) and \(\lambda _1(\overline{G_S}),\) in the sense that we recover the classical case when \(\sigma =0,\) see Remark 4.5.

Theorem 4.4

Let \(G_S\) be a connected self-loop graph of order \(n \ge 2,\) size \(m \ge 1,\) with \(|S|=\sigma ,\) such that its complement \(\overline{G_S}\) of size \({\overline{m}}\) is also connected. Let \(\lambda _1\) and \({\overline{\lambda }}_1\) be the spectral radius of \(G_S\) and \(\overline{G_S}\), respectively. Then,

$$\begin{aligned} n-1+ \frac{2\sigma }{n} \le \lambda _1+{\overline{\lambda }}_1 \le \frac{2\sigma }{n} + \sqrt{2} \sqrt{\frac{2\sigma (n-1)(n-\sigma )}{n^2} + (n-1)^2}. \end{aligned}$$
(4.5)

Proof

Recall that

$$\begin{aligned} m+{\overline{m}}= \frac{n(n-1)}{2}. \end{aligned}$$
(4.6)

By Theorem 3.4, we have \(\lambda _1 \ge \dfrac{2\,m}{n}+ \dfrac{\sigma }{n},\) thus

$$\begin{aligned} \lambda _1 + {\overline{\lambda }}_1\ge \frac{2(m+{\overline{m}})}{n}+ \frac{2\sigma }{n}= n-1+ \frac{2\sigma }{n}. \end{aligned}$$
(4.7)

This gives the lower bound of (4.5).

Next, we show the upper bound of (4.5). Let

$$\begin{aligned} x&= \frac{\sigma (n-1)(n-\sigma )}{n^2} + \frac{2m(n-1)}{n}, \\ y&= \frac{\sigma (n-1)(n-\sigma )}{n^2} + \frac{2{\overline{m}}(n-1)}{n}. \end{aligned}$$

Then, by the property (4.6) again,

$$\begin{aligned} x+y = \frac{2\sigma (n-1)(n-\sigma )}{n^2} + (n-1)^2. \end{aligned}$$
(4.8)

Obviously, we have

$$\begin{aligned} \sqrt{x} + \sqrt{y} \le \sqrt{2}\sqrt{x+y}. \end{aligned}$$
(4.9)

Thus, combining (4.1),(4.8),(4.9), we obtain

$$\begin{aligned} \lambda _1 + {\overline{\lambda }}_1&\le \frac{2\sigma }{n} + \sqrt{2}\sqrt{x+y} \\&= \frac{2\sigma }{n} + \sqrt{2} \sqrt{\frac{2\sigma (n-1)(n-\sigma )}{n^2} + (n-1)^2}. \end{aligned}$$

This completes the proof. \(\square \)

Remark 4.5

When \(\sigma =0,\) (4.5) reduces to the classical Nordhaus–Gaddum-type bound for the spectral radius of a simple graph G of order n,  given by Nosal [24]

$$\begin{aligned} n-1 \le \lambda _1 + {\overline{\lambda }}_1 \le \sqrt{2}(n-1). \end{aligned}$$
(4.10)

Now, we will expose the upper bound for \(\lambda _1+\overline{\lambda _1}\) in terms of \(\Delta (G)\) and \(\delta (G).\)

Theorem 4.6

Let G be a graph of order n and \(\lambda _1\) and \({\overline{\lambda }}_1\) be the spectral radius of \(G_S\) and \(\overline{G_S}\), respectively. Then, we have

$$\begin{aligned} \lambda _1 + {\bar{\lambda }}_1 \le n+1 + (\Delta (G) - \delta (G)). \end{aligned}$$
(4.11)

Proof

By Theorem 3.1, \(\lambda _1 \le \Delta (G) +1,\) \({\bar{\lambda }}_1 \le (n-1 - \delta (G)) +1.\) Thus, we find (4.11). \(\square \)

Remark 4.7

The upper bound of (4.11) improves the upper bound of (4.10) for sufficiently large n and small \(\kappa := \Delta (G)-\delta (G).\) More precisely, \(n+1+\kappa < \sqrt{2}(n-1)\) when

$$\begin{aligned} n > 4\kappa + 9. \end{aligned}$$

The next result asserts a lower bound of the spectral radius of \(G_S\) in terms of the first Zagreb index \(M_1(G)\) and the minimum degree \(\delta (G)\). Before that, let us recall the following theorem.

Theorem 4.8

[28, Theorem 3.2] Let \(A=(a_{ij})\) be an \(n \times n\) non-negative symmetric matrix with positive row sums \(r_1,r_2,\ldots , r_n.\) Then, \(\lambda _1(A) \ge \sqrt{\sum ^n_{i=1} {r_i}^2/n}\) with equality if and only if A is regular or semiregular.

Theorem 4.9

Let \(G_S\) be a connected graph of order n,  size m,  and \(|S|=\sigma \). Let \(\lambda _1(G_S)\) be the spectral radius of \(G_S\). Let \(M_1(G)\) and \(\delta (G)\) be the first Zagreb index and minimum degree of G,  respectively. Then,

$$\begin{aligned} \lambda _1(G_S) \ge \sqrt{\frac{M_1(G)}{n} + \frac{\sigma }{n}(2\delta (G)+1)}. \end{aligned}$$
(4.12)

In particular, when

  1. (i)

    \(G_S \cong \widehat{K_n},\) or,

  2. (ii)

    G is a \((k,k+1)\)-semiregular graph such that \(d_G(v)=k\) if \(v\in S,\) \(d_G(v)=k+1\) if \(v \in V(G)\backslash S,\)

then, the equality holds.

Proof

By Theorem 4.8, we have \(\sqrt{n} \lambda _1(G_S) \ge \sqrt{\sum ^n_{i=1} {r_i}^2},\) where

$$\begin{aligned} \sum ^n_{i=1} {r_i}^2&= \sum _{v \in S} (d_{G} (v) + 1)^2 + \sum _{v \in V\backslash S} d^2_{G}(v) \nonumber \\&=M_1(G) + 2\sum _{v \in S} d_G(v) + \sigma \nonumber \\&\ge M_1(G) + \sigma (2\delta (G) + 1). \end{aligned}$$
(4.13)

Thus, we obtain Inequality (4.12). To see that the equality is attainable, we discuss two cases.

Case 1: \(G_S \cong \widehat{K_n}.\) By [1, Theorem 5.1] that asserts that \(\lambda _1(G_S) = n \) if and only if \(G_S \cong \widehat{K_n},\) it suffices to check the right side of Inequality (4.12):

$$\begin{aligned} \sqrt{\frac{M_1(K_n)}{n} + \frac{n(2(n-1)+1)}{n}} = n. \end{aligned}$$

Case 2: Suppose G is a \((k,k+1)\)-semiregular graph such that \(d_G(v)=k\) if \(v\in S,\) \(d_G(v)=k+1\) if \(v \in V(G)\backslash S.\) (Such graphs exist, e.g. \((K_{3,2})_{S}\) with \(S=M,\) \(|M|=3.\)) By Theorem 3.4, we have \(\lambda _1(G_S) = \frac{2\,m+\sigma }{n}= k+1.\) Now, observe that for such graphs,

$$\begin{aligned} M_1(G) = \sigma k^2 + (n-\sigma )(k+1)^2 = nk^2 + (n-\sigma )(2k+1). \end{aligned}$$

Thus,

$$\begin{aligned} \sqrt{\frac{M_1(G)}{n} + \frac{\sigma (2\delta (G)+1)}{n}} = \sqrt{k^2 + \frac{(n-\sigma )(2k+1)}{n} + \frac{\sigma (2k+1)}{n}} =k+1. \end{aligned}$$

\(\square \)

Remark 4.10

  1. (1)

    When \(\sigma =0,\) Inequality (4.12) reduces to the classically known bound \(\lambda _1(G) \ge \sqrt{M_1(G)/n}\) between the spectral radius and the first Zagreb index of G.

  2. (2)

    Recently, Shetty and Bhat [26] have obtained many results regarding \(M_1(G_S).\) In particular, [26, Theorem 7] asserts that

    $$\begin{aligned} \lambda _1(G_S) \ge \sqrt{\frac{M_1(G_S) - 4(m+\sigma )}{n}+1} \end{aligned}$$

    under the same assumption as in Theorem 4.9. One oughts to compare these two inequalities but with some cautions: our Inequality (4.12) only requires \(M_1(G).\) First, observe that

    $$\begin{aligned} M_1(G_S) = \sum _{v \in V} d^2_{G_{S}}(v) = \sum _{v \in S} (d_G(v) +2)^2 + \sum _{v \in V\backslash S} d^2_G(v) = M_1(G) + 4 \sum _{v \in S} d_G(v)+ 4\sigma . \end{aligned}$$

    Thus,

    $$\begin{aligned} \frac{M_1(G_S)-4(m+\sigma )+n}{n} = \frac{M_1(G)}{n} + \frac{4\sum _{v\in S} d_G(v) -4m +n}{n}. \end{aligned}$$

    It suffices to compare \(4\sum _{v\in S} d_G(v) -4m +n\) and \(\sigma (2\delta +1).\) Observe further that

    $$\begin{aligned} 4\sum _{v\in S} d_G(v) - 4m = 2 \sum _{v \in S} d_G(v) - 2 \sum _{v \in V\backslash S} d_G(v) \le 2\sigma \Delta + 2\sigma \delta -2n\delta . \end{aligned}$$

    Thus,

    $$\begin{aligned} 4\sum _{v\in S} d_G(v) -4m +n - \sigma (2\delta +1)&\le 2\sigma \Delta + 2\sigma \delta -2n\delta + n - 2\sigma \delta - \sigma \\&= 2(\sigma \Delta -n\delta ) + n-\sigma . \end{aligned}$$

    For \(0 \le \sigma <n,\) as long as

    $$\begin{aligned} \frac{\sigma }{n} \le \frac{2\delta (G)-1}{2\Delta (G)-1}, \end{aligned}$$

    then we have

    $$\begin{aligned} \sqrt{\frac{M_1(G_S)-4(m+\sigma )}{n} +1} \le \sqrt{\frac{M_1(G)+ \sigma (2\delta +1)}{n}} \le \lambda _1(G_S), \end{aligned}$$

    i.e., our bound is better than [26, Theorem 7].

Remark 4.11

If \(G_S=\widehat{\overline{K_n}}\) is the edgeless full-loop graph of order n, then the equality in (4.12) holds.

Next, we establish a relation between the eigenvalues of \(G_S\) and \(\overline{G_S}.\) Let us recall the following statement.

Theorem 4.12

[1, Theorem 2.2] Let \((K_n)_S\) be the self-loop complete graph of order n and \(|S|=\sigma .\) Then, \(\textrm{Spec}((K_n)_S)\) is determined by the following three cases:

  1. (i)

    If \(\sigma =0,\) then \(\textrm{Spec}((K_n)_S) = \begin{pmatrix} n-1 &{} -1 \\ 1 &{} n-1 \end{pmatrix}.\)

  2. (ii)

    If \(0<\sigma <n,\) then

    $$\begin{aligned} \textrm{Spec}((K_n)_S) = \begin{pmatrix} \frac{(n-1)+\sqrt{(n-1)^2+4\sigma }}{2} &{}0 &{} -1 &{} \frac{(n-1)-\sqrt{(n-1)^2+4\sigma }}{2} \\ 1 &{} \sigma -1 &{} n-\sigma -1 &{}1 \end{pmatrix}. \end{aligned}$$
  3. (iii)

    If \(\sigma =n,\) then \(\textrm{Spec}((K_n)_S) = \begin{pmatrix} n &{} 0 \\ 1 &{} n-1 \end{pmatrix}.\)

Theorem 4.13

Let \(G_S\) be a graph with self-loops of order n and \(|S|=\sigma .\) Then, for \(j=2,...,n,\)

$$\begin{aligned} \lambda _j(G_S) + \lambda _{n-j+2}(\overline{G_S}) \le {\left\{ \begin{array}{ll} -1, &{}\quad \sigma =0, \\ 1, &{}\quad 0<\sigma \le n. \end{array}\right. } \end{aligned}$$

Proof

Let \(A=A(G_S),\) \(B=A(\overline{G_S}),\) and \(C=A+B.\) By (1.2) in Theorem 1.1, for \(i=2\) and \(j=2,...,n,\)

$$\begin{aligned} \lambda _j(A) + \lambda _{n-j+2}(B) \le \lambda _2(C). \end{aligned}$$

Observe that C can also be expressed as \(A' +B'\) where \(A'=A((K_n)_S)\) and \(B'= {\mathfrak {I}}_{S}.\) Then, by (1.1), for \(i=2,\) we have for \(j'=1\) or \(j'=2,\)

$$\begin{aligned} \lambda _2(C) \le \lambda _{j'}(A') + \lambda _{3-j'}(B'). \end{aligned}$$

By Theorem 4.12. \(A'=A((K_n)_S)\) has 3 distinct spectral cases:

Case 1: When \(\sigma =0,\) \(A'=A(K_n)\) and \(B'={\textbf {0}}_{n\times n}.\) Thus, \(\lambda _{2}(C) = \lambda _{2}(A(K_n))= -1.\)

Case 2: When \(\sigma =n,\) \(A'=A(\widehat{K_n})\) and \(B'= I_n.\) Then, \(C= J + I_n\) where J is the all-ones matrix. Thus, \(\lambda _{2}(C)=1\).

Case 3: Suppose \(0<\sigma <n.\) If \(j'=1,\) then,

$$\begin{aligned} \lambda _2(C) \le \lambda _1(A') + \lambda _2(B') = {\left\{ \begin{array}{ll} \frac{(n-1)+ \sqrt{(n-1)^2 + 4\sigma }}{2} + 1, &{} 1<\sigma <n, \\ \frac{(n-1)+ \sqrt{(n-1)^2 + 4\sigma }}{2}, &{} \sigma =1. \end{array}\right. } \end{aligned}$$

If \(j'=2,\) then, \( \lambda _2(C) \le \lambda _2(A') + \lambda _1(B') \le 0 + 1 =1.\) Thus, when \(0<\sigma <n,\) we have \(\lambda _2(C) \le 1.\) \(\square \)

Theorem 4.14

[22, Theorem 11] For \(i =2,...,n,\) \(\lambda _i(G) + \lambda _{n-i+2}({\overline{G}}) \ge -1 -2\sqrt{2\,s(G)},\) where \(s(G)= \sum _{v \in V(G)} \left| d_G(v) - \frac{2m}{n}\right| .\)

Thus, a lower bound for \(\lambda _j(G_S) + \lambda _{n-j+2}(\overline{G_S})\) follows immediately from Theorems 3.1 and 4.14.

Corollary 4.15

Let \(G_S\) be a self-loop graph of order n and \(|S|=\sigma .\) Let \(\overline{G_S}\) be the complement of \(G_S.\) Then, for \(j=2,...,n,\) \(\lambda _j(G_S) + \lambda _{n-j+2}(\overline{G_S}) \ge -1- 2\sqrt{2\,s(G)}.\)

5 Nordhaus–Gaddum-Type Bounds for the Energy of a Self-Loop Graph

In this section, we present a Nordhaus–Gaddum-type bound for the energy of a graph with self-loops, in terms of its order n and the number of loops \(\sigma .\)

First of all, let us recall some statements that we will use in the proof of Theorem 5.3.

Theorem 5.1

[7] Let X, Y and Z be square matrices of order n, such that \(X+Y=Z\). Then

$$\begin{aligned} \sum _{i=1}^{n} s_i(X)+\sum _{i=1}^{n} s_i(Y)\ge \sum _{i=1}^{n} s_i(Z), \end{aligned}$$

where \(s_i(M)\), \(i=1,2,\ldots , n\), are the singular values of the matrix M. Equality holds if and only if there exists an orthogonal matrix P, such that PX and PY are both positive semi-definite.

Theorem 5.2

(Corollary 1.3.13 and Theorem 1.3.14 from [6]) Let A be a real symmetric matrix whose rows and columns are indexed by \(\{1,2,\ldots , n\}\), and with eigenvalues \(\lambda _1\ge \lambda _2\ge \cdots \ge \lambda _n\). Given a partition \(\{1, 2,\ldots , n\}=\Delta _1\,{\dot{\cup }}\,\Delta _2\,{\dot{\cup }}\cdots {\dot{\cup }}\,\Delta _m\) with \(|\Delta _i|=n_i>0\), consider the corresponding blocking \(A=(A_{ij})\), where \(A_{ij}\) is an \(n_i\times n_j\) block. Let \(e_{ij}\) be the sum of the entries in \(A_{ij}\) and set \(B=(e_{ij}/n_i)\) (note that \(e_{ij}/n_i\) is the average row sum in \(A_{ij}\)). Let us suppose that the block \(A_{ij}\) has constant row sums \(b_{ij}\), and let \(B=(b_{ij})\). Then the spectrum of B is contained in the spectrum of A (taking into account the multiplicities of the eigenvalues).

The matrix B from Theorem 5.2 is known as the quotient matrix (see, for example [4]). Besides, in case the row sum of each block \(A_{ij}\) is constant, then the partition is called equitable [4].

Theorem 5.3

Let G be a graph of order \(n\ge 2,\) size \(m\ge 1\), and \(S\subseteq V(G)\), where \(|S|=\sigma \), \(0\le \sigma \le n\). Then,

$$\begin{aligned} {\mathcal {L}}_{n,\sigma }\le {\mathcal {E}}(G_S)+{\mathcal {E}}(\overline{G_S})\le {\mathcal {U}}_{n,\sigma }, \end{aligned}$$

where

$$\begin{aligned} {\mathcal {L}}_{n,\sigma } =&\,(\sigma -1)\left| 1-\frac{2\sigma }{n}\right| +(n-\sigma -1)\left( 1+\frac{2\sigma }{n}\right) + \frac{1}{2}\left| n-\frac{4\sigma }{n}+\sqrt{(n-2)^2+8\sigma }\right| +\\&\, \frac{1}{2}\left| n-\frac{4\sigma }{n}-\sqrt{(n-2)^2+8\sigma }\right| , \end{aligned}$$

and

$$\begin{aligned} {\mathcal {U}}_{n,\sigma }=2\sqrt{2}\,\sqrt{2\sigma (n-1)(n-\sigma )+(n^2-n)^2}. \end{aligned}$$

Proof

Let \(\lambda _1(G_S)\ge \lambda _2(G_S)\ge \cdots \ge \lambda _n(G_S)\) and \(\lambda _1(\overline{G_S})\ge \lambda _2(\overline{G_S})\ge \cdots \ge \lambda _n(\overline{G_S})\) be the eigenvalues of \(G_S\) and \(\overline{G_S}\), respectively.

For the upper bound \({\mathcal {U}}_{n,\sigma }\), let \(k_1\) and \(k_2\), \(1\le k_1, k_2\le n\), be the greatest integers such that \(\lambda _{k_1}(G_S)\ge \frac{\sigma }{n}\) and \(\lambda _{k_2}(\overline{G_S})\ge \frac{\sigma }{n}\). Since \(\sum _{i=1}^{n} \lambda _i(G_S)=\sigma \), we have \(\sum _{i=1}^{n} \left( \lambda _i(G_S)-\frac{\sigma }{n}\right) =0\), and therefore

$$\begin{aligned} {\mathcal {E}}(G_S)=2\,\sum _{i=1}^{k_1}\left( \lambda _i(G_S)-\frac{\sigma }{n}\right) \le 2\,\sum _{i=1}^{k_1}\left( \lambda _1(G_S)-\frac{\sigma }{n}\right) \le 2n\,\left( \lambda _1(G_S)-\frac{\sigma }{n}\right) . \end{aligned}$$

Similarly, we find \({\mathcal {E}}(\overline{G_S})\le 2n\,(\lambda _1(\overline{G_S})-\frac{\sigma }{n})\), and so

$$\begin{aligned} {\mathcal {E}}(G_S)+{\mathcal {E}}(\overline{G_S})\le 2n\,(\lambda _1(G_S)+\lambda _1(\overline{G_S}))-4\sigma . \end{aligned}$$

By Theorem 4.4, we get

$$\begin{aligned} {\mathcal {E}}(G_S)+{\mathcal {E}}(\overline{G_S})\le 2\sqrt{2}\,\sqrt{2\sigma (n-1)(n-\sigma )+(n^2-n)^2}. \end{aligned}$$

For the lower bound, \({\mathcal {L}}_{n,\sigma }\), let us denote

$$\begin{aligned}&X = A(G_S)-\frac{\sigma }{n}I_n = A(G)+{\mathfrak {I}}_S-\frac{\sigma }{n}I_n,\\&Y = A(\overline{G_S})-\frac{\sigma }{n}I_n = A({\overline{G}})+{\mathfrak {I}}_S-\frac{\sigma }{n}I_n=J-A(G)+{\mathfrak {I}}_S-\left( 1+\frac{\sigma }{n}\right) I_n,\\&M = X+Y = J+2{\mathfrak {I}}_S-\left( 1+\frac{2\sigma }{n}\right) I_n. \end{aligned}$$

Therefore, the matrix M is of the following form:

$$\begin{aligned} M=\left( \begin{array}{cc} J+\left( 1-\frac{2\sigma }{n}\right) I_{\sigma } &{} J \\ J &{} J+\left( -\frac{2\sigma }{n}-1\right) I_{n-\sigma } \\ \end{array} \right) , \end{aligned}$$

i.e.

$$\begin{aligned} M=\left( \begin{array}{cccccc} 2-\frac{2\sigma }{n} &{} 1 &{} 1 &{} 1 &{} \cdots &{} 1 \\ \vdots &{} \ddots &{} \vdots &{} \vdots &{} \cdots &{} 1 \\ 1 &{} 1 &{} 2-\frac{2\sigma }{n} &{} 1 &{} \cdots &{} 1 \\ 1 &{} 1 &{} 1 &{} -\frac{2\sigma }{n} &{} \cdots &{} 1 \\ \vdots &{} \vdots &{} \vdots &{} \vdots &{} \ddots &{} \vdots \\ 1 &{} 1 &{} 1 &{} 1 &{} \cdots &{} -\frac{2\sigma }{n} \\ \end{array} \right) . \end{aligned}$$

Since \(\textrm{null}\left( M+\left( 1-\left( 2-\frac{2\sigma }{n}\right) \right) I_n\right) \ge \sigma -1\), M has eigenvalue \(1-\frac{2\sigma }{n}\), with multiplicity at least \(\sigma -1\). Similarly, M has eigenvalue \(-1-\frac{2\sigma }{n}\), with multiplicity at least \(n-\sigma -1\). Let us determine the remaining two eigenvalues, \(x_1\) and \(x_2\), of the matrix M.

The quotient matrix B which corresponds to the matrix M is

$$\begin{aligned} B=\left( \begin{array}{cc} \sigma +1-\frac{2\sigma }{n} &{} n-\sigma \\ \sigma &{} n-\sigma -1-\frac{2\sigma }{n} \\ \end{array} \right) , \end{aligned}$$

while the characteristic polynomial of the matrix B is

$$\begin{aligned} b(x)=x^2+\left( \frac{4\sigma }{n}-n\right) x+\frac{4\sigma ^2}{n^2}-4\sigma -1+n. \end{aligned}$$

According to Theorem 5.2, the roots of the polynomial b(x) are the two remaining eigenvalues of the matrix M, i.e. \(x_{1,2}=\frac{1}{2}\left( n-\frac{4\sigma }{n}\pm \sqrt{(n-2)^2+8\sigma }\right) \).

Now, we have:

$$\begin{aligned} \sum _{i=1}^{n} s_i(M)=&\sum _{i=1}^{n}|\lambda _i(M)|=(\sigma -1)\left| 1-\frac{2\sigma }{n}\right| +(n-\sigma -1)\left( 1+\frac{2\sigma }{n}\right) \\&+ \frac{1}{2}\left| n-\frac{4\sigma }{n}+\sqrt{(n-2)^2+8\sigma }\right| + \frac{1}{2}\left| n-\frac{4\sigma }{n}-\sqrt{(n-2)^2+8\sigma }\right| , \end{aligned}$$

i.e. \(\sum _{i=1}^{n} s_i(M)={\mathcal {L}}_{n,\sigma }\). By Theorem 5.1, we obtain

$$\begin{aligned} {\mathcal {L}}_{n,\sigma }=&\sum _{i=1}^{n} s_i(M) \le \sum _{i=1}^{n} s_i(X)+\sum _{i=1}^{n} s_i(Y)=\sum _{i=1}^{n} |\lambda _i(X)|+\sum _{i=1}^{n} |\lambda _i(Y)|\\ =&\sum _{i=1}^{n}|\lambda _i(G_S)-\frac{\sigma }{n}|+\sum _{i=1}^{n}|\lambda _i(\overline{G_S})-\frac{\sigma }{n}|={\mathcal {E}}(G_S)+{\mathcal {E}}(\overline{G_S}). \end{aligned}$$

The proof is complete. \(\square \)

Remark 5.4

If \(\frac{n}{2}<\sigma \le n\) and \(n\ge 2\), then the following holds:

  • \(1-\frac{2\sigma }{n}<0\),

  • \(n+\sqrt{(n-2)^2+8\sigma }-\frac{4\sigma }{n}>n+\sqrt{(n-2)^2+8\cdot \frac{n}{2}}-\frac{4}{n}\cdot n=n+\sqrt{n^2+4}-4\ge 2+\sqrt{8}-4>0\),

  • \(\frac{4\sigma }{n}+\sqrt{(n-2)^2+8\sigma }-n>\frac{4}{n}\cdot \frac{n}{2}+\sqrt{(n-2)^2+8\cdot \frac{n}{2}}-n=2+\sqrt{n^2+4}-n>2+\sqrt{n^2}-n>0\),

so the lower bound \({\mathcal {L}}_{n,\sigma }\) reduces to

$$\begin{aligned} {\mathcal {L}}_{n,\sigma } =&(\sigma -1)\left( \frac{2\sigma }{n}-1\right) +(n-\sigma -1)\left( 1+\frac{2\sigma }{n}\right) +\frac{1}{2}\left( n+\sqrt{(n-2)^2+8\sigma }-\frac{4\sigma }{n}\right) \\&+\frac{1}{2}\left( \frac{4\sigma }{n}+\sqrt{(n-2)^2+8\sigma }-n\right) , \end{aligned}$$

i.e. \({\mathcal {L}}_{n,\sigma }=n-\frac{4\sigma }{n}+\sqrt{(n-2)^2+8\sigma }\).

Remark 5.5

If \(0\le \sigma \le \frac{n}{2}\) and \(n\ge 2\), then the following holds:

  • \(1-\frac{2\sigma }{n}\ge 1-\frac{2}{n}\cdot \frac{n}{2}=0\),

  • \(n-\frac{4\sigma }{n}\ge n-\frac{4}{n}\cdot \frac{n}{2}=n-2\ge 0\),

and therefore the lower bound \({\mathcal {L}}_{n,\sigma }\) reduces to

$$\begin{aligned} {\mathcal {L}}_{n,\sigma } =&(\sigma -1)\left( 1-\frac{2\sigma }{n}\right) +(n-\sigma -1)\left( 1+\frac{2\sigma }{n}\right) +\frac{1}{2}\left( n-\frac{4\sigma }{n}+\sqrt{(n-2)^2+8\sigma }\right) \\&+\frac{1}{2}\left| n-\frac{4\sigma }{n}-\sqrt{(n-2)^2+8\sigma }\right| , \end{aligned}$$

i.e. \({\mathcal {L}}_{n,\sigma }=\frac{3n}{2}-2+2\sigma \left( 1-\frac{1}{n}-\frac{2\sigma }{n}\right) +\frac{1}{2}\sqrt{(n-2)^2+8\sigma }+\frac{1}{2}\left| n-\frac{4\sigma }{n}\right. \left. -\sqrt{(n-2)^2+8\sigma }\right| \), since the function \(f(\sigma )=n-\frac{4\sigma }{n}-\sqrt{(n-2)^2+8\sigma }\) does not have a constant sign on the interval \(\left[ 0,\frac{n}{2}\right] \).