On this post we explain what commuting matrices are. In addition, you will see examples to perfectly understand the concept and, finally, you will find an exercise solved step by step in which we show how to calculate all matrices that commute with any matrix.

Table of Contents

## What are commuting matrices?

The meaning of commuting matrices is as follows:

Two **matrices commute** if the result of their product does not depend on the order of multiplication. That is, **commuting matrices** meet the following condition:

See: how to do a matrix multiplication

This is the definition of commuting matrices, now let’s see an example:

## Example of commuting matrices

The following two 2×2 dimension matrices commute with each other:

The commutability condition of the two matrices can be proven by calculating their product in both orders:

As you can see, the results of the two multiplications are the same, regardless of the order in which they are multiplied. Therefore, matrices and are commutative.

## Properties of commuting matrices

All commuting matrices have the following characteristics:

- Commuting matrices do not have the transitive property. In other words, even if matrix commutes with matrices and , this does not mean that and commute with each other.

- A diagonal matrix commutes with other diagonal matrices.

See properties of diagonal matrix.

- Similarly, a scalar matrix also commutes with all matrices. For example, the identity matrix commutes with all matrices.

- Obviously, the zero matrix also commutes with all matrices.

- If the product of two symmetric matrices results in another symmetric matrix, then the two matrices have to commute.

See example of symmetric matrix.

- Two hermitian matrices commute if their eigenvectors are the same.

See how to calculate the eigenvectors of a matrix.

- If the diagonalization of two matrices can be done simultaneously, it means that both matrices commute. Thus, these two matrices also share the same orthonormal basis of eigenvectors.

## Solved exercise of commuting matrices

Next we are going to see step by step how to solve a commuting matrices exercise:

- Find all matrices that commute with the following square matrix:

To solve this problem we will create an unknown matrix:

So we must find this unknown matrix.

To do this, we will take advantage of the property that all commuting matrices meet:

We multiply the matrices:

Therefore, for the equality to be fulfilled, the following equations must be satisfied:

So now we just have to solve the system of equations. From the last equation we can deduce that has to be equal to

And if these two unknowns are equivalent, the third equation is repeated with the second one, so we can eliminate it:

Furthermore, we cannot draw any conclusions from the first equation, since:

Therefore, we only have the second and the last equation:

So matrices that commute with matrix are all those that check the two previous equations. Thus, substituting the expressions found in the unknown matrix at the beginning, we can find the formula of matrices that commute with matrix

Where and are two real numbers.

So an example of a matrix that would commute with matrix would be the following: