View metadata, citation and similar papers at core.ac.uk brought to you by CORE

provided by Elsevier - Publisher Connector

Journal of Computational and Applied Mathematics 191 (2006) 77–97 www.elsevier.com/locate/cam

Rank equalities for idempotent matrices with applications Yongge Tiana,∗, George P.H. Styanb

aSchool of Economics, Shanghai University of Finance and Economics, Shanghai 200433, China bDepartment of Mathematics and , McGill University, Montréal, Québec, Canada H3A 2K6

Received 7 April 2003; received in revised form 1 April 2005

Abstract We show by elementary block operations a variety of equalities related to sums of two idempotent matrices, and give various consequences and applications. © 2005 Elsevier B.V. All rights reserved.

MSC: 15A03; 15A24

Keywords: Idempotent matrix; Orthogonal projector; Rank equalities; Rank formulas for partitioned matrices; Range equalities; Nonsingularity; Elementary operations; Generalized inverse

1. Introduction

A A over the complex field C is said to be idempotent if A2 = A; said to be an orthogonal projector if it is both idempotent and Hermitian, i.e., A2 = A = A∗, where A∗ denotes the conjugate of A. From the similarity theory of matrices, any idempotent matrix A can be decomposed as − A = U diag(Ik, 0)U 1, where Ik is the of order k and k is the rank of A; any orthogonal ∗ − ∗ projector A can be decomposed as A = U diag(Ik, 0)U , where U 1 = U . Idempotent matrices and orthogonal projectors appear almost everywhere, and have been the objects of many studies in matrix theory and its applications. Idempotent matrices and orthogonal projectors also have close links with generalized inverses of matrices. For instance, both AA− and A−A are idempotent for any generalized inverse A− of A; both

∗ Corresponding author. E-mail addresses: [email protected] (Y. Tian), [email protected] (G.P.H. Styan).

0377-0427/$ - see front matter © 2005 Elsevier B.V. All rights reserved. doi:10.1016/j.cam.2005.04.023 78 Y. Tian, G.P.H. Styan / Journal of Computational and Applied Mathematics 191 (2006) 77–97

AA† and A†A are orthogonal projectors for the Moore–Penrose inverse A† of A. Many other types of matrices can be converted into idempotent matrices through some elementary operations. For instance, if A2 =−A, then (−A)2 =−A, i.e., −A is idempotent; if A2 = Im, then (Im ± A)/2 are idempotent; if A2 =−Im, then (Im ± iA)/2 are idempotent. In general, any matrix A satisfying a quadratic equation A2 + aA + bI m = 0 can be written as [A − (a/2)Im]2 = (a2/4 − b)Im.Ifa2/4 − b = 0, then one can also write out an idempotent matrix from this equality. In the investigation of idempotent matrices and their applications, one often encounters various matrix expressions consisting of idempotent matrices. For example, PQ, P ±Q, 1P +2Q, PA−AQ, Im −PQ, PQ± QP , (P Q)2 − PQ, AA† ± A†A, AA− ± B−B, where P and Q are two idempotent matrices. On the other hand, one also considers matrix decompositions associated with idempotent matrices, like A = P1 ± P2, A = P1P2 ± P2P1, A = P1 ···Pk; where P1,P2,...,Pk are idempotents; see, e.g., [4,5,8,9,15,25–27]. In such situations, it is of interest to give some basic properties of these matrix expressions, as well as relationships among these matrix expressions. When investigating these problems, we have noticed that the rank of matrix is a very rich technique for dealing with matrix expressions consisting of idempotent matrices. The rank of a matrix is invariant with respect to some basic operations for this matrix, such as, operations and similarity transformations. A well-known fact about matrix rank is: two matrices A and B of the same size are equivalent, i.e., there are two invertible matrices U and V such that UAV = B, if and only if r(A) = r(B). The simplest method for determining the linear independency of columns or rows of a matrix, as well as the rank of the matrix is to reduce the matrix to column or row echelon forms by elementary matrix operations. Theoretically, for any matrix expression consisting of idempotent matrices, one can establish some rank equalities associated with this expression. From these rank equalities, one can derive some basic properties on this expression. Rank formulas can be established through various block matrices and elementary block matrix opera- tions. Some well-known results are given below: Im A Im 0 Im − AB 0 r = r = r , BIn 0 In − BA 0 In Im Im − AB Im 0 0 Im − AB r = r = r , B 0 0 B − BAB B 0 AAB A 0 A − ABA 0 r = r = r . BA B 0 B − BAB 0 B In recent years, we have shown many new and valuable rank equalities by this method (see [18,21–23]) and have derived many consequences from these rank equalities. The purpose of this paper is to give a variety of new rank equalities for matrix expressions consisting of idempotent matrices and then to give their various consequences and applications.

2. Rank equalities for idempotent matrices

Suppose P and Q are a pair of idempotents (including idempotent matrices over an arbitrary field F, idempotent operators on Banach and Hilbert spaces, idempotents in unital rings). The two fundamental Y. Tian, G.P.H. Styan / Journal of Computational and Applied Mathematics 191 (2006) 77–97 79

operations for P and Q are given by P ± Q. In many situations, it is necessary to know various properties on P ± Q, for example, the nonsingularity, idempotency, tripotency and nilpotency of P ± Q. Various results on P ± Q and their properties can be found in the literature [2,3,7–12,18,21]. Recall that a square matrix A of order m is nonsingular if and only if r(A) = m. If some rank equalities and inequalities for P ± Q can be established, one can derive a variety of properties for P ± Q from these rank equalities. In [21, Theorem 2.4], a group of valuable rank equalities for a sum of two idempotent matrices are presented, but their proofs are omitted there. Here we restate these rank equalities and give their proofs.

