The non-negative spectrum of a digraph


 Given the adjacency matrix A of a digraph, the eigenvalues of the matrix AAT
 constitute the so-called non-negative spectrum of this digraph. We investigate the relation between the structure of digraphs and their non-negative spectra and associated eigenvectors. In particular, it turns out that the non-negative spectrum of a digraph can be derived from the traditional (adjacency) spectrum of certain undirected bipartite graphs.


Introduction
Spectral graph theory is a wide eld of research where we study the spectral properties of matrices associated with graphs and in particular try to link them to the structural properties of those graphs. The most classic example is the adjacency matrix A(G) of a graph G, which is the --matrix re ecting the vertex adjacency relation of the graph. Other frequently studied matrices are the Laplacian matrix L(G) := D(G) − A(G) and the signless Laplacian matrix Q(G) := D(G) + A(G), where D(G) is the diagonal matrix of the respective vertex degrees. Changing the order in which the vertices of G are indexed will change each of these matrices, but only by a permutation similarity transformation. Hence, both eigenvalues and eigenvectors (when viewed as real functions on the vertex set) will remain unchanged and can be attributed to the given graph G.
Perhaps the most important advantage of the mentioned matrices is their symmetry (because the adjacency relation of an undirected graph is obviously symmetric), so the matrices are diagonizable. Thus, the eigenspace dimensions match to the multiplicities of the respective roots of the characteristic polynomial of the matrix. Moreover, the spectrum is real. Turning to digraphs, we nd that the adjacency relation of a digraph is usually not symmetric. So, studying the spectral properties of its adjacency matrix may reveal interesting insights [1], but we may not rely on the mentioned advantages. As a consequence, some researchers have considered alternative matrix choices, such as the (complex valued) Hermitian-adjacency matrix (see [2,3]). Opposed to that, in [4]

the author considers the (real) matrices N out (D) = A(D)A(D) T and N in (D) = A(D) T A(D), where A(D)
is the adjacency matrix of the given digraph D. By construction, these matrices are symmetric and their spectra do not depend on the chosen vertex order.
Note that the spectrum of N in and N out is the same (for the sake of brevity, we will omit the reference to the given graph if there is no danger of confusion). Moreover, inverting the orientations of all edges in a given digraph transforms N in into N out , and vice versa. Hence we may restrict our attention to only one of these matrices. Following [4], let us only consider N out . Given some digraph D, the spectrum of N out is called the non-negative spectrum or, shortly, the N-spectrum of D. It is the multi-set of N-eigenvalues of D, which in turn are the roots of the N-characteristic polynomial N D (x) = χ(N out (D), x) = det(N out (D) − xI), appearing in the spectrum according to their multiplicity. In the same manner, we will speak of N-eigenvectors, N-nullity (the multiplicity of N-eigenvalue ) and N-integrality (meaning the N-spectrum consists only of integers). By construction, N out is positive semi-de nite, so N-eigenvalues are always non-negative.
It seems that [4] is the rst source that studies the N-spectra of digraphs in some detail. Besides deriving some general basic facts to start with, the author of [4] focuses mainly on regular digraphs. Our goal is to generally explore how N-eigenvalues and N-eigenvectors are linked to the structure of digraphs, in particular under certain transformations. In [4] a rst step in this direction is made, by studying the change of the characteristic polynomial under two simple operations, namely attaching a pendant source to a source (the latter will no longer be a source after this) and attaching a pendant sink to some arbitrary vertex. Here, a source is a vertex with no incoming edges (but at least one outgoing edge) and a sink is a vertex without outgoing edges (but at least one incoming edge). Our research will start where the author left o in [4].

