Distance Matrix of a Class of Completely Positive Graphs: Determinant and Inverse

Abstract A real symmetric matrix A is said to be completely positive if it can be written as BBt for some (not necessarily square) nonnegative matrix B. A simple graph G is called a completely positive graph if every matrix realization of G that is both nonnegative and positive semidefinite is a completely positive matrix. Our aim in this manuscript is to compute the determinant and inverse (when it exists) of the distance matrix of a class of completely positive graphs. We compute a matrix 𝒭 such that the inverse of the distance matrix of a class of completely positive graphs is expressed a linear combination of the Laplacian matrix, a rank one matrix of all ones and 𝒭. This expression is similar to the existing result for trees. We also bring out interesting spectral properties of some of the principal submatrices of 𝒭.


Introduction and Preliminaries
Let G = (V , E) be a nite, connected, simple and undirected graph with V as the set of vertices and E ⊂ V × V as the set of edges. We write i ∼ j to indicate that the vertices i, j are adjacent in G. The degree of the vertex i is denoted by δ i . A graph with n vertices is called complete, if each vertex of the graph is adjacent to every other vertex and is denoted by Kn. A graph G = (V , E) said to be bipartite if V can be partitioned into two subsets V and V such that E ⊂ V × V . A bipartite graph G = (V , E) with the partition V and V is said to be a complete bipartite graph, if every vertex in V is adjacent to every vertex of V .
The distance d(i, j) from i and j in G is the length of the shortest path from i and j. The distance matrix of graph G is the n × n matrix, denoted by D(G) = [d ij ], where d ij = d(i, j), if i ≠ j, and if i = j. This de nition requires G to be connected. The Laplacian matrix of G is the n × n matrix, denoted as L(G) = [l ij ], where l ij = δ i if i = j, − if i ≠ j, i ∼ j and otherwise.
Let T be a tree with n vertices. In [6], the authors proved that the determinant of the distance matrix D(T) of T is given by det D(T) = (− ) n− (n − ) n− . Note that, the determinant does not depend on the structure of the tree but the number of vertices. In [7], it was shown that the inverse of the distance matrix of a tree is given by D(T) − = − L(T) + (n − ) ττ t , where τ = ( − δ , − δ , ..., − δn) t . The above expression gives a formula for the inverse of the distance matrix of a tree in terms of the Laplacian matrix. The determinant and the inverse of the distance matrix were also studied for bi-directed trees and weighted trees (for details, see [3,10]). In [2], similar results were studied for q-analogue of the distance ma- trix, which is a generalization of the distance matrix for a tree. The inverse of the distance matrix has been explored for graphs such as block graphs, bi-block graphs and cactoid digraph (for details, see [4,8,9]). In this article, we study the determinant and inverse of the distance matrix for certain classes of completely positive graphs.

. Completely Positive Graphs
A block of the graph G is a maximal connected subgraph of G that has no cut-vertex. There are many equivalent conditions to prove that a graph G is completely positive. We state a few of these. For n ≥ , let Tn be a graph consisting of (n − ) triangles and a common base (see Figure 1). Some of the equivalent conditions are stated below. A graph said to be a bi-block graph if each of its blocks is a complete bipartite graph. Note that every tree is a bipartite graph. The determinant and inverse of the distance matrix have been studied for these graphs, and interestingly, the formula for the inverse of the distance matrix comes in terms of the Laplacian matrix (or the Laplacian like matrix; for details, see [6,7,9]). In view of Theorem 1.2, both bi-block graphs and trees are cpgraphs. In this article, our primary interest is to compute the determinant and inverse of the distance matrix of a class of cp-graphs such that each of its blocks is Tn, for a xed n and with a central cut vertex, which is not a base vertex. We denote such graph as T (b) n , where b (≥ ) represent number of blocks (see Figure 2). Let D(T (b) n ) denote the distance matrix of T (b) n . It turns out that, similar to the case of bi-block graphs and trees, D(T (b) n ) − can be expressed in terms of the Laplacian matrix L(T (b) n ) and a new matrix R(T (b) n ). In particular, for n ≠ and b ≥ , the expression for D(T (b) n ) − is given by This article is organized as follows. In Section 1.2, we recall necessary results from matrix theory and also x a few notations which will appear throughout this article. In Section 2, we compute the determinant and inverse of the distance matrix of single blocks of Tn. Since results on the inverse of the distance matrix of a complete bipartite graph have appeared in the work of Hou et al [9], we skip these, although it is possible to present proofs that is completely di erent from theirs. In Section 3, we compute the determinant of the distance matrix of T (b) n and nd its inverse, whenever it exists. The manuscript ends with a section on spectral properties of some principal submatrices of the matrix related to R(T (b) n ), appearing in Eqn (1.1).