Theorem 2.1. Let P and Q be a pair of complex idempotent matrices of order m. Then the sum P + Q satisfies the following rank equalities PQ QP r(P + Q) = r − r(Q) = r − r(P), (2.1) Q 0 P 0

r(P + Q) = r[P − PQ,Q]=r[Q − QP , P ], (2.2) P − QP Q − PQ r(P + Q) = r = r Q P , (2.3)

r(P + Q) = r(P − PQ− QP + QP Q) + r(Q), (2.4)

r(P + Q) = r(Q − PQ− QP + PQP)+ r(P). (2.5)

Proof. Recall that the rank of a matrix is an important invariant quantity under elementary matrix oper- ations for this matrix, that is, these operations do not change the rank of the matrix. Thus, we first find by elementary block matrix operations the following trivial result: P 0 P P 00 r 0 QQ= r 0 Q 0 = r(P) + r(Q) + r(P + Q). PQ0 00−P − Q

On the other hand, note P 2 = P and Q2 = Q. By elementary block matrix operations, we also obtain another nontrivial rank equality P 0 P P 0 P 2P 0 P r 0 QQ= r −QP 0 Q = r 00Q PQ0 PQ0 PQ0 2P 00 = r 00Q 0 Q 1 P 2 PQ = r + r(P). Q 0 Combining the above two results yields the first equality in (2.1). By symmetry, we have the second equality in (2.1). A matrix X is called a generalized inverse of A if AXA = A, and is denoted as X = A−. Clearly, any idempotent matrix is a generalized inverse of itself. Applying the following rank equalities 80 Y. Tian, G.P.H. Styan / Journal of Computational and Applied Mathematics 191 (2006) 77–97 due to Marsaglia and Styan [13]: − − r[A, B]=r(A) + r(B − AA B) = r(B) + r(A − BB A), (2.6) A r = r(A) + r(C − CA−A) = r(C) + r(A − AC−C) C , (2.7) AB − − r = r(B) + r(C) + r[(Im − BB )A(In − C C)], (2.8) C 0 AB AB− AA−B r = r CD C − CA−AD− CA−B B − AA−B = r(A) + r 0 C − CA−AD− CA−B (2.9) to the two block matrices in (2.1) yields (2.2)–(2.5). 

Although (2.1)–(2.5) are derived by some elementary methods, the construction of the 3 × 3 block matrix consisting of P and Q and its simplification need some matrix operation tricks. The significance of (2.1)–(2.5) is in that they connect the rank of P + Q with the ranks of some other matrix expressions consisting of P and Q. From the right-hand sides of these rank formulas, one can derive many valuable properties on the sum P + Q. For instance, the following rank inequality:

r(P + Q) max{r(P ), r(Q)} is derived from (2.4) and (2.5). By a similar approach, we can also show a rank formula for the linear combination a1P + a2Q of a pair of idempotent matrices P and Q.

Theorem 2.2. Let P and Q be a pair of idempotent matrices of order m, and let a1 and a2 be two nonzero scalars such that a1 + a2 = 0. Then

r(a1P + a2Q) = r(P + Q), (2.10) that is, the rank of a1P + a2Q is invariant with respect to a1 = 0,a2 = 0 and a1 + a2 = 0.

Equality (2.10) was proposed by Tian as a problem [19] and solved by Bataille and other seven solvers. Equality (2.10) can be derived from a result in Tian and Styan [21] that for any P 2 = P and Q2 = Q with P = 0 and  = 0, PQ QP r(P + Q) = r − r(Q) = r − r(P). Q 0 P 0 Result (2.10) can be used to simplify various rank equalities including linear combinations of two idempo- tent matrices. We shall apply (2.10) in the sequel to simplify various rank equalities involving r(P +Q). Another group of rank equalities related to the sum of a pair of idempotent matrices P and Q is given below. Y. Tian, G.P.H. Styan / Journal of Computational and Applied Mathematics 191 (2006) 77–97 81

Theorem 2.3. Let P and Q be a pair of idempotent matrices of order m. Then PQ0 r(P + Q) = r − r[P,Q], (2.11) Q 0 P PQ P r(P + Q) = r Q − r 0 Q , (2.12) 0 P P − QP r(P + Q) = r + r(P) + r(Q) − r[P,Q] Q − PQ , (2.13) P r(P + Q) = r[P − PQ,Q− QP ]+r(P) + r(Q) − r Q . (2.14)

Proof. By (2.9) and elementary block matrix operations PQ PQ− PQ r 0 = r 0 Q 0 P Q − QP −QP Q − PQ = r(P) + r 0 0 Q − QP −QP Q − PQ = r(P) + r 0 0 Q − QP −PQ P Q − PQ = r(P) + r 0 0 Q − QP 0 P = r(P) + r(Q − PQ)+ r[Q − QP , P ] QP =[P,Q]+r − r(P) P 0 = r[P,Q]+r(P + Q) (by (2.1)). Thus, we have (2.11). By symmetry, we also have (2.12). Applying (2.6) and (2.7) to (2.11) and (2.12) yields (2.13) and (2.14). 

Theorem 2.4. Let P and Q be a pair of idempotent matrices of order m. Then Im − P r(P + Q) = r(P) + r(Q) − m + r [Im − P,Im − Q] . (2.15) Im − Q

Proof. By elementary block matrix operations P 0 Im 00Im r 0 QIm = r 0 P + Q 0 = 2m + r(P + Q). Im Im 0 Im 00 82 Y. Tian, G.P.H. Styan / Journal of Computational and Applied Mathematics 191 (2006) 77–97

