ISSN2075-9827 e-ISSN2313-0210 http://www.journals.pu.if.ua/index.php/cmp Carpathian Math. Publ. 2018, 10 (2), 352–359 Карпатськi матем. публ. 2018, Т.10, №2, С.352–359 doi:10.15330/cmp.10.2.352-359

PROKIP V.M.

ON THE SIMILARITY OF MATRICES AB AND BA OVER A FIELD

Let A and B be n-by-n matrices over a field. The study of the relationship betweenthe products of matrices AB and BA has a long history. It is well-known that AB and BA have equal characteristic polynomials (and, therefore, eigenvalues, traces, etc.). One beautiful result was obtained by H. Flanders in 1951. He determined the relationship between the elementary divisors of AB and BA, which can be treated as a criterion when two matrices C and D can be realized as C = AB and D = BA. If one of the matrices (A or B) is invertible, then the matrices AB and BA are similar. If both A and B are singular then matrices AB and BA are not always similar. We give conditions under which matrices AB and BA are similar. The of matrices plays an important role in these investigations. Key words and phrases: , similarity, rank.

Pidstryhach Institute for Applied Problems of Mechanics and Mathematics, 3b Naukova str., 79060, Lviv, Ukraine E-mail: [email protected]

1 INTRODUCTION

Let F be a field and let Mm,n(F) denote the set of m-by-n matrices with entries from F. In what follows, GL(n,F) the group of nonsingular matrices in Mn,n(F), Ik is the identity k × k matrix, and 0m,n is the zero m × n matrix. Let A, B ∈ Mn,n(F). It is well known that the characteristic polynomials of AB and BA are the same (see, for example, [6, 9, 10, 14]). If one of the matrices (A or B) is invertible, then the matrices AB and BA are similar. If both A and B are singular then matrices AB and BA are not always similar (see [6, Sec. 1.3]). It is clear that matrices AB and BA are similar if and only if the matrix polynomials Inλ − AB and Inλ − BA are equivalent. It is evident, if matrices A and B commute then AB and BA are similar. Let A ∈ Mn,m(F) and B ∈ Mm,n(F). In paper [3], H. Flanders solved the problem of de- termining the relationship between the elementary divisors of AB and those of BA. Another proof of Flanders’ theorem, with some generalizations, has been given in [11] (see also [1]). Robert C. Thompson [13] proposed a new proof of Flanders’ theorem. It is obvious that some connection exists between the ranks of A and B and the intertwining of the elementary divi- sors of AB and BA. A constructive proof of Flanders’ theorem was also given in [7]. Using the Weyr characteristic the relationship between the Jordan forms of the matrix products AB and BA for matrices A and B was given in [8]. Robert E. Hartwig [5] generalizes Flanders’ result for matrices over a regular strongly-pi-regular ring. It will be observed that an extension of these results to rings would be valuable and interesting. The rank conditions under which matrices AB and BA are similar were proposed in [2, 3, 13]. Suppose that A and B are complex n × n matrices. The matrix AB is similar to BA if and only if rank (AB)j = rank (BA)j for each j = 1,2,..., n (see [6, Sec. 3]). If A is positive semidefinite matrix and B is , in [4] it has been proved that AB and BA are

УДК 512.643 2010 Mathematics Subject Classification: 15A04, 15A21.

c Prokip V.M., 2018 ON THE SIMILARITY OF MATRICES AB AND BA OVER A FIELD 353 similar. The smallest nonnegative integer k such that rank Ak+1 = rank Ak, is the index for A and denoted by Ind(A). In [8] was proved that matrices AB and BA are similar if and only if Ind(AB)= Ind(BA)= k and rank (AB)i = rank (BA)i for all i = 1,2,..., k − 1. In this note we investigate the following widely known question: Let A, B ∈ Mn,n(F). When are matrices AB and BA similar? We give conditions in terms of rank matrices, under which matrices AB and BA are similar. If matrices AB and BA are similar we give their with respect to similarity.

