Identity Matrix - Definition, Properties, Examples

#Algebra
TL;DR
An identity matrix is a square matrix with 1s along its main diagonal and 0s everywhere else, written I or I_n; multiplying any matrix by it leaves that matrix unchanged. This article covers the definition, the notation, why it acts like the number 1, its determinant and inverse, and six worked examples.
BT
Bhanzu TeamLast updated on June 27, 20269 min read

What Is an Identity Matrix?

An identity matrix is a square matrix whose main-diagonal entries are all 1 and whose every other entry is 0. It is also called the unit matrix. In symbols, $a_{ij} = 1$ when $i = j$ and $a_{ij} = 0$ when $i \neq j$.

The 3x3 identity:

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

Variable glossary. $a_{ij}$ is the entry in row $i$, column $j$. $I$ (or $I_n$ for a specific size) denotes the identity matrix. The subscript $n$ in $I_n$ is the order, so $I_2$ is $2 \times 2$ and $I_3$ is $3 \times 3$. Because it has nonzeros only on the diagonal, the identity is a special diagonal matrix.

How Is the Identity Matrix Written?

There is one identity matrix for each size $n$, all denoted $I$ or, when the size matters, $I_n$:

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

The size is fixed by context: when you multiply a $3 \times 3$ matrix by the identity, you use $I_3$, because the orders have to be compatible for multiplication of matrices to work.

Why Does the Identity Matrix Act Like the Number 1?

The defining property is that multiplying by $I$ changes nothing:

$$AI = IA = A$$

For ordinary numbers, 1 is the multiplicative identity: $5 \times 1 = 5$. The matrix $I$ plays the same role for matrices, and it is one of the few matrices that commutes with everything: $AI$ and $IA$ both give $A$, even though matrix multiplication usually depends on order.

Two more properties follow directly:

  • Its determinant is 1. The determinant of a diagonal matrix is the product of the diagonal entries, and $1 \times 1 \times \dots \times 1 = 1$. So $|I| = 1$, which confirms the identity is always non-singular.

  • It is its own inverse. Since $II = I$, the inverse of the identity is the identity: $I^{-1} = I$. Any power works the same way, so $I^n = I$.

The identity is also the destination of inversion: a matrix $A$ times its inverse returns the identity, $AA^{-1} = I$. That equation is the definition of "inverse."

Examples of the Identity Matrix

Example 1

Which of these is an identity matrix? $\begin{bmatrix} 1 & 0 \ 0 & 1 \end{bmatrix}$ or $\begin{bmatrix} 1 & 1 \ 0 & 1 \end{bmatrix}$?

Check the off-diagonal entries. The first has 0s off the diagonal and 1s on it. The second has a stray 1 at position $(1,2)$.

Final answer: Only the first is an identity matrix. The second is upper-triangular, not the identity.

Example 2

Show that $AI = A$ for $A = \begin{bmatrix} 2 & 5 \ 3 & 4 \end{bmatrix}$ and $I = \begin{bmatrix} 1 & 0 \ 0 & 1 \end{bmatrix}$.

This is the wrong-path-first example.

Wrong attempt. A student "multiplies" by multiplying entry against entry, getting $\begin{bmatrix} 2 \times 1 & 5 \times 0 \ 3 \times 0 & 4 \times 1 \end{bmatrix} = \begin{bmatrix} 2 & 0 \ 0 & 4 \end{bmatrix}$, and concludes $I$ does change $A$.

Why it is wrong. Matrix multiplication is row-by-column, not entry-by-entry. The entry-wise shortcut is a different operation (the Hadamard product) and does not give the true product.

Correct. Multiply each row of $A$ against each column of $I$:

Top-left: $(2)(1) + (5)(0) = 2$

Top-right: $(2)(0) + (5)(1) = 5$

Bottom-left: $(3)(1) + (4)(0) = 3$

Bottom-right: $(3)(0) + (4)(1) = 4$

$$AI = \begin{bmatrix} 2 & 5 \ 3 & 4 \end{bmatrix} = A$$

Final answer: $AI = A$, exactly as the identity property promises.

Example 3

Write the $4 \times 4$ identity matrix.

Place 1s on the main diagonal, 0s everywhere else:

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

Final answer: The matrix above, $I_4$.

Example 4

Find the determinant of $I_5$.

The identity is diagonal, so its determinant is the product of the diagonal entries:

$|I_5| = 1 \times 1 \times 1 \times 1 \times 1$

$|I_5| = 1$

Final answer: $|I_5| = 1$, and indeed $|I_n| = 1$ for every $n$.

Example 5

The matrix $\begin{bmatrix} x & 0 \ 0 & y \end{bmatrix}$ is the $2 \times 2$ identity. Find $x$ and $y$.

For the identity, the diagonal entries must both equal 1:

$x = 1$

$y = 1$

Final answer: $x = 1$ and $y = 1$.

Example 6

Confirm $I^{-1} = I$ for $I = \begin{bmatrix} 1 & 0 \ 0 & 1 \end{bmatrix}$.

A matrix times its inverse gives the identity. Test $I \times I$:

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

Since $II = I$, the inverse of $I$ is $I$ itself.

Final answer: $I^{-1} = I$.

Why the Identity Matrix Matters: "The fixed point of all transformations"

