On decomposable and reducible integer matrices

We propose necessary and sufficient conditions for an integer matrix to be decomposable in terms of its Hermite normal form. Specifically, to each integer matrix of maximal row rank without columns of zeros, we associate a symmetric whole matrix whose reducibility can be determined by elementary Linear Algebra, and which completely determines the decomposibility of the first one.


Introduction
For integer valued matrices, a notion of decomposability can be stated analogously to the real case (see Definition 2.1). The main difference here is that unimodularity is required for the transformation matrices. This is necessary to preserve the Z−module structure generated by the columns of the matrix. Thus, if one wants to keep the group structure unchanged, pure Linear Algebra techniques cannot be applied to study the decomposability of an integer matrix.
Given an m × n integer matrix A, we can consider the submonid S of Z n generated by the non-negative combinations of the columns of A. A decomposition of A yields a decomposition of S, and vice versa. In [3], the authors deal with the computation of the decompositions of S, if possible, using the (integer) Hermite normal form as the main tool. Following this idea, we relate the decomposition of any integer matrix and the decomposition of its Hermite normal form (Proposition 2.4). This leads to our main result (Theorem 2.8) which states that if H is the Hermite normal form of an integer matrix A of maximal row rank without columns of zeros, the necessary and sufficient condition for A to be decomposable is that the transpose of H times H is reducible in the usual sense (see Definition 2.7). Now, since the transpose of H times H is a symmetric matrix, we can adapt the combinatorial and Linear Algebra machinery to determine if A is decomposable.
Note that for a symmetric real matrix is possible to decide if it can be decomposed into a direct sum of smaller symmetric real matrices by analyzing the connectivity of a certain associated graph, which is closely related to the spectral properties of the graph. All this allows us to propose an algorithm (Algorithm 2.12) for the computation of the decomposition of the matrix A, if possible.
Apart from practical computational considerations, we emphasize that, given an integer matrix A of maximal row rank without columns of zeros, we are able to associate it to a weighted graph whose connectivity determines the decomposition of A. In particular, this can be used to determine the decomposition of any finitely generated commutative submonoid of Z n as in [3]. Recall that the study of finitely generated commutative submonoids of Z n is of great interest due to its close relation with Toric Geometry (see [2,7] or [8], and the references therein). Moreover, in this context, integer decomposable matrices have their own importance; to mention a couple illustrative of examples we observe that decomposable graphical models have associated integer decomposable matrices, as it can be deduced from [9,Theorem 4.2], and that decomposable semigroups correspond to direct products of certain algebraic (toric, in a wide sense) varieties.

On decomposable and reducible integer matrices
Definition 2.1. Let A ∈ Z m×n . We say that A is decomposable if there exist a unimodular matrix P and a permutation matrix Q such that P −1 AQ decomposes into a direct sum of matrices.
The main aim of this note is to study decomposable matrices in terms of their Hermite normal form. To do this, we first recall the notion of Hermite normal form of an integer matrix. Definition 2.2. Let A ∈ Z m×n of rank r. The Hermite normal form of A, HNF(A), is the unique matrix H = (h ij ) ∈ Z m×n such that A = P H, for the unimodular matrix P , satisfying the following three conditions: (a) there exists a sequence of integers 1 ≤ j 1 < . . . < j r such that for each 1 ≤ i ≤ r we have h ij = 0 for all j < j i (row echelon form) (b) for 1 ≤ k < i ≤ n we have 0 ≤ h k j i < h i j i (the pivot element is the greatest along its column and the coefficients above are nonnegative). (c) The last m − r rows are zero.
We will say that A is in Hermite normal form when A = HNF(A).
There are well-known efficient algorithms for the computation of the Hermite normal form of an integer matrix (see, e.g. [1]). In GAP ( [4]), the command HermiteNormalFormIntegerMat computes the Hermiten normal form of an integer matrix.

Example 2.3. The Hermite normal form of
 is the product of the elementary matrices transforming the matrix A into its reduced row echelon form as above, in such way that the unimodular matrix in Definition 2.2 is The next propositions provide necessary and sufficient conditions for an integer matrix to be decomposable in terms of its Hermite normal form. Proof. Let P 1 be a unimodular matrix such that P −1 HQ, for some unimodular matrix P 2 and permutation matrix Q. Now, since P −1 1 P 2 is unimodular, we have that H is decomposable. Conversely, assume that H is decomposable, so there exist a unimodular matrix P 3 and a permutation matrix Q 1 such that P −1 and we are done. In the following, we will use the symbol ⊤ to denote the transpose operation.