Also find by elementary block matrix operations P 0 Im P 0 Im − P r 0 QIm = r 0 QIm − Q Im Im 0 Im − PIm − Q −2Im 00Im − P = r(P) + r(Q) + r 00Im − Q Im − PIm − Q −2Im 00Im − P = r(P) + r(Q) + r 00Im − Q Im − PIm − QIm Im − P(Im − P )(Im − Q) 0 = r(P) + r(Q) + r (Im − Q)(Im − P) Im − Q 0 00Im Im − P = r(P) + r(Q) + m + r [Im − P,Im − Q] . Im − Q

Hence, we have (2.15). 

From the block matrices on the right-hand sides of (2.11)–(2.15), one can also derive some new properties for a sum of two idempotent matrices. In particular, if P and Q are a pair of orthogonal projectors over the field of complex numbers, then (2.15) becomes

r[P,Q]=r(P) + r(Q) − m + r[Im − P,Im − Q], (2.16) or equivalently

⊥ ⊥ r(P + Q) = r(P) + r(Q) − m + r(P + Q ). (2.17)

The nonsingularity of P + Q was investigated by several authors due to its importance in applications, see, e.g., [10]. Let (2.1)–(2.5) and (2.10)–(2.15) equal m, we immediately obtain a group of necessary and sufficient conditions for P + Q to be nonsingular. These conditions can also be expressed in many other forms. A collection of such results are given below.

Corollary 2.5. Let P and Q be a pair of idempotent matrices of order m. Then the following statements are equivalent: The sum P + Q is nonsingular (a1) . PQ P P (a2) r = r + r(Q) and r = m. Q 0 Q Q QP Q Q (a3) r = r + r(Q) and r = m. P 0 P P Y. Tian, G.P.H. Styan / Journal of Computational and Applied Mathematics 191 (2006) 77–97 83 PQ (a4) r = r [P,Q] + r(Q) and r [P,Q] = m. Q 0 QP (a5) r = r [Q, P ] + r(P) and r [Q, P ] = m. P 0 PQ0 (a7) r = r [P,Q,0] + r [P,0,Q] and r [P,Q] = m. Q 0 P PQ P P P r Q = r Q + r r = m. (a8) 0 0 and Q 0 P 0 Q Im −P (a9) r( [Im − P,Im − Q]) = 2m − r(P) − r(Q). Im Q

Recall that r[A, B]=r(A) + r(B) − dim R(A) ∩ R(B), (2.18) r[A, B]=r(A) + r(B) ⇔ R(A) ∩ R(B) ={0}, (2.19) A r = r(A) + r(B) − R(A∗) ∩ R(B∗) B dim , (2.20) A r = r(A) + r(B) ⇔ R(A∗) ∩ R(B∗) ={ } B 0 . (2.21)

Hence, some rank equalities in Corollary 2.5 can also be represented by ranges of matrices. It was shown in Tian and Styan [21,22] that any pair of idempotent matrices P and Q of the same size satisfy P r(P − Q) = r + r[Q, P ]−r(P) − r(Q) Q . (2.22)

Also note that both Im − P and Im − Q are idempotent. It follows that:

r(P − Q) = r[(Im − P)− (Im − Q)] Im − P = r + r[Im − P,Im − Q]−r(Im − P)− r(Im − Q) Im − Q Im − P = r + r[Im − P,Im − Q]+r(P) + r(Q) − 2m. (2.23) Im − Q Combining (2.22) and (2.23) yields Im − P P r + r[Im − P,Im − Q]=r + r[P,Q]+2m − 2r(P) − 2r(Q). (2.24) Im − Q Q If P and Q are a pair of complex orthogonal projectors, (2.24) is reduced to (2.17). 84 Y. Tian, G.P.H. Styan / Journal of Computational and Applied Mathematics 191 (2006) 77–97

Results (2.1), (2.11) and (2.12) prompt us to consider the rank of some general block matrices con- sisting of two idempotent matrices. Three rank formulas for bi-diagonal block matrices consisting of two idempotent matrices are given below.

Theorem 2.6. Let P and Q be a pair of idempotent matrices of order m. Then

⎡PQ ⎤ ⎢ .. ⎥ ⎢ P . ⎥ r⎣ . ⎦ = (k − 1)r(P + Q) + r(P), (2.25) .. Q P k×k ⎡ ⎤ PQ . . r⎣ .. .. ⎦ = (k − 1)r(P + Q) + r[P,Q], (2.26)

PQk×(k+1)

⎡ P ⎤ . ⎢ .. ⎥ ⎢Q ⎥ P r⎣ . ⎦ = (k − 1)r(P + Q) + r , (2.27) .. P Q

Q (k+1)×k where all blanks are zero matrices.

Using elementary block matrix operations and (2.6)–(2.9), one can establish various nontrivial rank equalities for block matrices consisting of idempotent matrices. These rank equalities can be used to reveal some fundamental properties for these block matrices. Some simple and interesting results are given below.

Theorem 2.7. Let P and Q be a pair of idempotent matrices of order m. Then P + QP− Q r = r(P + Q) + r(P − Q), (2.28) P − Q 0 P − QP+ Q r = 2r(P + Q), (2.29) P + Q 0 PQ0 r QP+ QP= 2r(P + Q) + r(P − Q), (2.30) 0 PQ PQ0 r ± QP Q= r(P) + 2r(P + Q). (2.31) 0 ± QP Y. Tian, G.P.H. Styan / Journal of Computational and Applied Mathematics 191 (2006) 77–97 85

