Identity Matrix: Definition, Properties, and Examples (2026)

⚡ TL;DR: An identity matrix is a square matrix with 1s on the diagonal and 0s elsewhere; it acts as the multiplicative identity in linear algebra — multiplying any matrix by it leaves the matrix unchanged.

🔑 Key Takeaways

  • The identity matrix is the only matrix that leaves every compatible matrix unchanged under multiplication.
  • It is always square ($n \times n$), with 1s on the diagonal and 0s elsewhere.
  • Key properties of identity matrix: invertible, determinant = 1, symmetric, orthogonal, idempotent, and full rank.
  • Real-world uses range from 3D graphics to Ridge Regression in machine learning.

What Is an Identity Matrix?

Identity matrix (denoted $I$ or $I_n$) is a square matrix where every element on the main diagonal is 1 and every other element is 0. This simple pattern gives the matrix its unique property: it acts as the multiplicative identity. The identity matrix is the linear algebra equivalent of the number 1. For any matrix $A$ of compatible size, $A \cdot I_n = A$ and $I_m \cdot A = A$.

📖 Definition — Identity Matrix: A square matrix $I_n = [\delta_{ij}]$ where $\delta_{ij} = 1$ when $i=j$ and $\delta_{ij}=0$ when $i \neq j$. This is the Kronecker delta symbol.

In mathematical notation, the elements are defined with the Kronecker delta:

$$I_{ij} = \delta_{ij} = \begin{cases} 1 & \text{if } i = j \\ 0 & \text{if } i \neq j \end{cases}$$

Examples of Identity Matrix

Let’s look at concrete examples of identity matrix for different sizes. Notice the pattern: only the diagonal entries are 1.

2×2 identity matrix:

$$I_2 = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}$$

3×3 identity matrix:

$$I_3 = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}$$

4×4 identity matrix:

$$I_4 = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}$$

These examples of identity matrix show that the structure scales perfectly. As you add more dimensions, the diagonal just gets longer, but the rule stays identical. In machine learning, you might work with an identity matrix that has thousands of rows and columns — but the principle stays the same: ones on the diagonal, zeros everywhere else.

Geometric Interpretation: The “Do Nothing” Transformation

Every matrix represents a linear transformation — it can rotate, scale, or shear space. The identity matrix is special: it does nothing at all. Apply it to any vector and the vector stays exactly the same. In geometry, this means the standard basis vectors remain fixed.

For 3D space, the columns of $I_3$ are the unit vectors $\hat{i}=(1,0,0)$, $\hat{j}=(0,1,0)$, and $\hat{k}=(0,0,1)$. Multiplying by $I$ essentially asks: “What are the coordinates of the point after taking one step in each basis direction?” The answer is the original point. This ‘do nothing’ analogy makes the identity matrix the perfect starting point for any transformation chain.

🤔 Did you know? The identity matrix is the only matrix that is simultaneously symmetric, orthogonal, idempotent, and involutory ($I^{-1}=I$). No other matrix has all four properties together.

Key Properties of Identity Matrix

The properties of identity matrix make it an essential tool in linear algebra. Below are the most important ones, each with a practical consequence. Understanding these properties of identity matrix helps you master inverses, determinants, and eigenvalues.

PropertyMathematical StatementWhy It Matters
Multiplicative Identity$A \cdot I_n = I_m \cdot A = A$Allows matrix equations to be simplified, just like multiplying by 1.
Non-Singular$\det(I) = 1 \neq 0$Always invertible; fundamental for solving linear systems.
Self-Inverse$I^{-1} = I$Simplifies inversion algorithms; used in cryptography.
Orthogonal$I^T = I^{-1} = I$Preserves lengths and angles; important in computer graphics.
Idempotent$I^k = I$ for any $k \geq 1$Useful in stationary processes and Markov chains.
Full Rank$\text{rank}(I_n)=n$No dimension collapse; every row/column is linearly independent.
EigenvaluesAll eigenvalues equal 1No scaling along any direction; important in spectral analysis.
⭐ Important: The properties of identity matrix only hold if the matrix is square. A rectangular matrix with ones on the diagonal is not a true identity — it cannot act as a two-sided multiplicative identity.

Why the Determinant of Identity Matrix Is Always 1

The determinant measures how much a matrix scales the volume of space. Since the identity matrix does not stretch or shrink anything, the scaling factor is exactly 1. For a diagonal matrix, the determinant is the product of the diagonal entries — and all $n$ entries are 1.

$$\det(I_n) = \prod_{i=1}^n 1 = 1$$
💡 Pro tip: When computing the inverse of a matrix using Gauss-Jordan elimination, you augment the matrix with the identity matrix. Once the left side becomes $I$, the right side holds the inverse. This is a direct application of the identity property.

5 Practical Applications of Identity Matrix in ML and Beyond