Common out-neighbor partition
Unless stated otherwise, the digraphs we study hereafter are tacitly assumed to be simple, loopless and weakly connected.
In order to deal with the N out matrix we need to understand the meaning of its entries. Let v , . . . , vn be the vertices of a given digraph D. Then it is easily seen that, for all i, j ∈ { , . . . , n}, the entry found at position (i, j) of N out is equal to the number of common out-neighbors of the vertices v i and v j (cf. Proposition 2.1 in [4]). In particular, entry (i, i) counts the number of out-neighbors of vertex v i . Hence the trace of N out is exactly the number of edges of D, which in turn is equal to the sum of all eigenvalues of N out (counting each eigenvalue according to its multiplicity). So the N-spectrum consists only of zeroes if and only if D contains only isolated vertices.
Let us consider the simple case of attaching a pendant source v n+ to a source v i of D (as a result, v i is not a source any longer). Clearly, this operation does not change any common out-neighbors nor the out-degrees of the vertices of D. So the matrix N out (D ) of the resulting digraph D can be obtained as the block diagonal matrix diag(N out (D), × ), where rn×m denotes the (n × m)-matrix with all entries equal to r. Consequently, N D (x) = (x − )N D (x) (cf. Prop. 4.5 in [4]). Given a basis of N-eigenvectors of D (spanning R n ), we can construct a basis of N-eigenvectors of D (spanning R n+ ) by means of trivially embedding the given basis for D, alongside with a unit vector e n+ .
Next, consider attaching a pendant sink v n+ to a sink v i of D. As before, v i does not have any common outneighbors. But the operation changes the number of out-neighbors of v i to one. The i-th column of N out has changed from a zero column to a unit vector e i . Moreover, for the sink v n+ itself we add a zero row/column to N out . All in all, determinant expansion along the i-th column of N out (D ) readily yields N D (x) = (x − )N D (x).
These two example operations were fairly simple. But what about even the slightest generalization, say, attaching a sink to multiple sinks? This operation indeed does change common out-neighbor relations in the digraph. Now we can ask ourselves: What is the e ect on the N-spectrum and N-eigenvectors? In particular, is it possible to preserve some of the original N-eigenvectors by means of trivial embedding? In a sense, we want to be able to judge whether the e ects of a somewhat "local" modi cation of the given digraph result in predictably "local" changes of the spectral properties. To this end, we will introduce a partition of the vertices of D.
In view of the entries of N out we need to analyze which vertices have common out-neighbors. Two vertices v and v have a common out-neighbor v if and only if there exists a trail between them that consists of a forward edge followed by a reverse edge, i.e. a trail v → v ← v . If vertices v and v have a common out-Instead of the terms incoming and outgoing neighbor we use the short forms in-neighbor and out-neighbor, respectively.
neighbor v , then the trail can be extended to v → v ← v → v ← v . Given two vertices x and y of D, a trail between x and y is a zig-zag trail if it has even length and (from either end) it starts with a forward edge, then a reverse edge, then again a reverse and so on (with strictly alternating directions). Note that, trivially, a path of length zero is also considered a zig-zag trail.
To study the extents of zig-zag trails, let us establish a relation on the vertex set V of D. Let any two vertices be related whenever there exists a zig-zag trail between them. Clearly, this relation is re exive, symmetric and transitive. So we have an equivalence relation that partitions the vertices of D into equivalence classes B , . . . , B k . The associated partition {B i } k i= shall be called the common out-neighbor partition of D. Given some vertex v, let B(v) denote the class that contains v. Note that sinks always form singleton classes, but the reverse is not necessarily true. Moreover, if D contains no mutually adjacent vertices (i.e. it is an orientation of some undirected graph), then the common out-neighbor partition contains at least two classes. Now consider any class B i of the common out-neighbor partition. By construction, none of its vertices have common out-neighbors with vertices external to B i . Hence we conclude:   The vertex numbers have already been chosen such that they match the common out-neighbor partition. Hence, with respect to this numbering, the matrix N out assumes block diagonal form with blocks of sizes , , , , , . This is shown in Figure 2.
It is important to realize that the block B i associated with a class B i does not directly correspond to any subdigraph of D. The reason is that the vertices of a class may have external out-neighbors. On the other hand, if we construct a subdigraph D of D by keeping only the edges (including their endpoints) emanating from the vertices of B i , then B i is also a class of the common out-neighbor partition of the resulting digraph Dwith exactly the same block B i in N out (D ). The rest of N out (D ) is zero, by construction. This is the minimal subdigraph of D containing the class B i , with exactly the same block B i in its N out matrix (cf. Figure 3).
In what follows, we will make use of the Kronecker product ⊗ of real matrices. Given two matrices A = (a ij ) ∈ R p×q and B =∈ R r×s , we obtain A ⊗ B ∈ R pr×qs by replacing each entry a ij of A by the block a ij B. This de nition naturally generalizes to vectors.
An immediate bene t of the block diagonal form N out = diag(B , . . . , B k ) generated by the common outneighbor partition is that we may directly construct the N-eigenvectors of D on a per-block basis:   Proof.
Proof. First of all, observe that the vertices of S and S each form singleton blocks in D and D , respectively. By connecting these vertices to the new sink η they will be united to a block S ∪ S of D (with η being the unique common out-neighbor of any two vertices in this block). Apart from that, all other classes of D and D are also classes of the common out-neighbor partition of D (with exactly the same blocks as before). For r j −s j , s j ×s j ). Hence we may number the vertices of D such that Observing χ( s×s , x) = x s− (x − s) and keeping in mind that the loss of s sinks e ectively contributes a corrective factor x −s to the N-characteristic polynomial, the result now follows easily by comparing the three block diagonal forms.
where B (u) and B (v) are the blocks associated with the classes of u, v in D , D (respectively) and where iu, iv are the respective row/column indices of u and v within these blocks.
Proof. The key observation is that connecting u and v to η will unite the classes of u and v. Further, η as a new sink will form a singleton cell (with an associated zero block). But apart from these two e ects the common out-neighbor partition of D will be exactly the union of the partitions of D and D , with the same associated blocks for the cells. What remains is to determine the block B of u, v in N out (D ). Suppose that the vertices of D and D are ordered such that their N out matrices assume block diagonal form according to the respective common out-neighbor partition. Without loss, we may assume that B (u) is the lower-right block in N out (D ) and that B (v) is the top-left block in N out (D ). We index the vertices of D such that rst we enumerate the vertices of D , then those of D (both in the same order as before). Then B is essentially diag(B (u) , B (v) ), but we have to increment the main diagonal for u and v to re ect that both of them now have an additional outneighbor, further we have to symmetrically place two o -diagonal ones to re ect that both u, v now have a common out-neighbor.