2 MAIN RESULTS

Let A, B ∈ Mn,n(F) be singular matrices and let rank A = r. We introduce the following notation for the matrices A and B. For A there exist matrices U, V ∈ GL(n,F) such that

I 0 UAV = r r,n−r . 0 0  n−r,r n−r,n−r  B B Put V−1BU−1 = 11 12 , where B ∈ M (F). It is easy to make sure that B B 11 r,r  21 22  B B UABU−1 = C = 11 12 (1) 0 0  n−r,r n−r,n−r  and B 0 V−1BAV = D = 11 r,n−r . (2) B 0  21 n−r,n−r  We will use these notations to give the characterization of similarity of matrices AB and BA. Thus, AB and BA are similar if and only if the polynomial matrices Inλ − C and Inλ − D are equivalent, i.e. the Smith normal forms of these polynomial matrices are coincide. In view of the above, we give the following description of similarity of the matrices AB and BA.

Theorem 1. Let A, B ∈ Mn,n(F) be singular matrices. If

B (a) rank B = rank 11 = rank B B , or 11 B 11 12  21    (b) B11 = 0r,r and rank B21 = rank B12, or B B (c) the matrix 11 12 is symmetric, B 0  21 n−r,n−r  then matrices AB and BA are similar. B Proof. (a) Since rank B = rank 11 = rank B B , then the equations XB = B 11 B 11 12 11 21  21  and B11Y = B12 are solvable. Let matrices X1 ∈ Mn−r,r(F) and Y1 ∈ Mr,n−r(F) be the solutions to these equations respectively. I 0 For matrix T = r r,n−r we have 1 −X I  1 n−r  B 0 B 0 T 11 r,n−r T−1 = 11 r,n−r . 1 B 0 1 0 0  21 n−r,n−r   n−r,r n−r,n−r  354 PROKIP V.M.

I −Y Similarly, for matrix T = r 1 we have 2 0 I  n−r,r n−r  B B B 0 T−1 11 12 T = 11 r,n−r . 2 0 0 2 0 0  n−r,r n−r,n−r   n−r,r n−r,n−r  B B B 0 Hence, matrices 11 12 and 11 r,n−r are similar. Thus, AB and BA are 0 0 B 0  n−r,r n−r,n−r   21 n−r,n−r  similar.

(b) Let B11 = 0r,r and rank B21 = rank B12 = s. For B12 there exist matrices U1 ∈ GL(r,F) and V1 ∈ GL(n − r,F) such that

0 I U B V = s,n−r−s s . 1 12 1 0 0  r−s,n−r−s r−s,s 

−1 Thus, for the matrix T1 = diag U1, V1 we have   0 B 0 I T r,r 12 T−1 = s,n−s s . 1 0 0 1 0 0  n−r,r n−r,n−r   n−s,n−s n−s,s 

Similarly, for matrix B21 there exist U2 ∈ GL(n − r,F) and V2 ∈ GL(r,F) such that

0 0 U B V = n−r−s,s n−r−s,r−s 2 12 2 I 0  s s,r−s 

−1 and for the matrix T2 = diag V2 , U2 we have   0 B 0 0 T r,r 12 T−1 = n−s,s n−s,n−s . 2 0 0 2 I 0  n−r,r n−r,n−r   s s,n−s  0 B 0 0 It is obvious that matrices r,r 12 and r,r r,n−r are similar. Thus, AB 0n−r,r 0n−r,n−r B21 0n−r,n−r and BA are similar.     B B B B T (c) Matrix 11 12 and its transpose 11 12 are similar. 0n−r,r 0n−r,n−r 0n−r,r 0n−r,n−r Hence, we have   

T T B11 B12 B11 0r,n−r B11 0r,n−r = T = . " 0n−r,r 0n−r,n−r # " B12 0n−r,n−r # " B21 0n−r,n−r # Thus, matrices AB and BA are similar. The proof of Theorem 1 is complete.

