Sign patterns of J-orthogonal matrices

Abstract This paper builds upon the results in the article “G-matrices, J-orthogonal matrices, and their sign patterns", Czechoslovak Math. J. 66 (2016), 653-670, by Hall and Rozloznik. A number of further general results on the sign patterns of the J-orthogonal matrices are proved. Properties of block diagonal matrices and their sign patterns are examined. It is shown that all 4 × 4 full sign patterns allow J-orthogonality. Important tools in this analysis are Theorem 2.2 on the exchange operator and Theorem 3.2 on the characterization of J-orthogonal matrices in the paper “J-orthogonal matrices: properties and generation", SIAM Review 45 (3) (2003), 504-519, by Higham. As a result, it follows that for n ≤4 all n×n full sign patterns allow a J-orthogonal matrix as well as a G-matrix. In addition, the 3 × 3 sign patterns of the J-orthogonal matrices which have zero entries are characterized.


Introduction
The goal of this thesis is to study and characterize J-orthogonal matrices of certain orders and classes and their sign patterns. This introduction will familiarize the reader with the basic concepts of J-orthogonality and sign patterns. J-orthogonal matrices have been studied in many contexts such as group theory and generalized eigenvalue problems. In the recent decades and particularly in numerical mathematics, a class of problems appeared where the scalar products were indefinite and involved J-orthogonal matrices. Although J-orthogonality has many numerical connections, this thesis has more of a combinatorial matrix theory point of view, building on the results in [10]. The topic of sign pattern matrices originated with economist Paul Samuelson [12] in response to the need to solve problems given only the signs of entries in a given matrix. Since that time, sign pattern matrices have found new applications in areas such as communication complexity, neural networks, and chemistry [8].
Following [6], we say that a real matrix A is a G-matrix if A is nonsingular and there exist nonsingular diagonal matrices D 1 and D 2 such that where A −T denotes the transpose of the inverse of A. Now, denote by J a diagonal (signature) matrix whose diagonal entries are ±1. Then a real nonsingular matrix Q is called Thus we can see the close relationship that G-matrices and J-orthogonal matrices have, since every J-orthogonal matrix is a G-matrix with D 1 = D 2 = J. On the other hand, as shown 1 in [10], every G-matrix can be transformed into a J-orthogonal matrix. Hence, much discussion of J-orthogonal matrices also relies on properties of G-matrices. For convenience of notation, we can say for a real matrix C that Q(sgn(C)) = Q(C). The set of all n × n sign pattern matrices is denoted Q n . A sign pattern matrix P is called a permutation pattern (generalized permutation pattern) if exactly one entry in each row and column is equal to + (+ or −). Just as for real matrices, we say P T AP is permutationally similar to A if A ∈ Q n and P is a permutation pattern of order n. A signature pattern is a diagonal sign pattern matrix, each of whose diagonal entries is + or −. If S 1 and S 2 are n × n signature patterns and A, B ∈ Q n , then we say that B is signature equivalent to A if The next theorem provides some easily proved properties of J-orthogonal matrices.
2 Theorem 1.3. (i) For a fixed signature matrix J, the set of all J-orthogonal matrices is a multiplicative group, which is also closed under transposition and signature equivalence.
(ii) The direct sum of square diagonal blocks A 11 , . . . , A kk is a J-orthogonal matrix if and only if each diagonal block A ii is a J i -orthogonal matrix, where J i is the corresponding diagonal block of J.
(iii) The Kronecker product of J i -orthogonal matrices is a J-orthogonal matrix with J equal to the Kronecker product of the J i 's.
(iv) If Q is J-orthogonal and P is a permutation of the same order, then P T QP is J 1 - If P is a property referring to a real matrix, we say that a sign pattern A requires P if every matrix in Q(A) has property P, and we say that A allows P if some matrix in Q(A) has property P.
One property of real matrices of concern to this thesis is that of singularity. If every matrix B ∈ sgn(A) is singular, then A is said to be sign singular. If A = [a ij ] is an n × n sign pattern matrix, then a (simple) cycle of length k (or a k-cycle) in A is a formal product of the form γ = a i 1 i 2 a i 2 i 3 . . . a i k i 1 , where each of the elements is nonzero and the indices i 1 , i 2 , . . . , i k are distinct. A composite cycle γ in A is a product of simple cycles, say γ = γ 1 γ 2 . . . γ m , where the index sets of the γ i 's are mutually disjoint. If the length of γ i is l i , then the length of γ is m i=1 l i . It is known that an n × n sign pattern matrix A is sign singular if and only if A has no composite cycle of length n.
Of course, any orthogonal matrix is also J-orthogonal with J = I. One question that has been explored in the past is what sign patterns allow orthogonality. We denote by PO n the set of all n × n sign patterns that allow orthogonality. A slightly more general question is which sign patterns allow J-orthogonality. Of particular interest are sign patterns that allow J-orthogonality but to not allow orthogonality. We let J n denote the set of all sign patterns of the n × n J-orthogonal matrices (for various possible J). We also denote G n to be the set of all n × n sign patterns that allow a G-matrix. Notice that if A ∈ J n , then A 3 cannot be sign singular.
The following result gives some straightforward properties of the set of J-orthogonal matrices. (iii) permutation similarity; (iv) signature equivalence.
The use of these operations yields "equivalent" sign patterns, which will be referenced throughout the thesis.
With the above notations, we have an immediate consequence of Thorem 1.2. Theorem 1.5 can be paraphrased as follows: G n = J n P n , where P n is the set of all n × n permutation patterns. Observe that G T n = G n , J T n = J n , and P T n = P n . Hence, by taking the transpose on both sides in the equation G n = J n P n , we obtain G n = P n J n , which is the content of the next theorem.
Theorem 1.6. The set of all n × n sign patterns that allow a G-matrix is the same as the set of all row permutations of the n × n sign patterns allowing J-orthogonality.
In fact, we can generalize this result as follows: Theorem 1.7. The set of all n × n sign patterns that allow a G-matrix is the same as the set of all permutation equivalences of the n × n sign patterns allowing J-orthogonality.
Proof. From Theorem 1.5, we have G n = J n P n . Thus, it suffices to show that J n P n = P n J n P n . Since the identity sign pattern is in P n , obviously J n P n ⊆ P n J n P n . To show the 4 reverse inclusion, let P 1 QP 2 ∈ P n J n P n , where P 1 and P 2 are permutation patterns and Q allows J-orthogonality. By Theorem 1.4 we know P 1 QP T 1 allows J-orthogonality, and hence Let A be an n × n sign pattern matrix. From [10], the very important fundamental sign potentially J-orthogonal (SPJO) conditions are that there exists a (+, −) signature pattern J such that and where c ←→ denotes (generalized) sign pattern compatibility.
These are necessary conditions for A ∈ J n . If these conditions do not hold, then A ∈ J n .
When J = I, we get the normal SPO conditions for orthogonal matrices, see for example [4]. The SPJO conditions are not sufficient for an n × n sign pattern matrix to allow Jorthogonality, as illustrated in [10].
Observe that A T JA and AJA T are symmetric generalized sign pattern matrices. So, to verify the SPJO conditions we need only to find a J which fulfills the upper-triangular part of the compatible conditions. Let J = diag(ω 1 , . . . , ω n ). Note that (1) and (2) may be restated as and n k=1 ω k a ik a jk c ←→ δ ij ω j for all i, j.
(With an n × n (+, −) sign pattern A, for i = j, (3) and (4) automatically hold for any J.) In [10], the following important result was proved. If we allow zero entries, then Theorem 1.8 may fail. For example, an n × n sign pattern A with a zero column does not satisfy A T JA c ←→ J and an n × n sign pattern A with a zero row does not satisfy AJA T c ←→ J, for any signature pattern J.
In Section 2, a number of other general results on sign patterns are proved and used in subsequent sections. The 3 × 3 sign patterns of the J-orthogonal matrices which have zero entries are characterized in Section 3. In Section 4 it is shown that all 4 × 4 full sign patterns allow J-orthogonality. Important tools in this analysis are Theorem 2.2 on the exchange operator and Theorem 3.2 on the characterization of J-orthogonal matrices in the paper [11] by Nick Higham.

