Research Article | Open Access

# On the Necessary and Sufficient Condition for a Set of Matrices to Commute and Some Further Linked Results

**Academic Editor:**Angelo Luongo

#### Abstract

This paper investigates the necessary and sufficient condition for a set of (real or complex) matrices to commute. It is proved that the commutator for two matrices and if and only if a vector defined uniquely from the matrix is in the null space of a well-structured matrix defined as the Kronecker sum , which is always rank defective. This result is extendable directly to any countable set of commuting matrices. Complementary results are derived concerning the commutators of certain matrices with functions of matrices which extend the well-known sufficiency-type commuting result .

#### 1. Introduction

The problem of commuting operators and matrices, in particular, is very relevant in a significant number of problems of several branches of science, which are very often mutually linked, cited herein after.

(1) In several fields of interest in Applied Mathematics or Linear Algebra [1–22] including Fourier transform theory, graph theory where, for instance, the commutativity of the adjacency matrices is relevant [1, 17–19, 21–35], Lyapunov stability theory with conditional and unconditional stability of switched dynamic systems involving discrete systems, delayed systems, and hybrid systems where there is a wide class of topics covered including their corresponding adaptive versions including estimation schemes (see, e.g., [23–41]). Generally speaking, linear operators, and in particular matrices, which commute share some common eigenspaces. *On the other hand, a known mathematical result is that two graphs with the same vertex set commute if their adjacency matrices commute* [16]. Graphs are abstract representations of sets of objects (vertices) where some pairs of them are connected by links (arcs/edges). Graphs are often used to describe behaviors of multiconfiguration switched systems where nodes represent each parameterized dynamics and arcs describe allowed switching transitions [35]. They are also used to describe automatons in Computer Science. Also, it has been proven that equalities of products involving two linear combinations of two any length products having orthogonal projectors (i.e., Hermitian idempotent matrices) as factors are equivalent to a commutation property [21].

(2) In some fields in Engineering, such as multimodel regulation and Parallel multiestimation [36–41]. Generally speaking switching among configurations can improve the transient behavior. *Switching can be performed arbitrarily (i.e., at any time instant) through time while guaranteeing closed-loop stability if a subset of the set of configurations is stable provided that a common Lyapunov function exists for them. **This property is directly related to certain pair wise commutators of matrices describing configuration dynamics being zero* [7, 10, 11, 14, 15]. Thus, the problem of commuting matrices is in fact of relevant interest in dynamic switched systems, namely, those which possess several parameterized configurations, one of them, is becoming active at each current time interval. If the matrices of dynamics of all the parameterizations commute then there exists a common Lyapunov function for all those parameterizations and any arbitrary switching rule operating at any time instant maintains the global stability of the switched rule provided that all the parameterizations are stable [7]. This property has been described also in [23–25, 28–30] and many other references therein. In particular, there are recent studies which prove that, in these circumstances, arbitrary switching is possible if the matrices of dynamics of the various configurations commute while guaranteeing closed-loop stability. This principle holds not only in both the continuous-time delay-free case and in the discrete-time one but even in configurations involving time-delay and hybrid systems as well. See, for instance, [10–15, 27–30, 34–41] and references therein. The set of involved problems is wide enough like, for instance, switched multimodel techniques [27–30, 35, 36, 40, 41], switched multiestimation techniques with incorporated parallel multiestimation schemes involving adaptive control [34, 38–40], time delay and hybrid systems with several configurations under mutual switching, and so forth [10, 11, 14, 15] and references therein. Multimodel tools and their adaptive versions incorporating parallel multiestimation are useful to improve the regulation and tracking transients including those related to triggering circuits with regulated transient via multiestimation [36], master-slave tandems [39], and so forth. However, *it often happens that there is no common Lyapunov function for all the parameterizations becoming active at certain time intervals. Then, a minimum residence (or dwelling) time at each active parameterization has to be respected before performing the next switching in order to guarantee the global stability of the whole switched system so that the switching rule among distinct parameterizations is not arbitrary* [7, 12, 13, 27–30, 34–41].

(3) In some problems of Signal Processing. See, for instance, [1, 17, 18] concerning the construction of DFT (Discrete Fourier transform)-commuting matrices. *In particular, a complete orthogonal set of eigenvectors can be obtained for several types of offset DFT’s and DCT’s under commutation properties*.