Proof. Note P 2 = P and Q2 = Q. Then by elementary block matrix operations

P + QP− Q PP− Q r = r P − Q P − Q 0 0 P −Q = r −Q 2Q − P 0 (Im − P)Q = r(P) + r (by (2.9)) Q(Im − P) Q− P (I − P )Q(I − P) = r(P) + r m m 0 0 Q − P

= r(P) + r[(Im − P )Q(Im − P)]+r(P − Q) = r(P + Q) + r(P − Q) (by (2.5)), as claimed in (2.28). Also note (P + Q)(P − Q)/2 + (P − Q)(P + Q)/2 = P − Q. Hence, it follows by elementary block matrix operations that

P − QP+ Q P − Q − 1 (P + Q)(P − Q) − 1 (P − Q)(P + Q) P + Q r = r 2 2 P + Q 0 P + Q 0 0 P + Q = r = 2r(P + Q) P + Q 0 as claimed in (2.29). It follows by elementary block matrix operations that

PQ0 PQ− PQ 0 r QP+ QP= r Q − QP 0 P − PQ 0 PQ 0 P − QP Q 0 Q − PQ 0 = r(P) + r(Q) + r Q − QP 0 P − PQ 0 P − QP 0 Q − PQ = r(P) + r(Q) + r + r[Q − QP , P − PQ] P − QP P = r(P + Q) + r + r[P,Q]−r(P) − r(Q) ( ( . ) ( . )) 2 Q by 2 13 and 2 14

= 2r(P + Q) + r(P − Q) (by (2.22)), 86 Y. Tian, G.P.H. Styan / Journal of Computational and Applied Mathematics 191 (2006) 77–97 as claimed in (2.30). It follows by (2.9) and elementary block matrix operations that PQ0 PQ− PQ 0 r QP Q= r Q − QP P − 2QQ− QP 0 QP 0 Q − PQ P 0 Q − PQ 0 = 2r(P) + r Q − QP P − 2QQ− QP 0 Q − PQ 0 00 0 = 2r(P) + r 0 P − 2QQ− QP 0 Q − PQ 0 P − 2QQ− QP = 2r(P) + r Q − PQ 0 P − Q = r(P) + r 2 0 2 1 (I − P )Q(I − P) 0 2 m m

= 2r(P) + r(P − 2Q) + r[(Im − P )Q(Im − P)] = r(P) + 2r(P + Q) (by (2.5) and (2.10)), and PQ0 PQ− PQ 0 r −QP Q= r −Q + QP P + 2QQ− QP 0 −QP 0 −Q + PQ P 0 Q − PQ 0 = 2r(P) + r −Q + QP P + 2QQ− QP 0 −Q + PQ 0 00 0 = 2r(P) + r 0 P + 2QQ− QP 0 Q − PQ 0 P + 2QQ− QP = 2r(P) + r Q − PQ 0 P + Q = r(P) + r 2 0 2 − 1 (I − P )Q(I − P) 0 2 m m

= 2r(P) + r(P + 2Q) + r[(Im − P )Q(Im − P)] = r(P) + 2r(P + Q) (by (2.5) and (2.10)), as claimed in (2.31).  Y. Tian, G.P.H. Styan / Journal of Computational and Applied Mathematics 191 (2006) 77–97 87

Let P 2 = P and Q2 = Q. We leave the verification of the following seven results to the reader P ± QP PaQ r = r(P + Q), r = r(P + Q) a = QP± Q 2 QP 2 for 1, PQ r = r(P + Q) QP± Q 2 ,

PQQ PQQ r QP 0 = 3r(P + Q), r −QP Q= r(P) + 2r(P + Q), Q 0 P −Q −QP P + QP 0 r PP+ QP= r(P) + 2r(P + Q), 0 PP+ Q ⎡ ⎤ PQ00 ⎢QP Q 0 ⎥ r ⎣ ⎦ = 4r(P + Q). 0 QP Q 00QP

Some others can be found in Tian and Styan [22]. Further, for block matrices consisting of complex orthogonal projectors, one can also establish various nontrivial rank equalities.

Theorem 2.8. Let P and Q be a pair of orthogonal projectors of the same size. Then P + QPQ r = r(P + Q) QP P + Q 2 , (2.32)

P + QPQ 0 r QP P + QPQ= 3r(P + Q). (2.33) 0 QP P + Q

Proof. Note P 2 = P = P ∗ and Q2 = Q = Q∗. Hence,

∗ P + QPQ PQ0 PQ0 = . QP P + Q Q 0 P Q 0 P

From P + Q =[P,Q][P,Q]∗, we also see

R(Q) ⊆ R(P + Q) and r(P + Q) = r[P,Q]. 88 Y. Tian, G.P.H. Styan / Journal of Computational and Applied Mathematics 191 (2006) 77–97

Hence, P + QPQ PQ r = r 0 QP P + Q Q 0 P P + QQ = r 0 P + Q 0 P P + Q = r 00 0 −QP = r(P + Q) + r[−Q, P ]=2r(P + Q).

Also note that P + QPQ 0 PQ00 PQ00∗ QP P + QPQ= 0 PQ0 0 PQ0 . 0 QP P + Q 00PQ 00PQ

Hence, P + QPQ 0 PQ00 r QP P + QPQ= r 0 PQ0 0 QP P + Q 00PQ P + QQ 00 = r P + QP Q 0 P + Q 0 PQ P + QQ 00 = r 0 P − QQ 0 0 −QPQ P − QQ = r(P + Q) + r 0 0 PQ PQ = r(P + Q) + r 0 PPQ PQ = r(P + Q) + r 0 0 P − QQ PQ = r(P + Q) + r 0 0 PQ = 3r(P + Q).  Y. Tian, G.P.H. Styan / Journal of Computational and Applied Mathematics 191 (2006) 77–97 89

By induction, one can show that ⎡ ⎤ P + QPQ ⎢ . ⎥ ⎢ QP P + Q .. ⎥ r⎢ . . ⎥ = nr(P + Q), (2.34) ⎣ .. .. PQ ⎦ QP P + Q n×n

where all blanks are zero matrices, that is, the tri-diagonal block matrix satisfy (2.34) a rank additivity condition for its main diagonal blocks. The rank of P + Q for a pair of idempotent matrices P and Q is closely linked to the ranks of P − Q, PQ± QP , Im − P − Q and so on. The following rank formulas for a pair of idempotent matrices P and Q were shown in Tian and Styan [21]

r(P + Q) + r(PQ − QP ) = r(P − Q) + r(PQ + QP ), (2.35)

r(P + Q) = r(P + Q − PQ), (2.36)

r(P + Q) = r(PQ + QP ) − r(Im − P − Q) + m. (2.37)

Combining (2.35)–(2.37) with (2.1)–(2.5), (2.9)–(2.14), (2.22), (2.23), (2.25)–(2.37), one can also give many necessary and sufficient conditions for P ± Q, PQ± QP , Im − P − Q to be nonsingular. For the ranks of PQ± QP and a1PQ+ a2QP , we also have the following results:

Theorem 2.9. Let P and Q be a pair of idempotent matrices of order m, and let a1 and a2 be two nonzero scalars with a1 + a2 = 0. Then PQ r(PQ − QP ) = r + r[PQ,QP]−r(PQ) − r(QP ) QP , (2.38) PQ QP QP P Q r(PQ + QP ) = r − r(QP ) = r − r(PQ), (2.39) QP 0 PQ 0

r(a1PQ+ a2QP ) = r(PQ + QP ). (2.40)

Hence,

(a) PQ= QP if and only if R(P Q) = R(QP ) and R[(P Q)∗]=R[(QP )∗]. (b) PQ+ QP = 0 if and only if PQ= QP = 0.

Proof. The proof of (2.38) is given in Tian and Styan [24]. Note that PQ 0 a1PQ PQ 00 r 0 QP a2QP = r 0 QP 0 PQ QP 0 00−a1PQ− a2QP

= r(PQ) + r(QP ) + r(a1PQ+ a2QP ). (2.41) 90 Y. Tian, G.P.H. Styan / Journal of Computational and Applied Mathematics 191 (2006) 77–97

On the other hand, note that P 2 = P and Q2 = Q. We also see by elementary block matrix operations that PQ 0 a1PQ PQ 0 a1PQ r 0 QP a2QP = r −QP Q 0 a2QP PQ QP 0 PQ QP 0 ( + a a−1)P Q a PQ 1 1 2 0 1 = r 00a2QP PQ QP 0 PQ 00 = r 00 a2QP −1 0 QP a1(1 + a1a )P Q 2 a (a + a )−1a PQ QP = r 1 1 2 2 + r(PQ) QP 0 PQ QP = r + r(PQ). (2.42) QP 0 The following result can be shown similarly PQ a PQ 0 1 PQ QP r 0 QP a QP = r + r(PQ). (2.43) 2 QP 0 PQ QP 0 Combining (2.41), (2.42) and (2.43) yields (2.39) and (2.40). 

Note that

(Im − P )(Im − Q) − (Im − Q)(Im − P)= PQ− QP . Hence, we also derive from (2.38) that (Im − P )(Im − Q) r(PQ − QP ) = r + r[(Im − P )(Im − Q), (Im − Q)(Im − P)] (Im − Q)(Im − P) + 2r(P) + 2r(Q) − 2m − r(PQ) − r(QP ). The following rank inequality r(PQ + QP ) max{r(P Q), r(QP )} is derived from (2.39). The equivalence in Theorem 2.9(a) prompts us to propose such a general question: Suppose a and b are two idempotents over a unital ring R.IfabR = baR and Rab = Rba, can we say ab = ba? If a pair of idempotent matrices P and Q satisfy PQ= QP , then we can derive many results related to this pair of matrices. According to the conventional matrix addition and multiplication, all the linear combinations

a0Im + a1P + a2Q + a3PQ, Y. Tian, G.P.H. Styan / Journal of Computational and Applied Mathematics 191 (2006) 77–97 91

where a0,a1,a2,a3 ∈ C, generate a four-dimensional algebra over C. This algebra (a special case of four-dimensional Clifford algebras) has many interesting properties. For instance, the following similarity identity ⎡ ⎤ t1Im 000 −1 ⎢ 0 t2Im 00⎥ L diag(M1,M2,M3,M4)L = ⎣ ⎦ 00t3Im 0 000t4Im holds, where

M1 = a0Im + a1P + a2Q + a3PQ,

M2 = (a0 + a2)Im + (a1 + a3)P − a2Q − a3PQ,

M3 = (a0 + a1)Im − a1P + (a2 + a3)Q − a3PQ,

M4 = (a0 + a1 + a2 + a3)Im − (a1 + a3)P − (a2 + a3)Q + a3PQ,

t1 = a0,t2 = a0 + a2,t3 = a0 + a1,t4 = a0 + a1 + a2 + a3, and L = L−1 ⎡ ⎤ MQ− PQ P − PQ PQ ⎢Q − PQ M −PQ −(P − PQ)⎥ = ⎣ ⎦ P − PQ −PQ M −(Q − PQ) , PQ −(P − PQ) −(Q − PQ) M