The identity matrix exists because matrix multiplication needed a "do nothing" element to make the algebra complete. Without it, you cannot define inverses, and without inverses you cannot solve $AX = B$ by writing $X = A^{-1}B$. The identity is the anchor the whole solving machinery hangs on.

Where it shows up beyond the textbook:

  • Solving equations. Gaussian elimination drives a matrix toward the identity; the moment the left side becomes $I$, the right side holds the solution. Reaching $I$ is the goal.

  • Computer graphics. A transformation that leaves an object exactly where it is, with no rotation and no scaling, is the identity matrix. Graphics pipelines reset to the identity before applying new transforms.

  • The basis of inverses. Every invertible matrix is defined by the fact that $A A^{-1} = I$. The identity is the target that defines what an inverse even means.

A reasoning-first method matters here because students who memorize "$AI = A$" often cannot say why, and then they stumble when asked to find the matrix that returns the identity. At Bhanzu, trainers teach the identity through its job (the matrix that changes nothing) before its appearance (1s and 0s), so the rule has a reason behind it.

Why Students Get the Identity Matrix Wrong (and the Fix)

Mistake 1: Putting 1s everywhere instead of only the diagonal

Where it slips in: Writing the identity from memory.

Don't do this: Fill the whole matrix, or the first row, with 1s.

The correct way: Exactly one 1 per row, sitting on the main diagonal, and 0s everywhere else. The first instinct for someone picturing "the matrix of 1s" is to fill it solidly, but a matrix of all 1s does not leave other matrices unchanged. Tie the 1s to the diagonal positions specifically.

Mistake 2: Assuming any diagonal matrix is the identity

Where it slips in: Seeing a clean diagonal matrix and naming it $I$.

Don't do this: Call $\begin{bmatrix} 3 & 0 \ 0 & 3 \end{bmatrix}$ the identity.

The correct way: The diagonal entries must all be exactly 1. The matrix above is a scalar matrix; only when the diagonal value is 1 does it become the identity. The memorizer who recalls "identity is diagonal" misses the second half of the rule: the diagonal value, not just the shape, defines it.

Mistake 3: Forgetting the identity must match the order for multiplication

Where it slips in: Multiplying a $3 \times 3$ matrix by $I_2$.

Don't do this: Use a $2 \times 2$ identity on a $3 \times 3$ matrix.

The correct way: Match the order: a $3 \times 3$ matrix needs $I_3$. The identity is not one fixed grid; it is a family, one per size, and the order has to line up for the product to exist.

Key Takeaways

  • An identity matrix is a square matrix with 1s on the main diagonal and 0s elsewhere, written $I$ or $I_n$.

  • Multiplying any matrix by the identity leaves it unchanged: $AI = IA = A$, mirroring the role of 1 in ordinary multiplication.

  • Its determinant is always 1, and it is its own inverse: $I^{-1} = I$.

  • The identity is a special diagonal and scalar matrix, with one identity matrix for each order.

  • Reaching the identity is the goal of inversion and elimination, since it defines what an inverse is.

Practice Questions on the Identity Matrix

Try each one, then check the answers below.

  1. Write the $2 \times 2$ and $3 \times 3$ identity matrices.

  2. Which is the identity? $\begin{bmatrix} 1 & 0 \ 1 & 1 \end{bmatrix}$ or $\begin{bmatrix} 1 & 0 \ 0 & 1 \end{bmatrix}$?

  3. Find the determinant of $I_4$.

  4. The matrix $\begin{bmatrix} a & 0 \ 0 & b \end{bmatrix}$ is the $2 \times 2$ identity. Find $a$ and $b$.

  5. What is $I^{-1}$ for any identity matrix $I$?

Answer to Question 1: $I_2 = \begin{bmatrix} 1 & 0 \ 0 & 1 \end{bmatrix}$ and $I_3 = \begin{bmatrix} 1 & 0 & 0 \ 0 & 1 & 0 \ 0 & 0 & 1 \end{bmatrix}$.

Answer to Question 2: The second. The first has a stray 1 at position $(2,1)$, making it lower-triangular, not the identity.

Answer to Question 3: $|I_4| = 1 \times 1 \times 1 \times 1 = 1$.

Answer to Question 4: $a = 1$ and $b = 1$.

Answer to Question 5: $I^{-1} = I$; the identity is its own inverse.

Quick Self-Check - Try These

Practice these to solidify your understanding: write $I_2$, $I_3$, and $I_4$ from memory, confirm $AI = A$ for a 2x2 matrix of your choice, and find the determinant of each identity (all should be 1). If you ever fill in more than one 1 per row, come back to the definition and re-anchor on "1s on the diagonal only."

Want a live Bhanzu trainer to walk through more identity matrix problems? Book a free demo class.

Was this article helpful?

Your feedback helps us write better content

✍️ Written By
BT
Bhanzu Team
Content Creator and Editor
Bhanzu’s editorial team, known as Team Bhanzu, is made up of experienced educators, curriculum experts, content strategists, and fact-checkers dedicated to making math simple and engaging for learners worldwide. Every article and resource is carefully researched, thoughtfully structured, and rigorously reviewed to ensure accuracy, clarity, and real-world relevance. We understand that building strong math foundations can raise questions for students and parents alike. That’s why Team Bhanzu focuses on delivering practical insights, concept-driven explanations, and trustworthy guidance-empowering learners to develop confidence, speed, and a lifelong love for mathematics.
Related Articles
Book a FREE Demo ClassBook Now →