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, aij=1a_{ij} = 1 when i=ji = j and aij=0a_{ij} = 0 when i≠ji \neq j.

The 3x3 identity:

I3=[100 010 001]I_3 = \begin{bmatrix} 1 & 0 & 0 \ 0 & 1 & 0 \ 0 & 0 & 1 \end{bmatrix}

Variable glossary. aija_{ij} is the entry in row ii, column jj. II (or InI_n for a specific size) denotes the identity matrix. The subscript nn in InI_n is the order, so I2I_2 is 2×22 \times 2 and I3I_3 is 3×33 \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 nn, all denoted II or, when the size matters, InI_n:

I2=[10 01],I3=[100 010 001]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×33 \times 3 matrix by the identity, you use I3I_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 II changes nothing:

AI=IA=AAI = IA = A

For ordinary numbers, 1 is the multiplicative identity: 5×1=55 \times 1 = 5. The matrix II plays the same role for matrices, and it is one of the few matrices that commutes with everything: AIAI and IAIA both give AA, 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×1×⋯×1=11 \times 1 \times \dots \times 1 = 1. So ∣I∣=1|I| = 1, which confirms the identity is always non-singular.

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

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

Examples of the Identity Matrix

Example 1

Which of these is an identity matrix? [10 01]\begin{bmatrix} 1 & 0 \ 0 & 1 \end{bmatrix} or [11 01]\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)(1,2).

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

Example 2

Show that AI=AAI = A for A=[25 34]A = \begin{bmatrix} 2 & 5 \ 3 & 4 \end{bmatrix} and I=[10 01]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 [2×15×0 3×04×1]=[20 04]\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 II does change AA.

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 AA against each column of II:

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

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

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

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

AI=[25 34]=AAI = \begin{bmatrix} 2 & 5 \ 3 & 4 \end{bmatrix} = A

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

Example 3

Write the 4×44 \times 4 identity matrix.

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

I4=[1000 0100 0010 0001]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, I4I_4.

Example 4

Find the determinant of I5I_5.

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

∣I5∣=1×1×1×1×1|I_5| = 1 \times 1 \times 1 \times 1 \times 1

∣I5∣=1|I_5| = 1

Final answer: ∣I5∣=1|I_5| = 1, and indeed ∣In∣=1|I_n| = 1 for every nn.

Example 5

The matrix [x0 0y]\begin{bmatrix} x & 0 \ 0 & y \end{bmatrix} is the 2×22 \times 2 identity. Find xx and yy.

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

x=1x = 1

y=1y = 1

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

Example 6

Confirm I−1=II^{-1} = I for I=[10 01]I = \begin{bmatrix} 1 & 0 \ 0 & 1 \end{bmatrix}.

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

[10 01][10 01]=[10 01]=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=III = I, the inverse of II is II itself.

Final answer: I−1=II^{-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=BAX = B by writing X=A−1BX = 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 II, the right side holds the solution. Reaching II 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 AA−1=IA 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=AAI = 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 II.

Don't do this: Call [30 03]\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×33 \times 3 matrix by I2I_2.

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

The correct way: Match the order: a 3×33 \times 3 matrix needs I3I_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 II or InI_n.

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

  • Its determinant is always 1, and it is its own inverse: I−1=II^{-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×22 \times 2 and 3×33 \times 3 identity matrices.

  2. Which is the identity? [10 11]\begin{bmatrix} 1 & 0 \ 1 & 1 \end{bmatrix} or [10 01]\begin{bmatrix} 1 & 0 \ 0 & 1 \end{bmatrix}?

  3. Find the determinant of I4I_4.

  4. The matrix [a0 0b]\begin{bmatrix} a & 0 \ 0 & b \end{bmatrix} is the 2×22 \times 2 identity. Find aa and bb.

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

Answer to Question 1: I2=[10 01]I_2 = \begin{bmatrix} 1 & 0 \ 0 & 1 \end{bmatrix} and I3=[100 010 001]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)(2,1), making it lower-triangular, not the identity.

Answer to Question 3: ∣I4∣=1×1×1×1=1|I_4| = 1 \times 1 \times 1 \times 1 = 1.

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

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

Quick Self-Check - Try These

Practice these to solidify your understanding: write I2I_2, I3I_3, and I4I_4 from memory, confirm AI=AAI = 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 →