From Theorem 1 we have the following statement.

Corollary 1. Let A, B ∈ Mn,n(F) be singular matrices. If det B11 6= 0 then matrices AB and BA are similar.

Consider the following example. ON THE SIMILARITY OF MATRICES AB AND BA OVER A FIELD 355

Example. Let F = Q be the field of rational numbers and let

7 −3 −11 9 −23 −18 −2 16 5 −2 −10 8 −55 −43 −5 38 A =   and B =   −12 5 21 −17 −65 −52 −4 48  12 −5 −16 13   −80 −64 −5 59      be matrices over Q. For nonsingular matrices   0 1 11 32 12 −1 0 11 75 25 U =   and V =   −1 −1 0 1 00 94  −1 −1 −1 0   0 0 11 5      over Q we have     1000 0100 I 0 UAV =   = 3 3,1 0010 0 0  3,1   0000    and   0 0 0 0 0 0 0 0 1 2 1 B B V−1BU−1 =   = 11 12 , where B = 0 1 2 . 0 1 3 1 B B 11    21 22  0 1 3  0 1 2 2       B  Thus, rank B = rank 11 = rank B B = 2. By statement (a) of Theorem 1 11 B 11 12  21  matrices AB and BA are similar to the matrix B11. 

Lemma 1. Let A, B ∈ Mn,n(F) be singular matrices. If rank AB = rank BA = 1, then AB and BA are similar. To prove the Lemma we need the following proposition (see also Chapter 2 in [6] and Theorem 1 in [12]).

Proposition 1. Let C ∈ Mn,n(F) be a matrix of rank one and tr C = c. The matrix C is similar to one of the matrices D1 = diag (c,0,...,0) if c 6= 0 or 0 1 D = diag , 0, ..., 0 if c = 0. 2 0 0     Proof. The proof of the Proposition is algorithmic. The matrix C we write in the form C = p · q, where p ∈ Mn,1(F) and q ∈ M1,n(F). For the vector p there exists a matrix P ∈ GL(n,F) such T that P · p = 1 0 ... 0 . Then C is similar to a matrix of the form   α α ... α PCP−1 = Pp · qP−1 = C = 11 12 1n . (3) 1 0 0  n−1,1 n−1,n−1  It is clear that α11 = c is a of the matrix C. 1 01,n−1 − α12 c 6= T =  c  ∈ GL(n ) Suppose, 0. For the matrix 1 . ,F we have . In−1  α   − 1n   c  −1   T1 C1T1 = diag (c,0, ...,0)= D1. 356 PROKIP V.M.

Thus, if tr C = c 6= 0, then matrices C and D1 are similar. Let tr C = 0. From equality (3) it follows

0 α ... α C = 12 1n . 1 0 0  n−1,1 n−1,n−1 

For elements {α12, α13,..., α1n} there exists a matrix T0 ∈ GL(n − 1, F) such that α12, α13,..., αn T0 = 1 0 ... 0 . Thus, for the matrix

   1 0 T = 1,n−1 ∈ GL(n,F) 2 0 T  n−1,1 0  we have 0 1 T−1C T = diag , 0, ..., 0 = D . 2 1 2 0 0 2     Since tr C = 0, matrices C and D2 are similar. This completes the proof of the Proposition.

Proof. Let A, B ∈ Mn,n(F) be singular matrices and rank AB = rank BA = 1.

Suppose rank B ≥ rank A = r. Matrix AB is similar to the matrix

B B C = 11 12 , 0 0  n−r,r n−r,n−r  where B11 ∈ Mr,r(F) (see equalities (1) and (2)). Similarly BA is similar to the matrix B 0 D = 11 r,n−r . B 0  21 n−r,n−r  Thus, tr AB = tr BA = tr B11. Put tr B11 = c. Suppose c 6= 0. By Proposition 1 matrices AB and BA are similar to the matrix D1 = diag (c,0, ...,0). If c = 0 then by Proposition matrices AB and BA are similar to the matrix 0 1 D = diag , 0, ..., 0 , which completes the proof of the Lemma. 2 0 0     Corollary 2. Let A, B ∈ Mn,n(F) be singular matrices and rank A = 1. If AB 6= 0n,n and BA 6= 0n,n then AB and BA are similar.