where M = Im − P − Q + PQ. On the other hand, M1 can be factorized as

M1 = t1(In − P − Q + PQ)+ t2(Q − PQ)+ t3(P − PQ)+ t4PQ, and Mk = tk(I − P − Q + PQ)+ tk(Q − PQ)+ tk(P − PQ)+ tkPQ 1 1 m 2 3 4 .

If t1t2t3t4 = 0, then M1 is nonsingular, and the inverse of M1 can be written as M−1 = 1 (I − P − Q + PQ)+ 1 (Q − PQ)+ 1 (P − PQ)+ 1 PQ 1 m . t1 t2 t3 t4 It is shown in Tian [17] that any pair of matrices A and B of the same size satisfy − − A min r(A − B ) = r(A − B) − r − r[A, B]+r(A) + r(B). A−,B− B Hence, A and B have a common generalized inverse if and only if A r(A − B) = r + r[A, B]−r(A) − r(B) B . (2.44) Applying (2.44) to (2.38), we see that for any pair of idempotent matrices P and Q of the same order, the two products PQ and QP have a common generalized inverse. 92 Y. Tian, G.P.H. Styan / Journal of Computational and Applied Mathematics 191 (2006) 77–97

We leave the verification of the following result to the reader.

Theorem 2.10. Let P and Q be a pair of idempotent matrices of order m, let A = PQP and B = QP Q, and let a1 and a2 be two nonzero scalars with a1 + a2 = 0. Then A r(A − B) = r + r[A, B]−r(A) − r(B) B , AB BA r(A + B) = r − r(B) = r − r(A), B 0 A 0

r(a1A + a2B) = r(A + B), r(A + B) max{r(A), r(B)}. Hence,

(a) A = B if and only if R(A) = R(B) and R(A∗) = R(B∗). (b) A + B = 0 if and only if A = B = 0.

It is easy to verify that if P 2 = P and Q2 = Q, then (P − Q)3 − (P − Q) = PQP − QP Q. Hence, PQP r[(P − Q)3 − (P − Q)]=r + r[PQP,QPQ]−r(PQP)− r(QP Q) QP Q .

In particular, (P − Q)3 = P − Q if and only if ∗ ∗ R(P QP ) = R(QP Q) and R[(P QP ) ]=R[(QP Q) ]. Some more general results for a pair of idempotent matrices P and Q of the same order and k 1 are given below. (P Q)k r[(P Q)k − (QP )k]=r + r[(P Q)k, (QP )k]−r[(P Q)k]−r[(QP )k] (QP )k , (P Q)k (QP )k r[(P Q)k + (QP )k]=r − r[(QP )k] (QP )k 0 k k (QP ) (P Q) k = r k − r[(P Q) ], (P Q) 0 (P QP )k r[(P QP )k − (QP Q)k]=r + r[(P QP )k, (QP Q)k]−r[(P QP )k]−r[(QP Q)k] (QP Q)k , (P QP )k (QP Q)k r[(P QP )k + (QP Q)k]=r − r[(QP )kQ] (QP Q)k 0 k k (QP Q) (P QP ) k = r k − r[P (QP ) ]. (P QP ) 0 In addition, we have the following result: Y. Tian, G.P.H. Styan / Journal of Computational and Applied Mathematics 191 (2006) 77–97 93

Theorem 2.11. Let P and Q be a pair of idempotent matrices of order m. Then P P r = r + r(QP ) − r(Q) PQ Q , (2.45)

r[P,QP]=r[P,Q]+r(PQ) − r(Q), (2.46) PQ P r = r + r(PQ) + r(QP ) − r(P) − r(Q) QP Q , (2.47)

r[PQ,QP]=r[P,Q]+r(PQ) + r(QP ) − r(P) − r(Q). (2.48)

Proof. We need the following rank equalities

r[(Im − P )(Im − Q)]=m − r(P) − r(Q) + r(PQ), (2.49)

r[(Im − Q)(Im − P)]=m − r(P) − r(Q) + r(QP ) (2.50)

in our proof, both of which are derived from (2.8). By elementary block matrix operations, QI I m 0 m P r P = r P = r + m 0 0 PQ , (2.51) 0 P −PQ 0

and PI I m 0 m PQ r PQ = r PQ = r + m 0 0 QP . (2.52) 0 Q −QP 0

Also note that R(P ) ∩ R(Im − P)={0} and R(Q) ∩ R(Im − Q) ={0}. Hence, we also find by elementary block matrix operations, (2.7), (2.49) and (2.50) that QIm QIm − Q r P 0 = r P −P 0 P 0 P Q(I− Q)(I − P) = r m m + r(P) P 0 Q = r + r[(I − Q)(I − P)]+r(P) P m m P = r + m − r(Q) + r(QP ) Q , (2.53) 94 Y. Tian, G.P.H. Styan / Journal of Computational and Applied Mathematics 191 (2006) 77–97 and PIm PIm − P r PQ 0 = r PQ PQ 0 Q 0 Q P(I− P )(I − Q) = r m m + r(Q) PQ 0 P = r + r[(I − P )(I − Q)]+r(Q) PQ m m P = r + m − r(P) + r(PQ) PQ . (2.54)

Combining (2.51) and (2.53) gives (2.45). Combining (2.52), (2.54) and (2.45) gives (2.47). The two rank equalities in (2.46) and (2.48) can be derived similarly from the following two block matrices QP 0 PQP0 and .  Im 0 P Im 0 Q