. Notations and Some Preliminary Results
We begin this section by introducing a few notations which will be used throughout this article. Let In and 1n , denote the identity matrix and the column vector of all ones of order n respectively. Further, Jm×n denotes the m × n matrix of all ones and if m = n, we use the notation Jm. We write m×n to represent zero matrix of order m × n. Unless there is a scope for confusion, we omit the order of the matrices. Let A be an m × n matrix. If S ⊂ { , · · · , m}, S ⊂ { , · · · , n}, then A[S |S ] denotes the submatrix of A determined by the rows corresponding to S and the columns corresponding to S . If S = S = S, then we write A[S] to denote the principal submatrix of A determined by the set S. Given a matrix A, we use A t to denote the transpose of the matrix.
Let B be an n × n matrix partitioned as where B and B are square matrices. If B is nonsingular, then the Schur complement of B in B is de ned to be the matrix The following result, which gives the inverse (whenever the matrix is invertible) of a partitioned matrix using Schur complements will be used in our calculations.

Determinant and Inverse of Single Blocks
We begin this section with the study of the distance matrix of a single block of Tn. We nd an expression for the determinant of the distance matrix of Tn, D(Tn), establishing that det D(Tn) ≠ and provide the formula for the inverse of the same. We discuss the choice of vertex indexing for the graph Tn as it is essential to our proofs. We recall that for n ≥ , Tn is the graph with n vertices consisting of n − triangles with a common base. Let { , , . . . , n} be the vertex set of Tn and we denote , as the base vertices and , , . . . , n as non-base vertices (for example see Figure 1). Throughout this article, unless stated otherwise, we will follow the above vertex indexing for Tn. The following lemma and the remark that follows will be used in computing the inverse of D(Tn). The proofs are skipped. Lemma 2.1. Let n ≥ , let Jn, In be matrices as de ned before. For a ≠ , the eigenvalues of aIn + bJn are a and a + nb with multiplicities n − and , respectively, and the determinant is given by a n− (a + nb). Moreover, the matrix is invertible if and only if a + nb ≠ and the inverse is given by Jn .

Remark 2.2. Let A = and let Jr×s be the r × s matrix of all ones. Then,
The distance matrix of Tn can be written in the following block matrix form, . (2.1) The following theorem gives the determinant and inverse of D(Tn), when n ≥ .
Similar to the result for trees, the next corollary gives another representation for the D(Tn) − in terms of the Laplacian matrix L(Tn) of Tn, which is given by Corollary 2.4. Let D(Tn) and L(Tn) be the distance and Laplacian matrices, respectively, of the graph Tn. Then, The following remark is interesting in its own right. The general case will be discussed in Section 4.