(4) In certain areas of Physics, and in particular, in problems related to Quantum Mechanics. See, for instance, [22, 42, 43]. *Basically, a complete set of commuting observables is a set of commuting operators whose eigenvalues completely specify the state of a system since they share eigenvectors and can be simultaneously measured* [22, 42, 43]. These Quantum Mechanics tools have also inspired other Science branches. For instance, it is investigated in the above mentioned reference [18] a commuting matrix whose eigenvalue spectrum is very close to that of the Gauss-Hermite differential operator. It is proven that it furnishes two generators of the group of matrices *which commute with the discrete Fourier transform*. *It is also pointed out that the associate research inspired in Quantum Mechanics principles*. There is also other relevant basic scientific applications of commuting operators. For instance, the symmetry operators in the point group of a molecule always commute with its Hamiltonian operator [20]. The problem of commuting matrices is also relevant to analyze the normal modes in dynamic systems or the discussion of commuting matrices dependent on a parameter (see, e.g., [2, 3]).

It is well known that commuting matrices have at least a common eigenvector and also, a common generalized eigenspace [4, 5]. A less restrictive problem of interest in the above context is that of almost commuting matrices, roughly speaking, the norm of the commutator is sufficiently small [5, 6]. A very relevant related result is that the sum of matrices which commute is an infinitesimal generator of a -semigroup. This leads to a well-known result in Systems Theory establishing that the matrix function is a fundamental (or state transition) matrix for the cascade of the time invariant differential systems , operating on a time , and , operating on a time , provided that and commute (see, e.g., [7–11]).

*Most of the abundant existing researches concerning sets of commuting operators, in general, and matrices, in particular, are based on the assumption of the existence of such sets implying that each pair of mutual commutators is zero*. *There is a gap in giving complete conditions guaranteeing that such commutators within the target set are zero*. *This paper formulates the necessary and sufficient condition for any countable set of (real or complex) matrices to commute*. The sequence of obtained results is as follows. Firstly, the commutation of two real matrices is investigated in Section 2. The necessary and sufficient condition for two matrices to commute is that a vector defined uniquely from the entries of any of the two given matrices belongs to the null space of the Kronecker sum of the other matrix and its minus transpose. The above result allows a simple algebraic characterization and computation of the set of commuting matrices with a given one. It also exhibits counterparts for the necessary and sufficient condition for two matrices not to commute. The results are then extended to the necessary and sufficient condition for commutation of any set of real matrices in Section 3. In Section 4, the previous results are directly extended to the case of complex matrices in two very simple ways, namely, either by decomposing the associated algebraic system of complex matrices into two real ones or by manipulating it directly as a complex algebraic system of equations. Basically, the results for the real case are directly extendable by replacing transposes by conjugate transposes. Finally, further results concerning the commutators of matrices with matrix functions are also discussed in Section 4. The proofs of the main results in Sections 2, 3, and 4 are given in corresponding Appendices A, B, and C. *It may be pointed out that there is implicit following duality of the main result. Since a necessary and sufficient condition for a set of matrices to commute is formulated and proven, the necessary and sufficient condition for a set of matrices not to commute is just the failure in the above one to hold*.

##### 1.1. Notation

is the commutator of the square matrices and .

is the Kronecker (or direct) product of and .

is the Kronecker sum of the square matrices and both of order , where is the *n*th identity matrix.

is the transpose of the matrix and is the conjugate transpose of the complex matrix . For any matrix , and are its associate range (or image) subspace and null space, respectively. Also, is the rank of which is the dimension of and det is the determinant of the square matrix .

if is the *i*th row of the square matrix .

is the spectrum of . If then there exist positive integers and which are, respectively, its algebraic and geometric multiplicity; that is, the times it is repeated in the characteristic polynomial of and the number of its associate Jordan blocks, respectively. The integer is the number of distinct eigenvalues and the integer , subject to , is the index of ; , that is, its multiplicity in the minimal polynomial of .

denotes a similarity transformation from to for given for some nonsingular . means that there is an equivalence transformation for given for some nonsingular .

