In linear algebra, an idempotent matrix is a matrix which, when multiplied by itself, yields itself. That is, the matrix is idempotent if and only if . For this product to be defined, must necessarily be a square matrix. Viewed this way, idempotent matrices are idempotent elements of matrix rings. Example Examples of idempotent matrices are: Examples of idempotent matrices are: Real 2 × 2 case If a matrix is idempotent, then implying so or implying so or Thus, a necessary condition for a matrix to be idempotent is that either it is diagonal or its trace equals 1. For idempotent diagonal matrices, and must be either 1 or 0. If , the matrix will be idempotent provided so a satisfies the quadratic equation or which is a circle with center (1/2, 0) and radius 1/2. In terms of an angle θ, is idempotent. However, is not a necessary condition: any matrix with is idempotent. Properties Singularity and regularity The only non-singular idempotent matrix is the identity matrix; that is, if a non-identity matrix is idempotent, its number of independent rows (and columns) is less than its number of rows (and columns). This can be seen from writing , assuming that has full rank (is non-singular), and pre-multiplying by to obtain . When an idempotent matrix is subtracted from the identity matrix, the result is also idempotent. This holds since If a matrix is idempotent then for all positive integers n, . This can be shown using proof by induction. Clearly we have the result for , as . Suppose that . Then, , since is idempotent. Hence by the principle of induction, the result follows. Eigenvalues An idempotent matrix is always diagonalizable. Its eigenvalues are either 0 or 1: if is a non-zero eigenvector of some idempotent matrix and its associated eigenvalue, then which implies This further implies that the determinant of an idempotent matrix is always 0 or 1. As stated above, if the determinant is equal to one, the matrix is invertible and is therefore the identity matrix. Trace The trace of an idempotent matrix — the sum of the elements on its main diagonal — equals the rank of the matrix and thus is always an integer. This provides an easy way of computing the rank, or alternatively an easy way of determining the trace of a matrix whose elements are not specifically known (which is