Substituting (2.47) and (2.48) into (2.38) gives P r(PQ − QP ) = r + r[P,Q]+r(PQ) + r(QP ) − r(P) − r(Q) Q 2 2 .

This equality was shown in Tian and Styan [21] in another method. Note that both AA− and A−A are idempotent for any generalized inverse of A. However, the two products are not necessarily unique. Therefore, the ranks of AA− ± B−B and AA− ± BB− are variant with respect to the choice of A− and B−. The following results were shown in Tian [18]:

Lemma 2.12. Let A ∈ Cm×k and B ∈ Cl×m. Then − − max r(AA + B B) = min{m, r(A) + r(B)}, A−,B− − − min r(AA + B B) = r(A) + r(B) − r(BA), A−,B− − − max r(AA − B B) = min{2m − r(A) − r(B), r(A) + r(B)}, A−,B− − − min r(AA − B B) = r(A) + r(B) − 2r(BA). A−,B− Hence,

(a) There are A− and B− such that AA− + B−B is nonsingular if and only if r(A) + r(B)m. (b) The rank of AA− + B−B is invariant with respect to both A− and B− if and only if BA = 0 or r(BA) = r(A) + r(B) − m. (c) There are A− and B− such that AA− − B−B is nonsingular if and only if r(A) + r(B) = m. (d) There are A− and B− such that AA− = B−B if and only if r(A) + r(B) = 2r(BA). Y. Tian, G.P.H. Styan / Journal of Computational and Applied Mathematics 191 (2006) 77–97 95

(e) The rank of AA− − B−B is invariant with respect to the choice of A− and B− if and only if BA= 0 or r(BA) = r(A) + r(B) − m.

As consequences, − − min r[AA + (Im − A) (Im − A)]=m, − − A ,(Im−A) − − min r[(Im + A)(Im + A) + (Im − A) (Im − A)]=m, − − (Im+A) ,(Im−A) − − − − which imply that both AA + (Im − A) (Im − A) and (Im + A)(Im + A) + (Im − A) (Im − A) are − − − nonsingular for any A ,(Im − A) and (Im + A) .

Lemma 2.13. Let A ∈ Cm×n and B ∈ Cm×k. Then − − max r(AA + BB ) = r[A, B], A−,B−

− − min r(AA + BB ) = max{r(A), r(B)}, A−,B−

− − max r(AA − BB ) = min{r[A, B],r[A, B]+m − r(A) − r(B)}, A−,B−

− − min r(AA − BB ) = max{r[A, B]−r(A), r[A, B]−r(B)}. A−,B−

Hence,

(a) There are A− and B− such that AA− + BB− is nonsingular if and only if r[A, B]=m. (b) There are A− and B− such that AA− − BB− is nonsingular if and only if r[A, B]=m or r[A, B]= r(A) + r(B). (c) There are A− and B− such that AA− = BB− if and only if R(A) = R(B).

Substituting Lemmas 2.12 and 2.13 into Theorems 2.1, 2.3, 2.6 and 2.7 yields a variety of interesting results on the maximal and minimal ranks of block matrices. We leave them to the reader. The sum of k idempotent matrices or operators was also examined in the literature; see, e.g., [4,14,16,27]. It is also of interest to establish various rank equalities for the sum of k matrices. For the sum P1 +P2 +P3 of three idempotent matrices P1, P2 and P3, it is easy to show 1 P P P 2 1 2 3 r(P1 + P2 + P3) = r P2 0 P2P3 − r(P2) − r(P3). P3 P3P2 0 P 2 =P P 2 =P P 2 =P Many consequences can be derived from this rank formula. For example, if 1 1 2 2 and 3 3 and P1+P2+P3=0, then P1=P2=P3=0. This result was proved by Bart [1] through the noncommutative computer algebra. Rank formulas for the sum P1 +···+Pk with P1,...,Pk idempotent and k>3 are still open. From (2.34), one can also derive the following result, which is proposed as a problem in Tian [20]. 96 Y. Tian, G.P.H. Styan / Journal of Computational and Applied Mathematics 191 (2006) 77–97

Theorem 2.14. Let P and Q be a pair of complex orthogonal projectors of the same size. Then ⎡ ⎤ ⎡ ⎤ P + QPQ P + Q ⎢ .. ⎥ ⎢ P + Q ⎥ ⎢ QP P + Q . ⎥ ⎢ ⎥ R⎢ . . ⎥ = R⎣ .. ⎦ , ⎣ .. .. PQ ⎦ . P + Q QP P + Q n×n n×n where the blanks are zero matrices.

Remark 2.15. Idempotent matrices can be defined associated with vector spaces. Suppose Cm =R(A)⊕ R(B), i.e., r[A, B]=r(A) + r(B) = m. Then the oblique projector on R(A) along R(B) is a matrix T m that satisfies Tx= x1 for any x = x1 + x2 ∈ C , where x1 ∈ R(A) and x2 ∈ R(B), and is denoted by T = PA,B. It is shown in Greville [6] that PA,B can be written as ⊥ † † ⊥ † PA,B = (PB PA) ,PA = AA ,PB = Im − BB .

Applying the results in this paper to oblique projectors, one can also find many new properties on PA,B and PB,A and their applications. Moreover, one can obtain the conditions for PA,B = PA,C, PA,BPB,A = PB,APA,B,PA,B = PA to hold.