Determinant and Inverse of D(T (b) n )
In this section, we compute the determinant of the distance matrix of T (b) n and nd a formula for the inverse whenever it exists. Similar to the single block case, the indexing of the vertices plays an important role in our results. We discuss the indexing of vertices of T (b) n below. Recall that T (b) n is a cp-graph consisting of b blocks, where each of the block is Tn, with a central cut vertex (see Figure 2). Therefore, |V(T (b) n )| = b(n − ) + and For each block, the rst two vertices represents the base vertices and the remaining represents the non-base vertices. Let D(T (b) n ) be the distance matrix of T (b) n . Then, Proof. Our aim is to use elementary row or column operations to obtain the det D(T (b) n ). Let σ = ( , (n− )b+ ) be the transposition and Pσ = (p ij ) be the corresponding permutation matrix. Let us label the block-rows and block-columns in (3.1) by, R , · · · , R b , R b+ and C , · · · , C b , C b+ , respectively. The algorithm is summarized in the steps below.
1. First do R → b i= R i , followed by C j → C j − C for j = , · · · b. 2. For each R i , ≤ i ≤ b add the second row to the rst, and if n > add rows , · · · , n − to the third row. 3. For each C j , ≤ j ≤ b, subtract the rst column from the second, and if n > subtract the third column from all the columns , · · · , n − . 4. If n > , for each C j , ≤ j ≤ b, subtract the third column from the rst. Then add times the rst and times the second column to the third column. 5. Rearrange the rows and columns by pre-multiplying and post-multiplying by the permutation matrix Pσ.
Note that in the above steps, the permutation matrix Pσ is multiplied twice and will therefore not change the sign of the determinant. The resulting matrix obtained is given by where the matrices D (T (b) n ) and D (T (b) n ) are of the following forms:

Case 3: (n ≥ )
The matrix D(T (b) n ) can be rewritten in the following form  Similar to the case of single blocks of Tn, we express the inverse of the distance matrix of T (b) n in terms of the Laplacian matrix. Consider the matrix R(T (b) n ) in block matrix form: n , J is the matrix is of all ones with the conformal order and R(T (b) n ) is the matrix as de ned in Eqn (3.3).
The block matrix form of X is given by where Case 1: (n = ) Case 2: (n ≥ ) where Y ij are block matrices of conformal order, given by 4) where D , D and d are de ned as in Eqn (3.3).
Since the steps are similar for Case (n = ) and Case (n ≥ ), we only discuss the latter case. For simplicity, we compute the above ve cases of block matrices Y ij in ve di erent steps.
Step 2 : Y ij , for i ≠ j, i, j = , , ..., b Further, for i, j = , , ..., b, and i ≠ j, substituting D X and d x t from Step 1, we get Step 3 : , and hence for Step 4 : Y ij , for j = b + , i = , , ..., b Since Step 5: From the above ves steps and Eqn (3.4), we get Y = I, the identity matrix, and hence the desired result follows.
In the next section, we study eigenvalues of some principal submatrices of the matrix R(T (b) n ) de ned in Eqn (3.3).

Some properties of the matrix R(T (b) n )
In this section, we will study spectral properties of matrices related to R(T (b) n ). We compute the eigenvalues of certain principal submatrices of R(T (b) n ). To the best of our knowledge, this has not been attempted so far, although our aim is not to compare the spectral properties of R(T (b) n ) through this method. For simplicity, we will write R instead of R(T (b) n ). Before proceeding further we rst x a few notions which will appear subsequently. Recall that, the vertex set of T (b) n is given by Proof. The matrix R[B] has the following block matrix form. by, R , · · · , R b and C , · · · , C b , respectively. The following algorithm helps in determining the characteristic polynomial of B.
For each of the block-rows, add the rst to the second; for each of the block-columns, add the second one to the rst one.
After applying the above steps to B, we get a matrix B in the following block form: Since both B & B are lower triangular matrices, so is the matrix B. Therefore, the characteristic polynomial of R[B] equals det B = det B and is given by Proof. The matrix R[N] can be computed to be Let us label the block-rows and block-columns of the matrix R[N] by R , · · · , R b and C , · · · , C b , respectively. We provide the following steps to get a suitable form of the matrix to calculate the eigenvalues.
1. First do R → b i= R i , followed by C j → C j − C for j = , · · · b. 2. If n > subtract the last column in each of block-columns from the remaining columns. 3. For each block-rows add all the rows to the last row. 4. Rearrange the rows and columns by pre-multiplying and post-multiplying by the permutation matrix Pσ.
Proceeding with the above steps, the resulting matrix N has the following block matrix form  Proof. Let us observe that R[N ∪ {c}] equals