Corollary 3. Let D and D be two disjoint digraphs. Choose an arbitrary vertex v of D and a sink u of D . Join D and D by connecting u, v to a new sink η and let D be the resulting digraph. Then,
where B is the block associated with the class of v in D and i is the row (resp. column) index of v within this block.
We see that the common out-neighbor partition provides a valuable tool for understanding the spectral e ects of changes to a digraph, in particular with respect to locality. Whenever changes a ect some classes or their associated blocks we have to recompute their eigenvectors and eigenvalues, but the information previously gained for the una ected blocks can be retained.

The Square Theorem
Next, we relate the N-eigenvalues of certain directed bipartite graphs to the eigenvalues of their undirected counterparts. For the following theorem we introduce two new terms. Given a digraph D of order n such that each vertex is either a source or a sink, for any vector x ∈ R n we may construct its source part by setting all those entries of x to zero which correspond to the non-sources (i.e. sinks) of D. Likewise, we construct the sink part of x. Proof. We assume that the vertices of D are ordered such that the sources are numbered before the sinks (G shall inherit this vertex order). Since G is bipartite we have for some matrix B ∈ R k×l . Hence In order to prove (i), suppose that A(G)(x, y) T = λ(x, y) T with x ∈ R k , y ∈ R l . Since so an eigenvector (x, y) T of G for eigenvalue λ is an N-eigenvector of D for N-eigenvalue λ ≠ if and only if x ≠ and y = , and an N-eigenvector of D for N-eigenvalue if and only if either λ = or both x = and y ≠ : Next, suppose that A(G)(x, y) T = ( , ) T . Then B T x = in (1), so that which shows (ii). For proving (iii) suppose that N out (D)(x, y) T = ( , ) T . With respect to the block diagonal form of N out (D) we immediately deduce BB T x = . Using Theorem 3.9-4 (f) from [5] it follows that Bx = . Therefore, Now we turn to claims (iv) and (v). Assume that we have determined a basis of R k+l of eigenvectors of G. With respect to linear independence, note that the spectrum of a bipartite graph is symmetric around zero and that for each eigenvector (x, y) T for eigenvalue λ of G we have a twin eigenvector (x, −y) T for −λ (cf. [6]). We modify the given basis as follows. For λ > let E λ and E −λ be the two eigenspaces for eigenvalues λ and −λ of G, respectively. Select those vectors (x ( ) , y ( ) ) T , . . . , (x (r) , y (r) ) T from the overall basis that form a basis of E λ . By suitable linear combination we nd that their source and sink parts x ( ) , . . . , x (r) , y ( ) , . . . , y (r) form a basis of the space E λ + E −λ . In the overall basis we replace the eigenvectors for eigenvalues λ and −λ with these vectors. If we do this for all positive eigenvalues of G, then we still have basis of R k+l . Consequently, the source parts inserted for any eigenvalue λ of G constitute an N-eigenspace basis for N-eigenvalue λ of D.
Note that x (i) ∈ R k , so the nal basis may contain at most k source parts. Likewise, it may contain at most l sink parts. Since the number of introduced source and sink parts is the same, we deduce that the number of positive eigenvalues of G is at most min(k, l). Further, the N-nullity of D exceeds the nullity of G by exactly the number of positive eigenvalues of G. Moreover, G contains not only isolated vertices (actually none at all, because D has only sources and sinks), so there exists at least one positive eigenvalue for G (cf. Corollary 2.7 in [6]). This proves the rst part of claim (v).
Next, observe that we may construct a linearly independent set of l sink parts that are N-eigenvectors for N-eigenvalue of D, by simply taking l sink unit vectors (i.e. for each sink choose the unit vector that is non-zero on exactly that sink). Hence the N-nullity of D is at least l. Moreover, we may reverse the orientation of D and apply the same argument again, with the sinks turned into sources and vice versa. Equivalently, we may consider N out instead of N in . Since these matrices have the same spectra it follows that the N-nullity of D is at least max(k, l). Now the proof of claim (v) is complete.
Using suitable linear combinations of the sink unit vectors on the vectors of the original eigenspace basis for eigenvalue of G, we may convert them into source parts. This may cause linear dependence among the newly created source parts, so we reduce them to a maximal linearly independent subset. This achieves the basis proposed in the second part of claim (iv). Figure 4. This digraph D has N-spectrum ( ) , . , . , . , . , . .
To illustrate part (i) of the theorem we determine an eigenvector for simple eigenvalue . of G, see Figure  5. Now we form the source and sinks parts -as shown in Figure 6 -and readily verify that the source part is an N-eigenvector of D for N-eigenvalue . = ( . ) , whereas the sink part is an N-eigenvector for N-eigenvalue . Note that for the simple eigenvalue − . of G we can get an eigenvector by taking the vector from Figure 5 and simply inverting the signs on all the sink vertices. Naturally, the source part remains the same, so we see that the N-eigenvalue . of D must be simple.
With respect to part (iv) of the theorem observe that, since G is missing eigenvalue , the easiest way of nding an N-eigenspace basis for N-eigenvalue is given by forming a unit vector basis with respect to the seven sinks of D.