A linear transformation from to , represented by the matrix , is denoted identically to such a matrix in order to simplify the notation. If is a subspace of then and . If , the notation is simplified to and .

The symbols “’’ and “’’ stand for logic conjunction and disjunction, respectively. The abbreviation “iff’’ stands for “if and only if.’’ The notation card stands for the cardinal of the set . (resp., ) is the set of matrices which commute (resp., do not commute) with a matrix . (resp., ) is the set of matrices which commute (resp., do not commute) with all square matrix belonging to a given set .

#### 2. Results Concerning the Sets of Commuting and No Commuting Matrices with a Given One

Consider the sets , of matrices which commute with *A*, and , of matrices which do not commute with ; Note that ; that is, the zero *n*-matrix commutes with any *n*-matrix so that, equivalently, and then ; . The subsequent two basic results which follow are concerned with commutation and noncommutation of two real matrices and . The used tool relies on the calculation of the null space and the range space of the Kronecker sum of the matrix , one of the matrices, with its minus transpose. A vector built with all the entries of the other matrix has to belong to one of the above spaces for and to commute and to the other one in order that and not to be two commuting matrices.

Proposition 2.1. *
(i)
**
(ii)
**
(iii)
*

Note that according to Proposition 2.1 the set of matrices which commute with the square matrix and its complementary (i.e., the set of matrices which do not commute with ) can be redefined in an equivalent way by using their given expanded vector forms.

Proposition 2.2. *One has
*

*Proof. *One has ; . As a result,
so that

Also, since

Then, Proposition 2.2 has been proved.

The subsequent mathematical result is stronger than Proposition 2.2 and is based on characterization of the spectrum and eigenspaces of .

Theorem 2.3. *The following properties hold. **
(i) The spectrum of is and possesses Jordan blocks in its Jordan canonical form of, subject to the constraints , and with an algebraic multiplicity and with a geometric multiplicity subject to the constraints:
**
where *

(a)*, and are, respectively, the algebraic and the geometric multiplicities of , ; is the number of distinct , and , are, respectively, the algebraic and the geometric multiplicity of , ; *(b)* and are, respectively, the right eigenvectors of and with respective associated eigenvalues and . **
(ii) One has
*

Expressions which calculate the sets of matrices which commute and which do not commute with a given one are obtained in the subsequent result.

Theorem 2.4. *The following properties hold. **
(i) One has
**
for any , where are permutation matrices and and are defined as follows. *

(a)*One has
where with and *(b)*The matrix is nonsingular in the block matrix partition with , and . **
(ii)
, for any given , if and only if
**
for some such that
**
Also,
**
Also, with the same definitions of , , and in (i), if and only if
**
where is any solution of the compatible algebraic system
**
for some such that which are defined according to and with *

#### 3. Results Concerning Sets of Pair Wise Commuting Matrices

Consider the following sets.

(1)A set of nonzero distinct pair wise commuting matrices (2)The set of matrices which commute with the set of pair wise commuting matrices.(3)A set of matrices which commute with a given set of nonzero matrices which are not necessarily pair wise commuting.The complementary sets of and are and , respectively, so that if and if . Note that for a set of pair wise commuting matrices so that the notation is directly referred to a set of matrices which commute with all those in a set of pair wise commuting matrices. The following two basic results are concerned with the commutation and noncommutation properties of two matrices.

Proposition 3.1. *The following properties hold. *(i)*One has
*(ii)*Define
Then if and only if *(iii)*One has
where *(iv)*One has
*(v)*One has
where *(vi)*One has
*

Concerning Proposition 3.1(v)-(vi), note that if then since . The following result is related to the defectiveness of the matrix and any of their submatrices since is a set of pair wise commuting matrices.

Proposition 3.2. *The following properties hold:
**
and, equivalently,
*

Results related to sufficient conditions for a set of matrices to pair wise commute are abundant in literature. For instance, diagonal matrices are always pair wise commuting. Any sets of matrices obtained via multiplication by real scalars with any given arbitrary matrix are sets of pair wise commuting matrices. Any set of matrices obtained by linear combinations of one of the above sets consists also of pair wise commuting matrices. Any matrix commutes with any of its matrix functions, and so forth. In the following, a simple, although restrictive, sufficient condition for defectiveness of of some set of square real -matrices is discussed. Such a condition may be useful as a practical test to elucidate the existence of a nonzero -square matrix which commutes with all matrices in this set. Another useful test obtained from the following result relies on a necessary condition to elucidate if the given set consists of pair wise commuting matrices.

