Matrix that, squared, equals itself
In linear algebra, an idempotent matrix is a matrix which, when multiplied by itself, yields itself.[1][2] 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:
![{\displaystyle {\begin{bmatrix}1&0\\0&1\end{bmatrix}}\qquad {\begin{bmatrix}3&-6\\1&-2\end{bmatrix}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/f544426373bac701d5f4562d51ea9c956cd9b3b0)
Examples of
idempotent matrices are:
![{\displaystyle {\begin{bmatrix}1&0&0\\0&1&0\\0&0&1\end{bmatrix}}\qquad {\begin{bmatrix}2&-2&-4\\-1&3&4\\1&-2&-3\end{bmatrix}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/bdce0cc6408ab47d8fb1269dda3b69ca8f690585)
Real 2 × 2 case
If a matrix
is idempotent, then
![{\displaystyle a=a^{2}+bc,}](https://wikimedia.org/api/rest_v1/media/math/render/svg/774fe54546f42fda83cf11109d8a652d20c83516)
implying
so
or ![{\displaystyle d=1-a,}](https://wikimedia.org/api/rest_v1/media/math/render/svg/6bd8063729fc507fcfab2fc098aa247d8c63108d)
implying
so
or ![{\displaystyle d=1-a,}](https://wikimedia.org/api/rest_v1/media/math/render/svg/6bd8063729fc507fcfab2fc098aa247d8c63108d)
![{\displaystyle d=bc+d^{2}.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/0c9fc97ba4da568a9c4a39f788b29114abe1199f)
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 ![{\displaystyle \left(a-{\frac {1}{2}}\right)^{2}+b^{2}={\frac {1}{4}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/cb50ce39b6eedefc2849822f0ce2b0833dbccba8)
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 A 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
![{\displaystyle (I-A)(I-A)=I-A-A+A^{2}=I-A-A+A=I-A.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/2d4dc64465b6300ecc685a9b86b53409b6d4c5a1)
If a matrix A 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 A is idempotent. Hence by the principle of induction, the result follows.
Eigenvalues
An idempotent matrix is always diagonalizable.[3] 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 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
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.
Any similar matrices of an idempotent matrix are also idempotent. Idempotency is conserved under a change of basis. This can be shown through multiplication of the transformed matrix
with
being idempotent:
.
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) ei: in matrix form,
- Minimize
![{\displaystyle (y-X\beta )^{\textsf {T}}(y-X\beta )}](https://wikimedia.org/api/rest_v1/media/math/render/svg/37361323735b9a2b07a1d7dd2a74a9f6e379383b)
where
is a vector of dependent variable observations, and
is a matrix each of whose columns is a column of observations on one of the independent variables. The resulting estimator is
![{\displaystyle {\hat {\beta }}=\left(X^{\textsf {T}}X\right)^{-1}X^{\textsf {T}}y}](https://wikimedia.org/api/rest_v1/media/math/render/svg/ea8e008364a06c9df96c840c25355ab2e2043d26)
where superscript T indicates a transpose, and the vector of residuals is[2]
![{\displaystyle {\hat {e}}=y-X{\hat {\beta }}=y-X\left(X^{\textsf {T}}X\right)^{-1}X^{\textsf {T}}y=\left[I-X\left(X^{\textsf {T}}X\right)^{-1}X^{\textsf {T}}\right]y=My.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/bf722a63d43c6ac3c309e97279a2e284063253f5)
Here both
and
(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:
![{\displaystyle {\hat {e}}^{\textsf {T}}{\hat {e}}=(My)^{\textsf {T}}(My)=y^{\textsf {T}}M^{\textsf {T}}My=y^{\textsf {T}}MMy=y^{\textsf {T}}My.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/cce46b7da02a6054343c717fbfb77cd40d1ea3a6)
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 the range space
along its null space
.
is an orthogonal projection operator if and only if it is idempotent and symmetric.
See also
References