A Method to Construct Sets of Commuting Matrices

A method for constructing sets of matrices that pairwise commute is presented. The sets are defined such that each matrix is a combination of basic matrices. An iterative algorithm is given, where the construction approach aims to obtain appropriate basic matrices. A numerical example illustrate the proposed method.


Introduction
Commuting matrices is an active topic both in pure and applied mathematics.They appear in a variety of applications in physical and general sciences (McCarthy & Shalit, 2013;Bourgeois, 2013;De Seguins, 2013;Ogata, 2013;Shastry, 2011;Yuzbashyan & Shastry, 2013), where several theoretical and numerical works on differential equations, matrix polynomials equations and general matrix equations get some properties of scalars (Brewer et al., 1986;Gohberg et al., 1982).In such contexts sets of matrices which pairwise commute are needed in numerical experiments.However, examples with commuting matrices often appear in works where commutativity is not the primary concern (Tisseur & Meerbergen, 2001;Higham & Kim, 2001;Guo et al., 2009;Han & Kim, 2010).
The classical way to obtain matrices that commute in pairs is to consider the solutions of equation AX = XA.In such case any two solutions of this equation commute if and only if the matrix A is nonderogatory (Gantmacher, 1960).Probably the most simple method for practical experiments is to consider the polynomials of a matrix B (Dennis & Weber, 1978), in the same way we have that two polynomials in B commute if and only if the matrix B is nonderogatory.Besides that, although there are works dealing with rings and other algebraic structures of commuting matrices, these are not of ease manipulation for numerical purposes (Suprenenko, 1968;Song, 1999;Britnell & Wildon, 2011).
Our objective here is to present a method for constructing sets of commuting matrices.Summarizing the remainder of this paper, in section 2 we develop the support theory, in section 3 we state the method and in section 4 we give a numerical example together with some practical considerations.

Support Theory
We consider the set of complex matrices of order n where v i j are multivariate linear polynomials in y 1 , y 2 , . . ., y k ∈ C, with coefficients α (i j) l ∈ C, i, j = 1, . . ., n and l = 1, . . ., k (Rosa et al., 2008).
Alternatively we can write this set as where A i are n × n complex matrices, we call them the basic matrices of the set V n k .
We can also write Our concern is with the case when any two elements of the set V n k commute, that is when V n k is a commuting set.Conditions for this in terms of the basic matrices are stated next.
Given A, B ∈ V n k , then there are α 1 , α 2 , . . ., α k and β 1 , β 2 , . . ., β k , such that Hence, (⇒) For A i and A j , i j, consider Hence, AB = A i A j and BA = A j A i .
By hypothesis We can also write where Next we inspect some basic facts related with a commuting V n k .
If A is nonderogatory then the solution set of AX = XA is a commuting set V n n , which is closed under the product operation.This is illustrated in the following example.
, and we choose x 14 , x 24 , x 34 and x 44 as arbitrary parameters, then the solution set of AX = XA is which is a commuting set closed under the product.
On the other hand, it can be verified that the commuting set is not a solution set of any equation AX = XA.Furthermore, considering we also can conclude that there are commuting sets V n k which are not closed under the product, that is, they are not rings.Although such cases can be always completed to a set closed under the product, this is an important issue to consider when dealing with commuting sets.Now, we examine a crucial question: how many linearly independent matrices can a commuting set V n k have.The answer to this is not new.Schur gave it a century ago (Schur, 1905).The maximum number of linearly independent + 1, that is, the greater integer less than or equal to n 2 4 + 1.Using our notation, given a commuting V n k , for the basic matrices A i , i = 1, 2, . . ., k, commute it is necessary that k ≤ N(n).
We use these in the development of our algorithm.