Theorem 3.3. *Consider any arbitrary set of nonzero -square real matrices for any integer and define matrices:
**
Then, the following properties hold: *(i)*.*(ii)* so that
*(iii)*If is a set of pair wise commuting matrices then
*(iv)*One has
**
with the above set inclusion being proper.*

Note that Theorem 3.3(ii) extends Proposition 3.1(v) since it is proved that because all nonzero for any and any set of matrices . Note that Theorem 3.3(iii) establishes that is a necessary and sufficient condition for the set to be a set of commuting matrices being simpler to test (by taking advantage of the symmetry property of the commutators) than the equivalent condition . Further results about pair wise commuting matrices or the existence of nonzero commuting matrices with a given set are obtained in the subsequent result based on the Kronecker sum of relevant Jordan canonical forms.

Theorem 3.4. *The following properties hold for any given set of -square real matrices **
(i) The set of matrices which commute with all matrices in is defined by:
**
where is a nonsingular transformation matrix such that , being the Jordan canonical form of . **
(ii) One has
**
where and are, respectively, the geometric multiplicities of and and and are, respectively, the algebraic multiplicities of and ; (the number of distinct eigenvalues of ), . **
(iii) The set consists of pair wise commuting matrices, namely , if and only if ; . Equivalent conditions follow from the second and third equivalent definitions of in Property (i).*

Theorems 3.3 and 3.4 are concerned with for an arbitrary set of real square matrices A and for a pair wise-commuting set, respectively.

#### 4. Further Results and Extensions

The extensions of the results for commutation of complex matrices are direct in several ways. It is first possible to decompose the commutator in its real and imaginary part and then apply the results of Sections 2 and 3 for real matrices to both parts as follows. Let and be complex matrices in with and being their respective real parts, and and , all in their respective imaginary parts, and is the imaginary complex unity. Direct computations with the commutator of and yield The following three results are direct and allow to reduce the problem of commutation of a pair of complex matrices to the discussion of four real commutators.

Proposition 4.1. *One has .*

Proposition 4.2. *One has .*

Proposition 4.3. *One has .*

Proposition 4.1 yields to the subsequent result.

Theorem 4.4. *The following properties hold. **
(i) Assume that the matrices and are given. Then, if and only if satisfies the following linear algebraic equation:
**
for which a necessary condition is
**
(ii) Assume that the matrices and are given. Then, if and only if satisfies (4.2) for which a necessary condition is
**
(iii) Also, such that with and such that with .*

A more general result than Theorem 4.4 is the following.

Theorem 4.5. *The following properties hold. **
(i)
if and only if is a solution to the following linear algebraic system:
**
Nonzero solutions , satisfying
**
always exist since
**
and equivalently, since
**
(ii) Property (ii) is equivalent to
**
which has always nonzero solutions since .*

The various results of Section 3 for a set of distinct complex matrices to pair wise commute and for characterizing the set of complex matrices which commute with those in a given set may be discussed by more general algebraic systems like the above one with four block matrices for each in the whole algebraic system. Theorem 4.5 extends directly for sets of complex matrices commuting with a given one and complex matrices commuting with a set of commuting complex matrices as follows.

Theorem 4.6. *The following properties hold. **
(i) Consider the sets of nonzero distinct complex matrices and for . Thus, if and only if
**
and a nonzero solution exists since the of the coefficient matrix of (4.11) is less than . **
(ii) Consider the sets of nonzero distinct commuting complex matrices and for . Thus, if and only if and are solutions to (4.11). **
(iii) Properties (i) and (ii) are equivalently formulated by from the algebraic set of complex equations:
*

*Remark 4.7. *Note that all the proved results of Sections 2 and 3 are directly extendable for complex commuting matrices, by simple replacements of transposes by conjugate transposes, without requiring a separate decomposition in real and imaginary parts as discussed in Theorems 4.5(ii) and 4.6(iii).

