{
  "id": "identity-matrix",
  "title": "Identity Matrix",
  "lang": "en",
  "source_lang": "en",
  "summary": "An identity matrix is a square matrix with ones on its main diagonal and zeros elsewhere, acting as the neutral element for matrix multiplication.",
  "category": "mathematics",
  "subcategory": "algebra",
  "type": "concept",
  "aliases": [
    "Unit matrix"
  ],
  "generated_at": "2026-10-04",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/identity-matrix/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/identity-matrix/",
      "json": "https://aiwiki.page/zh/identity-matrix.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "The identity matrix is a square matrix whose main diagonal consists entirely of ones and whose other entries are zero. Usually denoted by \\(I_n\\), where \\(n\\) specifies its size, it leaves vectors and compatible matrices unchanged under multiplication. In linear algebra, it therefore plays the role that the number \\(1\\) plays in ordinary multiplication. It is also called the unit matrix. (ocw.mit.edu)"
    },
    {
      "heading": "Definition and notation",
      "text": "For a positive integer \\(n\\), the identity matrix of order \\(n\\) is\n\n\\[I_n= \\begin{pmatrix} 1&0&\\cdots&0\\\\ 0&1&\\cdots&0\\\\ \\vdots&\\vdots&\\ddots&\\vdots\\\\ 0&0&\\cdots&1 \\end{pmatrix}.\\]\n\nThus \\(I_1=(1)\\), while\n\n\\[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}.\\]\n\nEquivalently, its entry in row \\(i\\), column \\(j\\), is \\(1\\) when \\(i=j\\) and \\(0\\) 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)"
    },
    {
      "heading": "Multiplicative identity",
      "text": "If \\(A\\) has \\(m\\) rows and \\(n\\) columns, then\n\n\\[I_mA=A,\\qquad AI_n=A.\\]\n\nThe different subscripts matter: the identity multiplying \\(A\\) on the left matches its number of rows, whereas the identity on the right matches its number of columns. For square \\(n\\times n\\) matrices, both identities are \\(I_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)\n\nThe multiplicative identity is unique for a fixed size. Indeed, if \\(E\\) were another \\(n\\times n\\) matrix satisfying \\(EA=A\\) for every \\(A\\), choosing \\(A=I_n\\) would give \\(EI_n=I_n\\). Since multiplication by \\(I_n\\) also gives \\(EI_n=E\\), it follows that \\(E=I_n\\). This is a direct consequence of the defining multiplication rules. (web.mit.edu)"
    },
    {
      "heading": "Identity transformation and coordinates",
      "text": "Multiplication by \\(I_n\\) sends a coordinate vector \\(x\\) to itself:\n\n\\[I_nx=x.\\]\n\nIt represents the identity linear map on an \\(n\\)-dimensional vector space. Its columns are the standard coordinate vectors: the \\(j\\)-th column has a one in position \\(j\\) and zeros elsewhere. Consequently, multiplying the matrix by \\(x\\) forms a linear combination of these columns with coefficients equal to the coordinates of \\(x\\). (math.mit.edu)\n\nThe identity transformation has matrix \\(I_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 \\(P\\),\n\n\\[P^{-1}I_nP=I_n.\\]\n\nIf 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)"
    },
    {
      "heading": "Algebraic and spectral properties",
      "text": "Several properties follow immediately from the defining entries or multiplication law:\n\n- Its transpose is itself: \\(I_n^{\\mathsf T}=I_n\\).\n- Its inverse is itself: \\(I_n^{-1}=I_n\\).\n- Its determinant is \\(1\\).\n- Its trace is \\(n\\) over the real or complex numbers.\n- Its rank is \\(n\\), and its null space contains only the zero vector.\n- Every integer power of \\(I_n\\) equals \\(I_n\\). (math.mit.edu)\n\nFor \\(n\\geq1\\), its only eigenvalue is \\(1\\), and every nonzero vector is an eigenvector. Thus the corresponding eigenspace is the entire coordinate space. Using the convention \\(\\chi_A(t)=\\det(tI_n-A)\\), its characteristic polynomial is\n\n\\[\\chi_{I_n}(t)=(t-1)^n.\\]\n\nIt 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)\n\nOver the real numbers, \\(I_n\\) is an orthogonal matrix, since \\(I_n^{\\mathsf T}I_n=I_n\\). Its columns form an orthonormal basis under the standard inner product. It is also positive definite, because \\(x^{\\mathsf T}I_nx=\\sum_i x_i^2>0\\) for every nonzero real vector \\(x\\). (interactivetextbooks.tudelft.nl)"
    },
    {
      "heading": "Inverses and linear equations",
      "text": "The identity matrix appears in the definition of an invertible square matrix:\n\n\\[A^{-1}A=AA^{-1}=I_n.\\]\n\nThese equations express that the inverse reverses the transformation performed by \\(A\\). For a system of linear equations \\(Ax=b\\), multiplying by \\(A^{-1}\\) gives \\(x=A^{-1}b\\). (math.mit.edu)\n\nIn Gauss–Jordan reduction, an extension of Gaussian elimination, the identity supplies the right-hand block of the augmented matrix\n\n\\[[A\\mid I_n]\\longrightarrow[I_n\\mid A^{-1}].\\]\n\nWhen \\(A\\) is invertible, row operations that transform \\(A\\) into the identity simultaneously transform the appended identity into \\(A^{-1}\\). Equivalently, the columns of the inverse solve the systems \\(Ax=e_j\\), one for each standard coordinate vector \\(e_j\\). (math.mit.edu)"
    },
    {
      "heading": "Diagonal shifts and regularization",
      "text": "Adding \\(cI_n\\) to a square matrix changes only its diagonal entries. If \\(Av=\\mu v\\), then\n\n\\[(A+cI_n)v=(\\mu+c)v.\\]\n\nThus 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)\n\nIn ridge regression, this operation appears in the coefficient formula\n\n\\[\\widehat{\\beta} =(X^{\\mathsf T}X+\\lambda I_p)^{-1}X^{\\mathsf T}y,\\]\n\nfor the objective \\(\\|y-X\\beta\\|_2^2+\\lambda\\|\\beta\\|_2^2\\). Here \\(p\\) 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)"
    }
  ],
  "links": [
    "matrix",
    "linear-algebra",
    "linear-map",
    "vector-space",
    "linear-combination",
    "basis-linear-algebra",
    "matrix-transpose",
    "inverse-matrix",
    "determinant",
    "matrix-trace",
    "matrix-rank",
    "null-space",
    "eigenvalues-and-eigenvectors",
    "eigenspace",
    "characteristic-polynomial",
    "matrix-diagonalization",
    "orthogonal-matrix",
    "orthonormal-basis",
    "inner-product",
    "system-of-linear-equations",
    "gaussian-elimination",
    "ridge-regression",
    "regularization"
  ],
  "sources": [
    {
      "title": "ocw.mit.edu/ans7870/18/18.013a/textbook/HTML/chapter04/section04.html",
      "url": "https://www.ocw.mit.edu/ans7870/18/18.013a/textbook/HTML/chapter04/section04.html"
    },
    {
      "title": "web.mit.edu/~linalg/webpage/Fall19/Lecture%20notes.pdf",
      "url": "https://web.mit.edu/~linalg/webpage/Fall19/Lecture%20notes.pdf"
    },
    {
      "title": "math.mit.edu/~jorloff/suppnotes/suppnotes02/m.pdf",
      "url": "https://math.mit.edu/~jorloff/suppnotes/suppnotes02/m.pdf"
    },
    {
      "title": "personal.math.ubc.ca/~tbjw/ila/ila.pdf",
      "url": "https://personal.math.ubc.ca/~tbjw/ila/ila.pdf"
    },
    {
      "title": "interactivetextbooks.tudelft.nl/linear-algebra/Chapter7/OrthoBase.html",
      "url": "https://interactivetextbooks.tudelft.nl/linear-algebra/Chapter7/OrthoBase.html"
    },
    {
      "title": "math.mit.edu/~gs/linearalgebra/ila5/linearalgebra5_2-5.pdf",
      "url": "https://math.mit.edu/~gs/linearalgebra/ila5/linearalgebra5_2-5.pdf"
    },
    {
      "title": "faculty.washington.edu/yenchic/25A_stat535/Lec4_Linearreg.html",
      "url": "https://faculty.washington.edu/yenchic/25A_stat535/Lec4_Linearreg.html"
    }
  ],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}