Remark 1.
From the proof of part (i) of the Square Theorem we also conclude that the nullity of any bipartite graph G with bipartition set sizes k, l is at least k + l − min(k, l) = |k − l|. This is the "Corollary" to Theorem 3 in [7].
A graph is bipartite if and only if it contains no odd cycles. So, given an undirected connected bipartite graph with at least one edge, we can choose exactly two orientations such that the resulting digraph contains only sources or sinks. With respect to the two sets of the vertex bipartition, the vertices of one set will become the sources while the other vertices become the sinks. We call such an orientation a zig-zag orientation. Clearly, only bipartite graphs have zig-zag orientations since an odd circuit would prevent this.  Proof. According to [8], the eigenvalues of an undirected path with n vertices are the numbers cos πj n + , for j = , . . . , n.
Clearly, these numbers are all distinct. For j = , . . . , n we get the positive eigenvalues. So their squares will occur in the N-spectrum of P. Moreover, it contains n additional zero N-eigenvalues. For odd n the underlying undirected path already has a (single) eigenvalue zero, so altogether we have n zero Neigenvalues.

Corollary 5. Let C n be a cycle with n vertices that has zig-zag orientation. Then
Proof. According to [8], the eigenvalues of an undirected cycle with n vertices are the numbers cos πj n , for j = , . . . , n.
None of these numbers equals zero. For j = , . . . , n we get one item of each pair of eigenvalues λ, −λ. Hence the result follows.
A special topic in spectral graph theory is integrality, in particular giving su cient or necessary conditions such that a graph from a certain class is integral. Even for trees, integrality is a challenging task but, nonetheless, various interesting results have been obtained, including the identi cation of many families of integral trees, cf. [9][10][11][12]. Let us therefore consider N-integrality of directed trees. It follows from Example 3.7 in [4] that rooted trees are N-integral. The next corollary shows how to construct arbitrarily many N-integral non-rooted trees:

Corollary 6. Let T be an integral tree. Obtain T by zig-zag orienting T. Then T is N-integral.
Many researchers have studied eigenspaces of graphs in detail and tried to characterize when graphs a ord eigenspace bases with certain properties. One particular goal is to choose a basis such that its vectors only contain entries from a certain (small) prescribed set (cf. [13][14][15][16][17]). A particularly small such set would be { , , − }. We call a basis simply structured if its vectors have entries only from this set. With the help of the Square Theorem 5 we may transfer knowledge about the structure of eigenspace bases of a bipartite graph to knowledge about N-eigenspace bases of the zig-zag oriented digraphs that can be derived from it. We will now investivate simply structured N-eigenspace bases.

Corollary 7.
Given a zig-zag oriented bipartite digraph D, if the underlying undirected graph G has an eigenspace basis for eigenvalue whose vectors assume only values from { , , − } on the sources, then D has a simply structured N-eigenspace basis for N-eigenvalue .
Proof. This follows directly from the second part of claim (iv).
A particularly obvious case when the previous corollary can be applied is when the underlying undirected graph G has a simply structured eigenspace basis for eigenvalue . One tool that may help with the identi cation of bipartite graphs with suitable bases is total unimodularity. Recall that a matrix is totally unimodular if every square submatrix has determinant , or − . For such a matrix it then follows easily from Cramer's rule that its null space has a simply structured basis.

Corollary 8. Let G be a forest or a unicyclic graph whose cycle length is divisible by . Obtain D by zig-zag orienting G. Then D has a simply structured N-eigenspace basis for eigenvalue .
Proof. Proposition 1 of [18] states that all forests (or, rather, their adjacency matrices) are totally unimodular. Moreover unicyclic graphs are totally unimodular if and only if their cycle length is divisible by .
Actually, the previous corollary can be re ned because we know a little more about the eigenspace bases of forests:

Corollary 9. Let T be a tree. Obtain D by zig-zag orienting T. Depending on which of the two possible zig-zag orientations was chosen, either every simply structured eigenspace basis for eigenvalue of T is also a simply structured N-eigenspace basis for N-eigenvalue of D or we can take a sink unit vector basis instead.
Proof. It is a consequence of Lemma 19 in [19], that every null space basis of a tree completely vanishes on exactly the same of the two sets of the vertex bipartition of the tree. Depending on the chosen zig-zag orientation, we see that either any simply structured eigenspace basis for eigenvalue of T will also be a simply structured N-eigenspace basis for N-eigenvalue of D or that a sink unit vector basis will serve the purpose.
Moreover, Corollary 8 may be extended to even more unicyclic graphs: Corollary 10. Let G be a unicyclic graph with even cycle length. Obtain D by zig-zag orienting G. If the cycle length of G is divisible by or if there exists not exactly one vertex v on the cycle in G such that v is not covered by all maximum matchings of the unique tree emanating from v, then D has a simply structured N-eigenspace basis for eigenvalue .
Proof. Theorem 4.51 in [16] states that the above condition on G exactly characterizes those unicyclic graphs which have a simply structured null space basis.
Actually, one can even conclude from the results presented in [15] or [16] that, in the case excluded in the condition of the previous corollary, the unicyclic graph has at least a null space basis with entries from the set { , , − , , − } and that its non-zero entries only occur on exactly one set of the vertex bipartition.
Orienting the graph such that these vertices become sources, we may trivially choose a sink unit vector basis for the N-eigenspace for N-eigenvalue , cf. Corollary 7. Hence: Corollary 11. Let G be a unicyclic graph with even cycle length. Then at least one of the zig-zag orientations of G a ords a simply structured N-eigenspace basis for N-eigenvalue .

Block separation
We have seen in Section 2 and its Example 1 that zig-zag trails are the key to forming the blocks of the common out-neighbor partition of a digraph. Every second vertex of a zig-zag trail is a "helper" vertex that certi es a common out-neighbor relationship of two cell vertices.
Moreover, we have discussed the formation of minimal subgraphs containing a certain class of interest, with the same associated block in its N out matrix, cf. Figure 3. What is unlucky about these minimal subgraphs is that we do not immediately see the "helper" vertices as they may act in a double role, being both helper and original member of the cell. We will now present an intuitive construction that will separate the given digraph into constituents such that each contains exactly one of the original cells, with the same block as before, and some arti cially added singleton cells (with zero blocks). Moreover, no vertex will act in a double role.
We introduce the block separation of a given digraph D: For every vertex v of D, create a new vertex v that will take over the incoming neighbor connections of v, i.e. for each edge wv we add an edge wv and delete the edge wv. The resulting digraph has the following properties:   Figure 7. The vertices are labeled so that it is easy to see the pairs of original and new vertices. Note that the results of Theorem 6 remain valid (just changing the counts related to the newly introduced new singleton cells) if we do not duplicate vertices of D that do not have any incoming neighbors. This helps us prevent unnecessary bloat. Even more, we may refrain from duplicating any vertices belonging to singleton cells since this will only lead to zero blocks in N out .

Remark 2. By construction, every helper vertex in a component of a block separated digraph is a sink and every
vertex of some original cell is a source. Hence the overall block separated digraph is a zig-zag oriented bipartite graph with exactly the same blocks as before, plus some zero blocks. So we may apply the Square Theorem 5 on each component separately to determine its N-eigenvectors and N-eigenspaces. The results can be trivially projected to the original digraph. Hence, the conjunction of block separation and the Square Theorem permits us to fully predict the N-spectral properties of a digraph from the spectral properties of certain associated bipartite graphs.

Example 4.
It is easily checked that the example digraph depicted in Figure 4 is isomorphic the largest component of the block separated digraph shown in Figure 7. With respect to Remark 2 we see that Example 2 also demonstrates the combination of block separation and the Square Theorem.
In the following, we apply block separation to analyze the N-spectral radius of directed paths and cycles. Here, the N-spectral radius σ N (D) of a digraph D means the largest modulus among all its N-eigenvalues. Likewise, the spectral radius σ(G) of a graph G denotes the largest modulus among all its eigenvalues. Given a connected graph lacking a zig-zag orientation, we de ne a nearly zig-zag orientation as an orientation such that exactly one vertex is neither a source nor a sink.

Corollary 12.
Among all orientations of a given path (or cycle), the maximum N-spectral radius is achieved by exactly the zig-zag orientations (or the nearly zig-zag orientation if the given graph lacks a zig-zag orientation).
Proof. With respect to block separation, note that the N-spectral radius of a given digraph is determined by the maximal spectral radius among the underlying bipartite graphs of the components of the separation digraph. Orienting a graph does not introduce mutual adjacency in the resulting digraph. Therefore, block separation essentially decomposes the given digraph into directed paths (ignoring any isolated vertices). Next we consider the maximum block separation component size for (nearly) zig-zag orientations of paths and cycles. A zig-zag orientation of Pn or a nearly zig-zag orientation C n+ will introduce a directed path of the same order in the block separation digraph, plus some isolated vertices. A zig-zag orientation of C n will introduce a directed cycle of the same order, plus some isolated vertices. Obviously, any other orientation of a given path or cycle will result in further decomposition of the maximal components of the block separation digraph. But careful analysis of the eigenvalue formula given in the proof of Corollary 4 (resp. Corollary 5) reveals the well-known fact that σ(P n− ) < σ(Pn) < σ(Cn) < σ(C n+ ) (for n ≥ , setting σ(P ) := ). Hence the proof is complete.
In the introduction we mentioned the signless Laplacian matrix Q(G) of a graph G. Its de nition naturally generalizes to multi-graphs. If we construct the matrix Q(M) of some multi-graph M and if this matrix coincides with N out (D) for some digraph D, then we have an interesting link between the N-spectrum of D and the signless Laplacian spectrum of M. It is therefore not surprising that [4] investigates pairs (D, M) such that N out (D) = Q(M). Let us clarify how to construct such pairs.