Let be an analytic function in an open set for some matrix and let be a polynomial fulfilling ; , ; (the number of distinct elements in ), where is the index of , that is, its multiplicity in the minimal polynomial of . Then, is a function of a matrix if , [8]. Some results follow concerning the commutators of functions of matrices.

Theorem 4.8. *Consider a nonzero matrix for any given nonzero . Then, , and equivalently , for any function of the matrix .*

The following corollaries are direct from Theorem 4.8 from the subsequent facts:

(1)(2)One has where , from the definition of being a function of the matrix , with being a polynomial fulfilling ; , ; (the number of distinct elements in ), where is the index of , that is, its multiplicity in the minimal polynomial of .(3)Theorem 4.8 is extendable for any countable set of matrix functions of .Corollary 4.9. *Consider a nonzero matrix for any given nonzero . Then, for any function of the matrix and any function of the matrix .*

Corollary 4.10. *, and equivalently , for any function of the matrix .*

Corollary 4.11. *If then any countable set of function matrices is and in .*

Corollary 4.12. *Consider any countable set of function matrices for any given nonzero . Then, *

Note that matrices which commute and are simultaneously triangularizable through the same similarity transformation maintain a zero commutator after such a transformation is performed.

Theorem 4.13. *Assume that Thus, provided that there exists a nonsingular matrix such that and .*

A direct consequence of Theorem 4.13 is that if a set of matrices are simultaneously triangularizable to their real canonical forms by a common transformation matrix then the pair wise commuting properties are identical to those of their respective Jordan forms.

#### Appendices

#### A. Proofs of the Results of Section 2

*Proof of Proposition 2.1. *(i)-(ii) First note by inspection that ; . Also,
and Proposition 2.1(i)-(ii) has been proved since there is an isomorphism defined by ; for if is the *i*th row of the square matrix .

(iii) It is a direct consequence of Proposition 2.1(iii) and the symmetry property of the commutator of two commuting matrices

*Proof of Proposition 2.2. *; . As a result,
so that

Also, since

Proposition 2.2 has been proved.

*Proof of Theorem 2.3. *(i) Note that
where
Furthermore, and is a right eigenvector of associated with its eigenvalue . has algebraic and geometric multiplicities and , respectively; , since and are, respectively, the right eigenvectors of and with associated eigenvalues and .

Let be the Jordan canonical form of . It is first proved that there exists a nonsingular such that . The proof is made by direct verification by using the properties of the Kronecker product, with for a nonsingular such that , as follows:
and the result has been proved. Thus, . It turns out that is, furthermore, unique except for multiplication by any nonzero real constant. Otherwise, if , then there would exist a nonsingular with such that so that provided that
Thus, note that
Those results follow directly from the properties of the Kronecker sum of *n*-square real matrices and since direct inspection leads to the following.(1) with algebraic multiplicity since there are at least zeros in (i.e., the algebraic multiplicity of is at least ) and since ; . Also, a simple computation of the number of eigenvalues of yields .(2)The number of linearly independent vectors in is since the total number of Jordan blocks in the Jordan canonical form of is .(3)The number of Jordan blocks associated with in the Jordan canonical form of is , with ; . Thus,
(4)There are at least linearly independent vectors in Also, the total number of Jordan blocks in the Jordan canonical form of is .

Property (i) has been proved. Property (ii) follows directly from the orthogonality in of its range and null subspaces.

*Proof of Theorem 2.4. *First note from Proposition 2.1 that if and only if since . Note also from Proposition 2.1 that if and only if . Thus, if and only if is a solution to the algebraic compatible linear system:
for any such that
From Theorem 2.3, the nullity and the of are, respectively, . Therefore, there exist permutation matrices such that there exists an equivalence transformation:
such that is square nonsingular and of order . Define . Then, the linear algebraic systems , and
are identical if and are defined according to and . As a result, Properties (i) and (ii) follow directly from (A.12) for and for any satisfying , respectively.

#### B. Proofs of the Results of Section 3

*Proof of Proposition 3.1. *(i) The first part of Property (i) follows directly from Proposition 2.1 since all the matrices of pair wise commute and any arbitrary matrix commutes with itself (thus may be removed from the intersections of kernels of the first double sense implication). The last part of Property (i) follows from the antisymmetric property of the commutator what implies .

(ii) It follows from its equivalence with Property (i) since