Proposition 2.5. Let H be an integer r × n−matrix in Hermite normal form of rank r. Then, H is decomposable if and only if there exist permutation matrices P and Q such that P ⊤ HQ decomposes into a direct sum of matrices.
Proof. The sufficiency part is obvious since the permutation matrix P is unimodular and P ⊤ = P −1 . Conversely, suppose that H is decomposable, so there exist a unimodular matrix R and a permutation matrix Q such that For simplicity, we will assume that t = 2. Let P 1 and P 2 be unimodular matrices such that H 1 : Hermite normal form, and define the following matrix Since the rank of B is r, each row of B contains a pivot element of H 1 or H 2 . If we move the row containing the first (leftmost) pivot element to the first place, the row containing the second pivot element to the second place and so forth, the resulting matrix is necessarily in Hermite normal form. Thus, there exists a permutation matrix P such that P B = H, by the uniqueness of the Hermite normal form. Therefore, H = P B = P (P −1 1 A 1 ⊕ P −1 2 A 2 )Q ⊤ and we conclude that P ⊤ HQ decomposes into P −1 For symmetric matrices, decomposability can be refined to the more restrictive notion of reducibility. This notion has a rich combinatorial nature, because of its relationship with graph theory, as we will see later on.
Definition 2.7. A symmetric matrix B ∈ Z n×n is reducible if there exists a permutation matrix Q such that Q ⊤ BQ decomposes into a direct sum of square matrices. Otherwise B is said to be irreducible.
The following result gives a necessary and sufficient condition for an integer matrix (under reasonable conditions) to be decomposable in terms of the reducibility of a certain related symmetric matrix. where H 1 ∈ Z s×s , H 2 ∈ Z (n−s)×(n−s) are symmetric and 1 ≤ s < n. Let R ∈ Z n×r be the submatrix of Q such that HR is the submatrix of HQ consisting of the pivot columns of H. Clearly HR has rank r and (HR) ⊤ HR is a submatrix of (HQ) ⊤ HQ = H 1 ⊕ H 2 . If (HR) ⊤ HR is a submatrix of H 1 (H 2 , respectively), then H 1 (H 2 , respectively) has rank r and necessarily H 2 (H 1 , respectively) is zero because H 1 ⊕ H 2 = Q ⊤ (H ⊤ H)Q has rank r. Therefore H ⊤ H has its i−th row and its i−th column of zeros, for some i ∈ {1, . . . , n}. Since the element of H ⊤ H in position (i, i) is the sum of the squares of the i−th column of H, we conclude that H = HNF(A) has a column of zeros which leads to a contradiction with the fact that A has no column of zeros. Thus, (HR) In particular, (HR 1 ) ⊤ HR 2 = (HR 2 ) ⊤ HR 1 = 0. Now, taking into account that, by the definition of H, HR has nonnegative coordinates, it follows that the columns of H corresponding to R 1 have zeros in the places corresponding to R 2 and vice versa; that is to say R ⊤ 1 H ⊤ = (S 1 | 0) and R ⊤ 2 H ⊤ = (0 | S 2 ), where S 1 and S 2 are invertible matrices (actually S 1 and S 2 are invertible lower triangular matrices up to permutation of their rows). Consider now a non-pivot column h of H. Since Q ⊤ H ⊤ h is either a column of H 1 0 or a colummn of 0 Thus, (S 1 | 0) h = 0 or (0 | S 2 ) h = 0 and, since S 1 and S 2 are invertible, we conclude that h has zeros in the places corresponding to R 1 or corresponding to R 2 . Therefore, HQ decomposes into a direct sum of matrices up to permutation of its rows, which exactly means that H is decomposable. Recall that with our notation, the degree of the vertex v i is Observe that, the matrix B is reducible if and only if the graph G B is not connected. Thus, we can study the reducibility of B by means of G B . To do this, we will take advantage of the following result.
Proposition 2.10. Let G be a weighted graph on n vertices. Then, G has t connected components if and only if the Laplacian matrix of G has rank n−t. In this case, the connected components of G are completely determined by the reduced row echelon form of the Laplacian matrix of G.
Proof. The first statement follows from the well known matrix-tree theorem (see, e.g. [5, Section 1] and the references therein). Let us analyze the second statement with a little more detail. First, we observe that the Laplacian matrix of a weighted graph on n vertices is an order n symmetric matrix of rank n − 1 whose columns sum to zero. So, its reduced row echelon form is equal to  Thus, if V is the reduced row echelon of the Laplacian matrix of an undirected simple graph on n vertices, then if the j−th column, v j , of V is not a pivot column, the set of vertices of the connected component containing and its reduced row echelon form is Now, we can read from R that G has the following two connected components: the subgraph with vertices {1, 3, 4} and the subgraph with vertices {2, 5}.
Finally, we easily check if a full row rank integer matrix A without columns of zeros is decomposable and, in affirmative case, compute a decomposition of A into a direct sum of Hermite normal form matrices.
The following algorithm shows how to check the decomposibility of A by means of Laplacian matrices. Algorithm 2.12. HNF-Decomposition. Input: A r × n integer matrix A of rank r with no column of zeros. Output: A unimodular matrix P and permutation matrix Q such that P −1 AQ = H 1 ⊕ . . . ⊕ H t with H i into Hermite normal form for every i.
(1) Set H = HNF(A) and let P 0 be a unimodular matrix such that P −1 0 A = H. (i) Set k = k + 1 (ii) Let Q k be the matrix whose columns are {e i } ∪ {e ℓ | ℓ ∈ supp(v j )}, where e i is the vector that has the i−th coordinate equal to 1 and all the other coordinates equal to 0. (6) Set Q = (Q 1 | . . . |Q r ), where r = n − rank(L). (7) Let P 1 be the unimodular matrix such that P −1 1 (HQ) = HNF(HQ). (8) Return P = P 0 P 1 and Q.
Observe that steps (1)-(6) provide unimodular matrices P 0 and Q such that P −1 0 AQ = A 1 ⊕ . . . ⊕ A t . If t = 1 then that A is not decomposable; in this case A 1 = HNF(A) and Q is the identity matrix. Otherwise, if A is decomposable; we cannot guarantee that the matrices A i , i = 1, . . . , t, are in Hermite normal form. However, since HNF(A 1 ) ⊕ . . . ⊕ HNF(A t ) = HNF(A 1 ⊕ . . . ⊕ A t ) by the uniqueness of the Hermite normal form, step (7) provides the matrix P 1 such that P −1 1 P −1 0 AQ is in Hermite normal form as desired.