Idempotent matrix

In linear algebra, an idempotent matrix is a matrix which, when multiplied by itself, yields itself. That is, the matrix formula_1 is idempotent if and only if formula_2. For this product formula_3 to be defined, formula_1 must necessarily be a square matrix. Viewed this way, idempotent matrices are idempotent elements of matrix rings.
Example.
Examples of formula_5 idempotent matrices are:
formula_6
Examples of formula_7 idempotent matrices are:
formula_8
Real 2 × 2 case.
If a matrix formula_9 is idempotent, then
Thus a necessary condition for a 2 × 2 matrix to be idempotent is that either it is diagonal or its trace equals 1.
Notice that, for idempotent diagonal matrices, formula_20 and formula_21 must be either 1 or 0.
If formula_22, the matrix formula_23 will be idempotent provided formula_24 so "a" satisfies the quadratic equation
which is a circle with center (1/2, 0) and radius 1/2. In terms of an angle θ,
However, formula_22 is not a necessary condition: any matrix
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 formula_2, assuming that has full rank (is non-singular), and pre-multiplying by formula_32 to obtain formula_33.
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, formula_35. This can be shown using proof by induction. Clearly we have the result for formula_36, as formula_37. Suppose that formula_38. Then, formula_39, since is idempotent. Hence by the principle of induction, the result follows.
Eigenvalues.
An idempotent matrix is always diagonalizable and its eigenvalues are either 0 or 1.
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 helpful in statistics, for example, in establishing the degree of bias in using a sample variance as an estimate of a population variance).
Relationships between idempotent matrices.
In regression analysis, the matrix formula_40 is known to produce the residuals formula_41 from the regression of the vector of dependent variables formula_42 on the matrix of covariates formula_43. (See the section on Applications.) Now, let formula_44 be a matrix formed from a subset of the columns of formula_43, and let formula_46. It is easy to show that both formula_47 and formula_48 are idempotent, but a somewhat surprising fact is that formula_49. This is because formula_50, or in other words, the residuals from the regression of the columns of formula_44 on formula_43 are 0 since formula_44 can be perfectly interpolated as it is a subset of formula_43 (by direct substitution it is also straightforward to show that formula_55). This leads to two other important results: one is that formula_56 is symmetric and idempotent, and the other is that formula_57, i.e., formula_56 is orthogonal to formula_47. These results play a key role, for example, in the derivation of the F test.
Applications.
Idempotent matrices arise frequently in regression analysis and econometrics. For example, in ordinary least squares, the regression problem is to choose a vector of coefficient estimates so as to minimize the sum of squared residuals (mispredictions) "e""i": in matrix form,
where formula_42 is a vector of dependent variable observations, and formula_43 is a matrix each of whose columns is a column of observations on one of the independent variables. The resulting estimator is
where superscript "T" indicates a transpose, and the vector of residuals is
Here both formula_47 and formula_66(the latter being known as the hat matrix) are idempotent and symmetric matrices, a fact which allows simplification when the sum of squared residuals is computed:
The idempotency of formula_47 plays a role in other calculations as well, such as in determining the variance of the estimator formula_69.
An idempotent linear operator formula_70 is a projection operator on the range space along its null space . formula_70 is an orthogonal projection operator if and only if it is idempotent and symmetric.