The Method
First we consider the set E = e i e T j : i, j = 1, 2, . . ., n where e i is n × 1 with 1 in the i th position and zeros elsewhere.
Conditions for the set E be commuting are stated next.
Lemma 1 Let E = e i e T j , i, j = 1, 2, . . ., n , if Π a = e g e T h and Π b = e k e T l are matrices of E, such that Π a Π b , then Π a commutes with Π b if and only if g l e h k.
Proof.We have that Thus, Π a Π b = e g e T h e k e T l and Π b Π a = e k e T l e g e T h .From Π a Π b , we can conclude that Π a Π b = Π b Π a if and only if g l and h k.
We observe that given two elements of E, e i 1 e T j 1 and e i 2 e T j 2 , if each of them commutes with e i 3 e T j 3 , then e i 1 e T j 1 + e i 2 e T j 2 commutes with e i 3 e T j 3 , even if e i 1 e T j 1 and e i 2 e T j 2 do not commute.Let now be an n 2 × n 2 block matrix, where the (i, j) block is e i e T j .Using the matrix F we can determine all the matrices of the set E that commute with a given matrix e u e T v ∈ E. The next algorithm is a successive application of Proposition 2.

Proposition 2 Let F be defined as above (1). Given a block e u e T v ∈ F, let H be the set of blocks e i e T j of the submatrix resulting of F by deleting the block row v and the block column u, then e r e
Algorithm 1 End.
If the matrices chosen from G 0 are e i e T i , i = 1, 2, . . ., n, then the algorithm gives only one commuting set, otherwise it gives two commuting sets, where in the second set A s+1 is the identity.
The fact that the sets U n k and U n k−1 are commuting is a direct consequence of the matrices A i pairwise commute.We also observe that the set of basic matrices {A 1 , A 2 , . . ., A s , A s+1 } is linearly independent.Besides that we have the following.
Proposition 3 The sets U n k and U n k−1 are closed under the product operation.

Numerical Example
We implemented the algorithm in the Matlab.We use an auxiliary matrix to control the matrices of the set G 0 that make part of the commuting set U n k .The following example is for matrices of order n = 4 .Consider G 0 = e i e T j : i, j = 1, 2, 3, 4 and let , be an n × n matrix, where the 1s in the positions (i, j) represent the elements e i e T j of the set G 0 that can be taken as the matrices A l to construct the commuting set We choose the element (1, 2) of M 0 , that is A 1 = e 1 e T 2 as the first matrix, thus the row 2 and the column 1 of M 0 are set to zeros, to represent the elements in G 0 that were deleted to obtain G 1 .Furthermore, setting (M 0 ) 12 = 2 we indicate that the respective element was already chosen and therefore is neither in G 1 .Hence we get In the same way the 1s in M 1 represent the elements of G 1 , which are the available elements that commute with A 1 , and therefore from those we have to pick the next one.
Choosing now the element (1, 3) of M 1 , that is A 2 = e 1 e T 3 .Thus deleting row 3 and column 1 from M 1 and setting (M 1 ) 13 = 2, we obtain Again the 1s represent the elements that commute with the matrices already picked, that are represented by the 2s.Continuing, we choose the element (4, 2) of M 2 , then A 3 = e 4 e T 2 , thus , and finally we pick the only one left, A 4 = e 4 e T 3 .We can construct a commuting set with these elements Adding the matrix I 4 we obtain the second commuting set U 4 5 = x 1 e 1 e T 2 + x 2 e 1 e T 3 + x 3 e 4 e T 2 + x 4 e 4 e T 3 + x 5 I 4 : The maximum number of matrices linearly independent in U 4 5 is the Schur number n 2 4 + 1 = 5 = k.This evidently depends on the suitable choice we perform.We could get a lesser k, either with a different choice or stopping the iterations before the set G be empty, this can be achieved including an option in step 5 of the Algorithm 1 to terminate the iterations.
The sets U n k generated by the method have a very specific form.To obtain an aleatory form we can use a nonsingular matrix S and then V n k = S U n k S −1 is also commuting.For example, from is a commuting set with a different form from those generated by the algorithm.
As future prospects of the presented method, we cite the extensions to block versions, fact that will permit the application of it to generalized matrices partitioned into commuting blocks, like the block companion and the block Vandermonde, among others.Such matrices are linked to systems of higher order.
The authors want to thank the referees for the comments that helped to improve the paper.