Block Upper Triangular Matrices and Sign Patterns
Definition 2.1. An n × n matrix A that contains an s × (n − s) zero submatrix for some integer 1 ≤ s ≤ n − 1 is said to be partly decomposable. If no such submatrix exists, then A is fully indecomposable.
The following structural result of G-matrices was established in [10].
where all the diagonal blocks are square. Then A is a G-matrix if and only if each A ii (i = 1, . . . , m) is a G-matrix and all the strictly upper triangular blocks A ij are equal to 0.
Furthermore, if A is a G-matrix that has a row (or a column) with no 0 entry, then A is fully indecomposable. 6 Notice that A is permutationally equivalent to the sign pattern which by Theorem 2.2 does not allow a G-matrix. Hence, A does not allow a J-orthogonal matrix. The same holds for any similar n × n sign pattern.
Using the result given in Theorem 1.7, we give the following generalization of Threom 2.2.
Theorem 2.4. Let A be an n × n sign pattern matrix, and P and Q be permutation patterns such that P AQ has the block upper triangular form where all the diagonal blocks are square. If A ∈ J n , then P AQ ∈ G n , each A ii (i = 1, . . . , m) allows a G-matrix, and all the strictly upper triangular blocks A ij are equal to 0. If P AQ / ∈ G n , then A / ∈ J n .
We note that when the sign pattern A in Theorem 2.4 is not sign singular, such a P AQ block upper triangular form where specifically the square diagonal blocks are fully indecomposable, is always possible [2, Theorem 4.2.6].
Of specific interest is the following.
Theorem 2.5. If A is an n × n sign pattern matrix with exactly n + 1 nonzero entries, then Proof. If A has no composite cycle of length n then of course A / ∈ J n because A is sign singular. If A does have a composite cycle of length n, then for some permutation sign pattern P , the permutation equivalence AP has no zero diagonal entries and exactly one nonzero off-diagonal entry. By Theorem 2.2, AP / ∈ G n . Hence, by Theorem 2.4, we have Notice that the results from Theorem 1.5 can also be applied to sign patterns.
Theorem 2.6. Let the n × n sign pattern matrix be the direct sum where all the diagonal blocks are square. Then A allows a J-orthogonal matrix if and only if each A ii (i = 1, . . . , m) allows a J-orthogonal matrix.
Remark 2.7. The Kronecker product of sign patterns which allow a J-orthogonal pattern also allows a J-orthogonal matrix. For a fixed sign pattern matrix J, a product of Jorthogonal matrices can produce a different sign pattern allowing a J-orthogonal matrix for the same J.
Observe that any generalized permutation pattern allows orthogonality (and indeed J- Hence we have another result: Theorem 2.8. If A is an n × n generalized permutation sign pattern, then A ∈ J n .

8
The following structural result can be of general use.
Theorem 2.9. Suppose that B is an n × n real nonsingular matrix, and suppose that B is where the partitioning of B results from the partitioning of the matrix J 2 J 1 .
Similarly, we can obtain ). We partition B using the same Equating the blocks of ( Remark 2.10. Let P be the permutation matrix such thatJ = P ( where p = min(p 1 , p 2 ) and q = max(p 1 , p 2 ) − min(p 1 , p 2 ). Using this permutation matrix P , the matrix B is permutationally similar to the block diagonal matrix Corollary 2.11. If A is an n×n full sign pattern matrix, then there does not exist B ∈ Q(A) Example 2.12. Given the sign pattern there are two possible choices for J that satisfy the SPJO conditions, namely J 1 = diag(1, 1, −1) On the other hand, for j > 1 In the above example, the two signature matrices used are equivalent (though not all the resulting J-orthogonal matrices are equivalent). In the next example, we exhibit the property with non-equivalent signature matrices in the case of two sign patterns.
Example 2.13. Consider the 4 × 4 all + sign pattern matrix. This pattern is J-orthogonal with the two non-equivalent signature matrices J 1 = diag(1, 1, 1, −1) and J 2 = diag(1, 1, −1, −1): Also consider the sign pattern An interesting question is the following: Is it true that whenever a square full sign pattern A and a signature pattern J satisfy the SPJO conditions, then A allows J-orthogonality (for this particular J)? That the answer is no is seen in [4,Example 3.8] where the 6 × 6 pattern is SPO but is not in PO 6 . However, specifying the * entries as +, this pattern is in J 6 , as shown as follows.
12 Example 2.14. Let and let J = diag(1, −1, −1, −1, −1, −1). Then we produced the following decimal approximation of a matrix B ∈ Q(A) such that B T JB = J to within four decimal places: Thus, the question of whether a full sign pattern satisfying the SPJO conditions for some J implies J-orthogonality is still open.
3 Characterization of sign patterns in J 3 with 0 entries We want to identify all those 3 × 3 sign patterns with 0 entries which allow J-orthogonality.
To organize our argument, we consider sign patterns with varying numbers of zero entries.
Sign patterns with 9, 8, or 7 zero entires. Any 3 × 3 sign pattern with only 2, 1 or 0 nonzero entires cannot contain a composite cycle of length 3; thus, any such pattern is sign singular and hence cannot allow J-orthogonality, since if B is J-orthogonal, then B is 13 nonsingular.
Sign patterns with 6 zero entries. Note that a 3 × 3 sign pattern with exactly 3 nonzero entries must not be sign singular in order to allow J-orthogonality, so we only consider such sign patterns which have a composite cycle of length 3, namely the 3 × 3 generalized permutation patterns. By Theorem 2.8, these patterns allow J-orthogonality.
Thus, the sign patterns in J 3 with exactly 6 zero entries are precisely the 3 × 3 generalized permutation patterns.
Sign patterns with 5 zero entries. That no 3 × 3 sign pattern with exactly five zero entries allows a J-orthogonal matrix simply follows from Theorem 2.5.
Sign patterns with four zero entries. In order to determine the sign patterns with four zero entries that allow J-orthogonality, we can systematically consider the number of zero entries on the main diagonal. Let denote a + or − entry. Note that if we require all nonzero entries to occur on the main diagonal, then, up to equivalence, there are three patterns to consider. Two of these patterns do not satisfy the SPJO conditions for any J, while it can be seen that does allow J-orthogonality.
Now suppose there is one zero entry on the main diagonal. Then we may permute it to the (1, 1) position. By systematic inspection it can be seen that no pattern of this form allows J-orthogonality.
Now, if there are two zero entries on the main diagonal, then up to equivalence there is one pattern of this form that allows J-orthogonality: Finally, with three zero entries on the main diagonal, there is no pattern that allows J-orthogonality.
Sign patterns with three or two zero entries. We can conduct a similar investigation of the sign patterns by systematically inspecting the possibilities. Once again the SPJO conditions come into play. In this way, we find that there is no 3 × 3 sign pattern with exactly three or two zero entries that allows J-orthogonality.
Sign patterns with one zero entry. In this case, we first eliminate from consideration all those sign patterns which are sign potentially orthogonal, since for n = 3, every SPO pattern allows orthogonality [1].

So suppose
Upon inspection we find that no matrix of the above forms (except for all the equal to +, as described above) allows J-orthogonality.
These are all of the non-SPO 3 × 3 sign patterns, up to equivalence, with exactly one zero entry which allow J-orthogonality.
We have thus proved the following result.
as well as the 3 × 3 generalized permutation sign patterns and the 3 × 3 SPO sign patterns with one zero entry, where denotes a + or − entry.

The × full sign pattern case
An initial investigation of the question of whether the full n × n sign patterns always allow J-orthogonality was begun in [10], and for n ≤ 3 it was shown to be true.
Remark 4.1. It was observed in [4] that for n ≤ 4, the SPO patterns are the same as the sign patterns in PO n , and that this is also the case for full sign patterns of order 5 (see [1] and [15]). So, regarding the above question with n ≤ 5, we need only consider non-SPO patterns.
In this section, we establish that every 4 × 4 full sign pattern allows J-orthogonality.
As observed above, for n ≤ 4, the SPO patterns are the same as the patterns in PO n .
Therefore, since every orthogonal matrix is also J-orthogonal, we need only consider those patterns which are not sign potentially orthogonal. Since J 4 is closed under transposition, we consider those patterns which are not sign potentially column orthogonal.
Any given full sign pattern can be multiplied on the left and right by signature patterns so that it has the form  Moreover, since we are considering sign patterns which are not sign potentially column orthogonal and which have no zero entries, this means that two columns must be the same.
Thus we can use permutation similarity and signature equivalence to reduce to the case are equivalent, since we can switch the third and fourth columns, and simultaneously switch the third and fourth row. Now, using (5) There are 3 remaining patterns, up to equivalence, which we still must show are in J 4 .
We address these patterns further down in Subsection 4.4.

If the (2, 3) and (3, 4) entries are both −
In this case there is one staircase pattern for which, following [10, Remark 5.7], we see that AP = A. So A ∈ J 4 . Note from A we can also multiply the third and fourth columns by − and permute the first and second lines to More matrices in this case can be obtained as follows: We begin with the staircase pattern

22
If we compute P as in [10,Remark 5.7], then we find that AP = A. But in fact, So AP ∈ J 4 . Now we can obtain the pattern from AP by permutation similarity, so B ∈ J 4 . If Q = [e 1 , e 2 , e 4 , e 3 ], then Q T BQ is another sign pattern in this subcase that allows J-orthogonality.
Similarly, if we begin with the staircase pattern A = and by permutation similarity, B = , e 2 , e 4 , e 3 ], then Q T BQ is another pattern in this subcase that allows J-orthogonality.
We can obtain another pattern in J 4 by letting A be the pattern in equation (7), and There are 5 more patterns, up to equivalence, in this subcase still to be determined. They will be addressed in Subsection 4.4.

If the (2, 3) entry is + and the (2, 4) entry is −
The staircase pattern can be seen to be in J 4 by the process in [10,Example 5.9].
We can obtain two more patterns in this subcase from (6) above by taking the transpose and performing permutation similarity to obtain the patterns Up to equivalence, there are 5 unresolved patterns in this subcase, to be addressed in the next subsection.

Remaining cases
To this point, there remain 11 unresolved patterns, up to equivalence: To settle most of these remaining sign patterns, we use the following result contained in [11]. As stated in [11], this decomposition was first derived in [7]; it is also mentioned in [11] that in a preliminary version of [14] (which was published later) the authors treat this decomposition in more depth.
Assume also that p ≤ q. Let be J-orthogonal with B 11 ∈ R p,p , B 12 ∈ R p,q , B 21 ∈ R q,p and B 22 ∈ R q,q . Then there are orthogonal matrices U 1 , V 1 ∈ R p,p and U 2 , V 2 ∈ R q,q such that where u 1 , v 1 ∈ R, U 2 , V 2 ∈ R 3,3 are orthogonal and e 1 = [1 0 0] T ∈ R 3 .
It was noted that a given 4 × 4 full sign pattern can be multiplied on the left and right by signature patterns so that it has the form For J = diag(1, −1, −1, −1) this sign pattern essentially leads to the condition u 1 v 1 = 1 due to c 1 > 1. Taking u 1 = −1 and v 1 = −1 we get to the conditions that both U 2 e 1 and V 2 e 1 should have the sign pattern equal to [+ + +] T . So, given the orthogonal matrices U 2 , V 2 ∈ R 3,3 such that sgn(U 2 e 1 ) = sgn(V 2 e 1 ) = [+ + +] T , then there exists a J-orthogonal matrix of the form (9) with the sign pattern (10). The sign pattern of the lower right diagonal block is given by the sign pattern of the matrix Note that the sign pattern of U 2 e 1 e T 1 V T 2 is the 3×3 matrix of all +. In addition, for sufficiently small c 1 − 1, the sign pattern of U 2    becomes equal to the sign pattern of the 3 × 3 orthogonal matrix U 2 V T 2 . This is the way we can generate 3 × 3 J-orthogonal matrices with some prescribed sign patterns of the form (10).
Then, as can be checked, the matrix using the exchange operator and permutation similarity. This approach can be used to show that a given full sign pattern allows J-orthogonality for a particular signature matrix J. This process can be done for hundreds of thousands of "random" rational orthogonal matrices using MATLAB.
For every full 4 × 4 sign pattern A that satisfies the SPJO conditions for a specific signature pattern J, we can generate a J-orthogonal matrix in Q(A). In particular, note that A 9 satisfies the SPJO conditions with the signature pattern J 1 = diag(+, −, +, −).
With the help of MATLAB running the procedure, for J = diag(1, 1, −1, −1), we obtain the following J-orthogonal matrix We now reach the following conclusion.
Theorem 4.6. Every 4 × 4 full sign pattern allows a J-orthogonal matrix.
Combined with known results on full sign patterns of orders at most three, we get the following result.
Corollary 4.7. For n ≤ 4, every n × n full sign pattern allows a J-orthogonal matrix.
In view of Theorem 1.5, we also have Corollary 4.8. For n ≤ 4, every n × n full sign pattern allows a G-matrix.
Thus we have the following nice result.
Corollary 4.9. For every n × n full sign pattern A with n ≤ 4, A ∈ G n iff A ∈ J n .
Suppose a full n×n sign pattern A allows a J-orthogonal matrix B ∈ Q(A). Without loss of generality, we may assume that all the positive entries of J occur at the leading diagonal entries. By Theorem 4.5, exc(B) is an orthogonal matrix. Observe that exc(exc(B))=B.
Write exc(B) as a product of real Householder matrices H v 1 , . . . , H v k (where k ≤ n). Replace each v i with a rational approximationṽ i . Since matrix multiplication and exchange operator are continuous, we see that when the rational approximationsṽ i are sufficiently close to v i , B = exc(Hṽ 1 · · · Hṽ k ) is a rational J-orthogonal matrix in Q(A). Thus we have shown the following interesting result.
Theorem 4.10. Let A be a full n × n sign pattern. If A allows a J-orthogonal matrix, then A allows a rational J-orthogonal matrix with the same signature matrix J. In particular, if A allows orthogonality, then A allows a rational orthogonal matrix.
As a consequence, if the n × n full sign pattern A does not allow a rational J-orthogonal matrix for any signature matrix J, then A does not allow a real J-orthogonal matrix.

Concluding remarks
The question of whether every n × n full sign pattern allows a J-orthogonal matrix is still open. It seems to be a complicated and impressive problem. Even for n = 5 the number of cases is daunting. Some examples of rational 5 × 5 J-orthogonal matrices are given in Appendix A. Some other techniques will need to be developed to prove that every full sign pattern allows J-orthogonality.
This thesis forms the basis for the publication [9].