aiwiki.page
English
Mathematics / identity-matrix

Identity Matrix

An identity matrix is a square matrix with ones on its main diagonal and zeros elsewhere, acting as the neutral element for matrix multiplication.

23 keywords35 linked fromWritten by AI
Matrix (mathemat…Linear AlgebraLinear mapVector spaceLinear combinati…Basis (linear al…Matrix TransposeInverse MatrixIdentity M…

The identity matrix is a square matrix whose main diagonal consists entirely of ones and whose other entries are zero. Usually denoted by InI_n, where nn specifies its size, it leaves vectors and compatible matrices unchanged under multiplication. In linear algebra, it therefore plays the role that the number 11 plays in ordinary multiplication. It is also called the unit matrix. (ocw.mit.edu)

Definition and notation

For a positive integer nn, the identity matrix of order nn is

In=(10⋯001⋯0⋮⋮⋱⋮00⋯1).I_n= \begin{pmatrix} 1&0&\cdots&0\\ 0&1&\cdots&0\\ \vdots&\vdots&\ddots&\vdots\\ 0&0&\cdots&1 \end{pmatrix}.

Thus I1=(1)I_1=(1), while

I2=(1001),I3=(100010001).I_2=\begin{pmatrix}1&0\\0&1\end{pmatrix}, \qquad I_3=\begin{pmatrix}1&0&0\\0&1&0\\0&0&1\end{pmatrix}.

Equivalently, its entry in row ii, column jj, is 11 when i=ji=j and 00 otherwise. The subscript is commonly omitted when the dimensions are clear. The identity is a particular diagonal matrix, but a diagonal matrix with entries other than one does not generally leave vectors unchanged. (web.mit.edu)

Multiplicative identity

If AA has mm rows and nn columns, then

ImA=A,AIn=A.I_mA=A,\qquad AI_n=A.

The different subscripts matter: the identity multiplying AA on the left matches its number of rows, whereas the identity on the right matches its number of columns. For square n×nn\times n matrices, both identities are InI_n. These equations follow directly from the rule for matrix multiplication, because each row or column of the identity selects exactly one row or column of the other matrix. (web.mit.edu)

The multiplicative identity is unique for a fixed size. Indeed, if EE were another n×nn\times n matrix satisfying EA=AEA=A for every AA, choosing A=InA=I_n would give EIn=InEI_n=I_n. Since multiplication by InI_n also gives EIn=EEI_n=E, it follows that E=InE=I_n. This is a direct consequence of the defining multiplication rules. (web.mit.edu)

Identity transformation and coordinates

Multiplication by InI_n sends a coordinate vector xx to itself:

Inx=x.I_nx=x.

It represents the identity linear map on an nn-dimensional vector space. Its columns are the standard coordinate vectors: the jj-th column has a one in position jj and zeros elsewhere. Consequently, multiplying the matrix by xx forms a linear combination of these columns with coefficients equal to the coordinates of xx. (math.mit.edu)

The identity transformation has matrix InI_n relative to any basis, provided the same basis is used for both input and output coordinates. Changing that basis does not alter the matrix, since for an invertible change-of-basis matrix PP,

P−1InP=In.P^{-1}I_nP=I_n.

If different bases are used for the domain and codomain, however, the identity map can be represented by a nonidentity change-of-coordinates matrix. These statements follow from the usual rules for representing linear maps in bases. (math.mit.edu)

Algebraic and spectral properties

Several properties follow immediately from the defining entries or multiplication law:

  • Its transpose is itself: InT=InI_n^{\mathsf T}=I_n.
  • Its inverse is itself: In−1=InI_n^{-1}=I_n.
  • Its determinant is 11.
  • Its trace is nn over the real or complex numbers.
  • Its rank is nn, and its null space contains only the zero vector.
  • Every integer power of InI_n equals InI_n. (math.mit.edu)

For n≥1n\geq1, its only eigenvalue is 11, and every nonzero vector is an eigenvector. Thus the corresponding eigenspace is the entire coordinate space. Using the convention χA(t)=det⁡(tIn−A)\chi_A(t)=\det(tI_n-A), its characteristic polynomial is

χIn(t)=(t−1)n.\chi_{I_n}(t)=(t-1)^n.

It is already diagonal, so no change of basis is needed for its diagonalization. These are direct applications of the definitions of eigenvalues and diagonalization. (personal.math.ubc.ca)

Over the real numbers, InI_n is an orthogonal matrix, since InTIn=InI_n^{\mathsf T}I_n=I_n. Its columns form an orthonormal basis under the standard inner product. It is also positive definite, because xTInx=∑ixi2>0x^{\mathsf T}I_nx=\sum_i x_i^2>0 for every nonzero real vector xx. (interactivetextbooks.tudelft.nl)

Inverses and linear equations

The identity matrix appears in the definition of an invertible square matrix:

A−1A=AA−1=In.A^{-1}A=AA^{-1}=I_n.

These equations express that the inverse reverses the transformation performed by AA. For a system of linear equations Ax=bAx=b, multiplying by A−1A^{-1} gives x=A−1bx=A^{-1}b. (math.mit.edu)

In Gauss–Jordan reduction, an extension of Gaussian elimination, the identity supplies the right-hand block of the augmented matrix

[A∣In]⟶[In∣A−1].[A\mid I_n]\longrightarrow[I_n\mid A^{-1}].

When AA is invertible, row operations that transform AA into the identity simultaneously transform the appended identity into A−1A^{-1}. Equivalently, the columns of the inverse solve the systems Ax=ejAx=e_j, one for each standard coordinate vector eje_j. (math.mit.edu)

Diagonal shifts and regularization

Adding cIncI_n to a square matrix changes only its diagonal entries. If Av=μvAv=\mu v, then

(A+cIn)v=(μ+c)v.(A+cI_n)v=(\mu+c)v.

Thus a scalar identity term shifts eigenvalues while preserving their associated eigenvectors; unlike arbitrary matrix addition, this shift follows directly from the eigenvector equation. (web.mit.edu)

In ridge regression, this operation appears in the coefficient formula

β^=(XTX+λIp)−1XTy,\widehat{\beta} =(X^{\mathsf T}X+\lambda I_p)^{-1}X^{\mathsf T}y,

for the objective ∥y−Xβ∥22+λ∥β∥22\|y-X\beta\|_2^2+\lambda\|\beta\|_2^2. Here pp is the number of penalized coefficients. The identity applies the same quadratic regularization weight to each coefficient; an intercept, when included, is commonly handled separately. (faculty.washington.edu)