Ma · Mathematics

How to Find the Rank of a Matrix A with A² = A

Published By the 9to5Science editorial team

At a glance

  1. 1. Recognize idempotence

    The equation A² = A says that applying A twice has the same effect as applying it once.

  2. 2. Use the image and kernel

    The vector space splits into the image of A and its kernel, so rank plus nullity equals the matrix size.

  3. 3. Determine the rank

    The equation alone does not specify a numerical rank; use the matrix entries or its trace to find it.

A matrix satisfying A2=AA^2=A is idempotent: applying the corresponding linear transformation twice has the same effect as applying it once. This condition gives useful structure, but it does not by itself determine a single numerical rank. For an n×nn\times n matrix, the rank may be any integer from 00 through nn.

The equation does imply that, over the real or complex numbers, the rank equals the trace. If you have the entries of AA, you can also find the rank directly by row reduction.

Why the equation does not determine one rank

For any n≥1n\geq 1, both the zero matrix and the identity matrix satisfy the condition:

02=0,In2=In.0^2=0,\qquad I_n^2=I_n.

Their ranks are 00 and nn, respectively. More generally, for each integer rr between 00 and nn, the diagonal matrix

(Ir000)\begin{pmatrix} I_r & 0\\ 0 & 0 \end{pmatrix}

(where the zero block has size n−rn-r) satisfies A2=AA^2=A and has rank rr. So without additional information, there is no unique rank to report.

The image and kernel split the space

Think of AA as a linear map from an nn-dimensional vector space to itself. Every vector xx can be written as a sum of a vector in the image of AA and a vector in its kernel:

x=Ax+(x−Ax).x=Ax+(x-Ax).

The first term is in the image. The second is in the kernel because

A(x−Ax)=Ax−A2x=Ax−Ax=0.A(x-Ax)=Ax-A^2x=Ax-Ax=0.

Moreover, the image and kernel intersect only in the zero vector. If yy is in the image, then y=Axy=Ax for some xx, and idempotence gives Ay=A2x=Ax=yAy=A^2x=Ax=y. If yy is also in the kernel, then Ay=0Ay=0, so y=0y=0.

Thus the whole space is the direct sum of the image and kernel. The rank-nullity theorem then gives

rank⁡(A)+nullity⁡(A)=n.\operatorname{rank}(A)+\operatorname{nullity}(A)=n.

In a basis formed first from a basis of the image and then from a basis of the kernel, the transformation has matrix diag⁡(Ir,0)\operatorname{diag}(I_r,0), where r=rank⁡(A)r=\operatorname{rank}(A). This explains why the rank can be any integer from 00 to nn.

Why rank equals trace over R or C

In the basis just described, the matrix has rr diagonal entries equal to 11 and the rest equal to 00. Its trace is therefore rr, its rank. Trace is unchanged by a change of basis, so the original matrix has the same trace. Consequently, for a real or complex idempotent matrix,

rank⁡(A)=tr⁡(A).\operatorname{rank}(A)=\operatorname{tr}(A).

This is a quick way to find the rank when the entries are known. For example, let

A=(1100).A=\begin{pmatrix}1&1\\0&0\end{pmatrix}.

Then

A2=(1100)=A,A^2=\begin{pmatrix}1&1\\0&0\end{pmatrix}=A,

so AA is idempotent. Its trace is 1+0=11+0=1, and its rank is 11; indeed, its two columns are (1,0)T(1,0)^T and (1,0)T(1,0)^T, so they span a one-dimensional space.

Finding the rank from a specific matrix

If the problem provides the entries of AA, either count the nonzero diagonal entries only after establishing a suitable diagonal form, or use standard row reduction:

  1. Form the matrix AA from the given entries.
  2. Reduce it to row-echelon form.
  3. Count the pivot positions. That count is rank⁡(A)\operatorname{rank}(A).
  4. As a check over R\mathbb{R} or C\mathbb{C}, add the diagonal entries of the original matrix. The sum should equal the rank.

The trace shortcut is convenient, but row reduction also works and does not rely on first using the idempotence property. If the matrix is already diagonal with entries only 00 and 11, its rank is simply the number of 11s.

Common mistakes

  • Claiming the rank must be 1. Idempotence does not force rank 1; the rank may be any value from 00 to nn.
  • Treating A2=AA^2=A as enough to calculate a number. You need the entries of AA or some other information, such as its trace or the dimension of its image.
  • Using the diagonal entries as the rank in any basis. Rank is not generally the number of nonzero diagonal entries of the matrix as written. The trace shortcut works because trace is invariant under change of basis and an idempotent map has a basis in which its matrix is diag⁡(Ir,0)\operatorname{diag}(I_r,0).
  • Ignoring the number system. The identity rank⁡(A)=tr⁡(A)\operatorname{rank}(A)=\operatorname{tr}(A) is stated here over the real or complex numbers. In positive characteristic, the trace is interpreted in that field and can fail to distinguish ranks as ordinary integers.

References

  1. Linear Algebra, 5th Edition — Stephen H. Friedberg, Arnold J. Insel, and Lawrence E. Spence
  2. Linear Algebra Done Right, 3rd Edition — Sheldon Axler

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.