Inlinear algebra, anidempotent matrix is amatrix which, when multiplied by itself, yields itself.[1][2] That is, the matrix is idempotent if and only if. For this product to bedefined, must necessarily be asquare matrix. Viewed this way, idempotent matrices areidempotent elements ofmatrix rings.
Examples of idempotent matrices are:
Examples of idempotent matrices are:
If a matrix is idempotent, then
Thus, a necessary condition for a matrix to be idempotent is that either it isdiagonal or itstrace equals 1.For idempotent diagonal matrices, and must be either 1 or 0.
If, the matrix will be idempotent provided soa satisfies thequadratic equation
which is acircle with center (1/2, 0) and radius 1/2. In terms of an angle θ,
However, is not a necessary condition: any matrix
The only non-singular idempotent matrix is theidentity 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 thatA 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 matrixA 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,, sinceA is idempotent. Hence by the principle of induction, the result follows.
An idempotent matrix is alwaysdiagonalizable.[3] Itseigenvalues 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 thedeterminant of an idempotent matrix is always 0 or 1. As stated above, if the determinant is equal to one, the matrix isinvertible and is therefore theidentity matrix.
Thetrace of an idempotent matrix—the sum of the elements on its main diagonal—equals therank 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 helpful instatistics, for example, in establishing the degree ofbias in using asample variance as an estimate of apopulation variance).
In regression analysis, the matrix is known to produce the residuals from the regression of the vector of dependent variables on the matrix of covariates. (See the section on Applications.) Now, let be a matrix formed from a subset of the columns of, and let. It is easy to show that both and are idempotent, but a somewhat surprising fact is that. This is because, or in other words, the residuals from the regression of the columns of on are 0 since can be perfectly interpolated as it is a subset of (by direct substitution it is also straightforward to show that). This leads to two other important results: one is that is symmetric and idempotent, and the other is that, i.e., is orthogonal to. These results play a key role, for example, in the derivation of the F test.
Anysimilar matrices of an idempotent matrix are also idempotent. Idempotency is conserved under achange of basis. This can be shown through multiplication of the transformed matrix with being idempotent:.
Idempotent matrices arise frequently inregression analysis andeconometrics. For example, inordinary least squares, the regression problem is to choose a vectorβ of coefficient estimates so as to minimize the sum of squared residuals (mispredictions)ei: in matrix form,
where is a vector ofdependent variable observations, and is a matrix each of whose columns is a column of observations on one of theindependent variables. The resulting estimator is
where superscriptT indicates atranspose, and the vector of residuals is[2]
Here both and(the latter being known as thehat matrix) are idempotent and symmetric matrices, a fact which allows simplification when the sum of squared residuals is computed:
The idempotency of plays a role in other calculations as well, such as in determining the variance of the estimator.
An idempotent linear operator is a projection operator on therange space along itsnull space. is anorthogonal projection operator if and only if it is idempotent andsymmetric.