Corollary 3. Let A, B ∈ M2,2(F). If AB 6= 02,2 and BA 6= 02,2 then AB and BA are similar.

Theorem 2. Let A, B ∈ Mn,n(F) and let rank A = 2. If rank AB = rank BA then AB and BA are similar.

Proof. If rank AB = rank BA = 1 then by Lemma 1 matrices AB and BA are similar. Sup- B B pose rank AB = rank BA = 2. Matrix AB is similar to the matrix C = 11 12 , 0 0  n−2,2 n−2,n−2  where B11 ∈ M2,2(F) (see equalities (1) and (2)). Similarly, BA is similar to the matrix B 0 B D = 11 2,n−2 . Thus, rank 11 = rank B B = 2. B 0 B 11 12  21 n−2,n−2   21    ON THE SIMILARITY OF MATRICES AB AND BA OVER A FIELD 357

If B11 = 02,2 or det B11 6= 0 then by Theorem 1b or Corollary 1 respectively matrices AB and BA are similar. Let rank B11 = 1 and let tr B11 6= 0. For B11 there exists a matrix U11 ∈ GL(2, F) such that α 0 U B U−1 = , 11 11 11 0 0   U 0 where α = tr B . For the matrix T = 11 2,n−2 we have 11 11 0 I  n−2,2 n−2  α 0 B T CT−1 = C = 0 0 12 , 11 11 11   0 0 n−2,1 n−e2,n−1   −1 where B12 = B12U1 . It is evident that rank C11 = 2. It is easy to make sure that if n = 3 then T B12 = c13 c23 and c23 6= 0. For B12 the exists a matrix U12 ∈ GL(n − 2, F) such that e   e e α 0 ...... 0 B U = 1 . 12 12 0 1 0 ... 0   e I 0 Thus, for the matrix T = 2 2,n−2 we have 12 0 U  n−2,2 12  α 0 α 0 1 0 T−1C T = C = 00 0 1 2,n−4 . 12 11 12 12   0n−2,4 0n−2,n−4   α 0 0 0 It is obvious that matrix C is similar to the matrix C = 0 0 1 2,n−3 . 12 13   0n−2,4 0n−2,n−3   It may be noted that matrices D and DT are similar. Reasoning similarly we convince BT BT ourselves that the matrix 11 21 is similar to the matrix C . Thus, in the case 0 0 13  n−r,r n−r,n−r  when tr B11 6= 0, matrices C and D are similar. Let us now consider the case when rank B11 = 1 and tr B11 = 0. For B11 there exists a matrix V11 ∈ GL(2, F) such that 0 1 V B V−1 = . 11 11 11 0 0   V 0 For the matrix S = 11 2,n−2 we have 11 0 I  n−2,2 n−2  0 1 B S CS−1 = C = 0 0 12 , where B = B V−1. 11 11 21   12 12 11 0 0 n−2,1 n−b2,n−1   b T Obviously that rank C21 = 2. We note, if n = 3 then B12 = c13 c23 and c23 6= 0.   b 358 PROKIP V.M.

For B12 the exists a matrix V12 ∈ GL(n − 2, F) such that

β 0 ...... 0 b B V = 1 . 12 12 0 1 0 ... 0   bI 0 Thus, for the matrix S = 2 2,n−2 we have 12 0 V  n−2,2 12  0 1 β 0 1 0 S−1C S = C = 00 0 1 2,n−4 . 12 21 12 22   0n−2,4 0n−2,n−4   0 1 0 0 It is evident that matrix C is similar to the matrix C = 0 0 1 2,n−3 . 22 23   0n−2,4 0n−2,n−3 BT BT  Reasoning similarly, we can prove that matrix 11 21 is similar to the matrix 0 0  n−r,r n−r,n−r  C23. Thus in the case when tr B11 = 0 matrices C and D are similar. So, we have that matrices AB and BA are similar and the proof of Theorem 2 is complete.

From Theorem 2 we have the following statement.

Corollary 4. Let A, B ∈ M3,3(F). If rank AB = rank BA then matrices AB and BA are similar.

ACKNOWLEDGEMENTS

The author wishes to thank the referee for a careful reading of the manuscript and for his comments and suggestions.

REFERENCES

[1] Bernau S. J., Abian A. Jordan canonical forms of matrices AB and BA. Rend. Istit. Mat. Univ. Trieste. 1989, 20 (1), 101–108. [2] Cao C. G., Tang X. M., Yang L. The Rank Conditions such that AB and BA are Similar and Applications. Inter. J. Algebra 2007, 1 (6), 283–292. [3] Flanders H. Elementary divisors of AB and BA. Proc. Amer. Math. Soc. 1951, 2 (6), 871–874. [4] Garcia S. R., Sherman D., Weiss G. On the similarity of AB and BA for normal and other matrices. Appl. 2016, 508 (1), 14–21. [5] Hartwig R. E. On a theorem of Flanders. Proc. Amer. Math. Soc. 1982, 85 (3), 310–312. [6] Horn R. A., Johnson C. R. , Cambridge University Press, New York, 1985. [7] Johnson Ch.R., Schreiner E.A. The Relationship Between AB and BA. Amer. Math. Monthly. 1996, 103 (7), 578–582. [8] Lippert R. A., Strang G. The Jordan forms of AB and BA. Electron. J. Linear Algebra. 2009, 18, 281–288. [9] MacDuffee C.C. The theory of matrices, Chelsea, New York, 1946. [10] Parker W. V. The matrices AB and BA. Amer. Math. Monthly. 1953, 60 (5), 316–316. ON THE SIMILARITY OF MATRICES AB AND BA OVER A FIELD 359

[11] Parker W. V., Mitchell B.E. Elementary divisors of certain matrices. Duke Math. J. 1952, 19 (3), 483–485. [12] Prokip V.M. The structure of matrices of rank one over the domain of principal ideals with respect to similarity transformation. Math. methods and physiko-mechanical fields (in Ukrainian). 2016, 59 (3), 68–76. [13] Thompson R. C. On the matrices AB and BA. Linear Algebra Appl. 1968, 1, 43–58. [14] Williamson J. H. The characteristic polynomials of AB and BA. Edinburgh Math. Notes. 1954, 39, 13–13.

Received 01.07.2018

Прокiп В.М. Про подiбнiсть матриць AB i BA над полем // Карпатськi матем. публ. — 2018. — Т.10, №2. — C. 352–359. Нехай A i B — n × n матрицi над полем. Вивчення зв’язкiв мiж добутками матриць AB i BA має давню iсторiю. Загальновiдомо, що матрицi AB та BA мають однаковi характеристичнi многочлени (отже, власнi значення, слiди тощо). Один вагомий результат був отриманий Х. Фландрерсом у 1951 роцi. Вiн вказав зв’язок мiж елементарними дiльниками AB та BA, який можна розглядати як критерiй, коли двi матрицi C i D можуть бути зображенi у виглядi до- буткiв C = AB i D = BA. Якщо одна з матриць (A або B) є неособливою, то матрицi AB i BA подiбнi. Якщо ж A i B особливi матрицi, то матрицi AB i BA не завжди подiбнi. В статтi наведено умови, за яких матрицi AB i BA подiбнi. Поняття рангу вiдiграє важливу роль у цих дослiдженнях. Ключовi слова i фрази: матриця, подiбнiсть, ранг.