Remark 2.16. A square matrix J ∈ Cm×m is called a weighted orthogonal projector with respect to a Hermitian positive definite matrix M ∈ Cm×m (or, simply, the M-orthogonal projector) if ∗ J 2 = J and (MJ ) = MJ. If, in addition, R(J ) = R(A), J is called the M-orthogonal onto R(A), where A ∈ Cm×n, and is denoted as PA:M . A well-known fundamental minimizing property of the M-orthogonal projector is n y − PA:M y M  y − Ax M for all x,y ∈ C , 2 ∗ where the norm is defined as x M = x Mx. Applying the results in this paper to weighted orthogonal projectors, one can also find many new properties on weighted orthogonal projectors.

Remark 2.17. It is of interest to show various rank equalities for idempotent matrices. Theoretically, for any matrix expression consisting of idempotent matrices, one can establish some formulas for its rank by elementary block matrix operations. From these formulas, one can derive various valuable consequences. For example, the nonsingularity of a matrix expression, necessary and sufficient conditions for two matrix expressions to be equal and the equivalence of matrix equalities. On the other hand, many problems related to idempotent matrices can be proposed from matrix theory and its applications. These problems also prompt us to give deep investigations into idempotent matrices. Various techniques for establishing rank equalities for idempotent matrices and involutory matrices are presented in Tian and Styan [21–23].

Acknowledgements

We are most grateful to Yoshio Takane for several insightful discussions on the results in this paper. Sincere thanks go also to the referee for helpful comments and suggestions. Y. Tian, G.P.H. Styan / Journal of Computational and Applied Mathematics 191 (2006) 77–97 97

References

[1] H. Bart, Sum of k idempotents equals 0: cases k = 3 and 4, http://math.ucsd.edu/∼ncalg/Bart/sumequals0.html. [2] D. Buckholtz, Inverting the difference of Hilbert space projections, Amer. Math. Monthly 104 (1997) 60–61. [3] S. Cheng,Y. Tian, Moore–Penrose inverses of products and differences of orthogonal projectors, Acta Sci. Math. (Szeged) 69 (2003) 533–542. [4] T. Ehrhardt,V.Rabanovich,Yu. Samoıˇlenko, B. Silbermann, On the decomposition of the identity into a sum of idempotents, Methods Funct. Anal. Topology 7 (2001) 1–6. [5] J.A. Erdos, On products of idempotent matrices, Glasgow Math. J. 8 (1967) 118–122. [6] T.N.E. Greville, Solutions of the matrix equation XAX = X, and relations between oblique and orthogonal projectors, SIAM J. Appl. Math. 26 (1974) 828–832. [7] J. Groß, G. Trenkler, Nonsingularity of the difference of two oblique projectors, SIAM J. Matrix Anal. Appl. 21 (1999) 390–395. [8] R.E. Hartwig, M.S. Putcha, When is a matrix a difference of two idempotents?, Linear and Multilinear Algebra 26 (1990) 267–277. [9] R.E. Hartwig, M.S. Putcha, When is a matrix a sum of idempotents?, Linear and Multilinear Algebra 26 (1990) 279–286. [10] J.J. Koliha, V. Rakoˇcevi´c, Invertibility of the sum of idempotents, Linear and Multilinear Algebra 50 (2002) 285–292. [11] J.J. Koliha, V. Rakoˇcevi´c, Invertibility of the difference of idempotents, Linear and Multilinear Algebra 51 (2003) 97–110. [12] C. Laurie, B. Mathes, H. Radjavi, Sums of idempotents, Appl. 208/209 (1994) 175–197. [13] G. Marsaglia, G.P.H. Styan, Equalities and inequalities for ranks of matrices, Linear and Multilinear Algebra 2 (1974) 269–292. [14] V. Rabanovich, Yu. Samo˘ılenko, When the sum of idempotents or projectors is a multiple of unity, Funct. Anal. Appl. 34 (2000) 311–313. [15] H. Radjavi, P. Rosenthal, On commutators of idempotents, Linear and Multilinear Algebra 50 (2002) 121–124. [16] Yu. Samo˘ılenko, L. Turowska, On bounded and unbounded idempotents whose sum is a multiple of the identity, Methods Funct. Anal. Topology 8 (2002) 79–100. [17] Y. Tian, The minimal rank of the matrix expression A − BX − YC, Missouri J. Math. Sci. 14 (2002) 40–48. [18] Y. Tian, Upper and lower bounds for ranks of matrix expressions using generalized inverses, Linear Algebra Appl. 355 (2002) 187–214. [19] Y. Tian, Problem 753: a rank identity, solved by M. Bataille and other seven solvers, The College J. Math. (2003). [20] Y. Tian, Problem 04.2.1: a range equality for block matrices with orthogonal projectors, Econometric Theory 20 (2004) 427. [21] Y. Tian, G.P.H. Styan, Some rank equalities for idempotent and involutory matrices, Linear Algebra Appl. 335 (2001) 101–117. [22] Y. Tian, G.P.H. Styan, When does rank(ABC) = rank(AB) + rank(BC) − rank(B) hold?, Internat. J. Math. Ed. Sci. Technol. 33 (2002) 127–137. [23] Y. Tian, G.P.H. Styan, A new rank formula for idempotent matrices with applications, Comment. Math. Univ. Carolin. 43 (2002) 379–384. [24] Y. Tian, G.P.H. Styan, How to characterize equalities for orthogonal projectors, Linear Algebra Appl., accepted. [25] J.-H. Wang, The length problem for a sum of idempotents, Linear Algebra Appl. 215 (1995) 135–159. [26] J.-H. Wang, P.Y. Wu, Difference and similarity models of two idempotent operators, Linear Algebra Appl. 208/209 (1994) 257–282. [27] P.Y. Wu, Sums of idempotent matrices, Linear Algebra Appl. 142 (1990) 43–54.