The identity matrix appears in countless real-world algorithms. Here are five domains where it plays a critical role. Each example highlights why the properties of identity matrix are so valuable.

1. Ridge Regression (Machine Learning)

In linear algebra for machine learning, Ridge Regression adds a penalty term to prevent overfitting. The formula involves the identity matrix:

$$\hat{\beta} = (X^T X + \lambda I)^{-1} X^T y$$

Here, $\lambda I$ is added to $X^T X$ to ensure the matrix is invertible — even when $X^T X$ is singular. Without the identity matrix, many regression algorithms would fail. This is one of the most common uses of the identity matrix in modern data science.

2. Computer Graphics

In 3D rendering, every object starts with an identity matrix transformation matrix. Rotations, translations, and scaling are applied by multiplying the identity by other matrices. Resetting to the identity restores the object to its default orientation. The identity matrix is the anchor in every scene graph.

3. Solving Systems of Equations

The Gauss-Jordan elimination method aims to turn an augmented matrix into the identity matrix on the left side. When that happens, the right side contains the solution. This technique is fundamental in solving 3×3 systems. The identity matrix is the target shape.

4. Cryptography (Hill Cipher)

In classical cryptography, the encoding matrix must be invertible so that the receiver can decode the message. The condition for a valid key is $A \cdot A^{-1} = I$. If the product does not equal the identity matrix, the code cannot be decrypted.

5. Signal Processing and Residue Number Systems

The identity matrix also appears in error-correcting codes and residue number systems where it ensures reconstruction of signals. Knowing the properties of identity matrix helps engineers design robust systems.

⚠️ Avoid this common mistake: Many students assume a rectangular matrix can be an identity. Remember: only square matrices can be identity matrices. For example, a $2\times3$ matrix with ones on the diagonal is not an identity — it cannot multiply both sides of an equation.

Worked Example: Multiplying a Vector by the Identity Matrix

🧪 Worked example

Let matrix $A = \begin{bmatrix} 2 & 5 \\ -3 & 1 \end{bmatrix}$ and $I_2$ be the $2\times2$ identity matrix.

Compute $A \cdot I_2$:

$$ \begin{bmatrix} 2 & 5 \\ -3 & 1 \end{bmatrix} \cdot \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} = \begin{bmatrix} 2\cdot1 + 5\cdot0 & 2\cdot0 + 5\cdot1 \\ -3\cdot1 + 1\cdot0 & -3\cdot0 + 1\cdot1 \end{bmatrix} = \begin{bmatrix} 2 & 5 \\ -3 & 1 \end{bmatrix} $$

The result is exactly the original matrix $A$. This confirms the multiplicative identity property. Try the multiplication yourself: any matrix multiplied by the identity matrix stays unchanged. This is why the identity matrix is so essential.

Connecting Identity Matrix to Other Linear Algebra Concepts

The properties of identity matrix make it the perfect bridge to other topics. For example, the columns of $I_n$ are linearly independent vectors — each column cannot be written as a combination of the others. This is why the rank of $I_n$ equals $n$. The identity matrix is the gold standard for independence.

Also, the inverse of any matrix $A$ satisfies $A^{-1}A = I$. This relationship is the foundation for the complete guide to mastering the inverse of a matrix. Experienced practitioners know that the identity matrix is the first thing you check when verifying an inverse computation.

In practice, a mistake I often see is people trying to use the identity matrix with non-square matrices. Remember: the identity matrix must be square to act as a two-sided identity. If you ever see a rectangular identity-like matrix in a textbook, it’s usually a truncated form for convenience.

Ready to go further?

Practice using the identity matrix in Gauss-Jordan elimination and matrix multiplication.

Explore 3×3 Matrices →

Frequently Asked Questions

Can the identity matrix be rectangular?+

No. The true identity matrix must be square ($n \times n$) to act as a two-sided multiplicative identity. Rectangular matrices with ones on the diagonal are sometimes called “identity-like” but they don’t satisfy $A I = I A = A$ for all compatible $A$.

What happens if you multiply the identity matrix by itself?+

The identity matrix is idempotent: $I \times I = I$. Raising it to any positive power always yields $I$. This is because the transformation ‘do nothing’ repeated still does nothing.

Is the identity matrix the same as a unit matrix?+

Yes, the terms identity matrix and unit matrix are often used interchangeably. Both refer to the same square matrix with 1s on the diagonal and 0s elsewhere.

Why is the identity matrix important in machine learning?+

The identity matrix is central to Ridge Regression (regularization), matrix inversion, and solving linear systems. It helps ensure numerical stability when matrices are near-singular. Without it, many machine learning algorithms could not converge.

What is the inverse of the identity matrix?+

The inverse of the identity matrix is itself: $I^{-1} = I$. This makes it an involutory matrix. It also follows that $I$ is its own transpose, so it is orthogonal.

Scroll to Top