All articles
9 min read

Diagonalization of a Matrix: A Six-Step Check for CSIR NET and GATE

Diagonalization of a matrix works when an n×n matrix has n independent eigenvectors. Check symmetry, distinct eigenvalues or the minimal polynomial first, then compare multiplicities of repeated eigenvalues over the stated field.

By Sunil Bansal, Founder · Updated 4 Nov 2026

A student studies at a desk by a window, working through a problem in a gridded notebook.

Key takeaways

  • A square matrix is diagonalizable exactly when it has n linearly independent eigenvectors, where n is its size, and all its eigenvalues lie in the field (number system) the question names, ℝ or ℂ.
  • A repeated eigenvalue is not a failure. The test is whether each eigenvalue's eigenspace is as large as its repeat count.
  • In our count of 2×2 and 3×3 integer matrices, a repeated eigenvalue still allowed diagonalization in 2.8% to 25.0% of cases, depending on the family.
  • Run the six-step order below before computing any eigenvector. Steps 1 to 5 need no eigenvectors, and step 6 is needed only when an eigenvalue repeats and no earlier step has decided the question.
In this article
  1. 1What is diagonalization of a matrix, and when does it work?
  2. 2Which check should you run first to decide if a matrix is diagonalizable?
  3. 3Does a repeated eigenvalue mean a matrix is not diagonalizable?
  4. 4How often is a matrix diagonalizable? What our count shows
  5. 5How do you use diagonalization to find a matrix power such as A¹⁰?
  6. 6Which of four practice matrices are diagonalizable over ℝ or ℂ?
  7. 7Can you check diagonalizability exactly with Python?
  8. 8Which SBTech Math course covers diagonalization of a matrix?
  9. 9Frequently asked questions

A matrix with a repeated eigenvalue can still be diagonalized. A matrix whose eigenvalues are all different can still fail over the real numbers, if some of those eigenvalues are complex. Both cases catch aspirants in CSIR NET (Council of Scientific and Industrial Research National Eligibility Test, for research fellowships and lectureships) and GATE (Graduate Aptitude Test in Engineering) Mathematics, where the question is usually "which of these matrices is diagonalizable?" and one check decides it.

The textbook route is to find the eigenvalues, find the eigenvectors, build P and invert it. That route is correct but slow, and it hides the decision that matters: whether enough independent eigenvectors exist at all.

This page puts that check first. It gives a six-step order to run before any heavy arithmetic. It then counts how often 2×2 and 3×3 integer matrices are diagonalizable, over the real numbers (ℝ) and the complex numbers (ℂ). It ends with a worked power calculation, four practice matrices and a short script that tests any matrix exactly.

What is diagonalization of a matrix, and when does it work?

Diagonalization of a matrix means writing a square matrix A as A = PDP⁻¹, where D is a diagonal matrix and the columns of P are eigenvectors of A. It works exactly when A has n linearly independent eigenvectors. The diagonal entries of D are the matching eigenvalues, in the same order as the columns of P.

Five terms carry the whole topic:

Definition

Eigenvalue and eigenvector A number λ is an eigenvalue of A if Av = λv for some non-zero vector v. That v is an eigenvector.

Definition

Eigenspace The set of all vectors v with Av = λv for one eigenvalue λ, together with the zero vector.

Definition

Algebraic multiplicity (AM) The number of times λ appears as a root of det(A − λI) = 0.

Definition

Geometric multiplicity (GM) The dimension of the eigenspace of λ, which equals the nullity of A − λI (the number of free variables when you solve (A − λI)v = 0).

Definition

Defective eigenvalue An eigenvalue whose GM is smaller than its AM.

GM is always between 1 and AM. A matrix is diagonalizable over a field when every eigenvalue lies in that field and GM equals AM for every eigenvalue, which is the same as the eigenspace dimensions adding up to n (Wikipedia, Diagonalizable matrix; Statlect, Matrix diagonalization).

Both exams test this. The GATE 2027 Mathematics syllabus from IIT Madras lists "diagonalization", "minimal polynomial", "diagonalization by a unitary matrix" and "Jordan canonical form" under Linear Algebra. CSIR's syllabus for Parts B and C lists "canonical forms, diagonal forms, triangular forms, Jordan forms". Check the current exam notice for any change. For how to match a whole linear algebra course to your exam, see our linear algebra course guide.

Which check should you run first to decide if a matrix is diagonalizable?

Run step 1 first: read whether the question is over ℝ or ℂ. Then check symmetry, triangular form and distinct eigenvalues, and stop at the first step that decides. Steps 1 to 5 need no eigenvectors. Only step 6 needs a rank calculation, and only for eigenvalues that repeat.

StepCheckIf it passes
1Read the field. Does the question say over ℝ or over ℂ?Over ℝ, any non-real eigenvalue means the matrix is not diagonalizable. Over ℂ, continue.
2Is the matrix real symmetric, Hermitian (equal to its conjugate transpose) or normal (commutes with its conjugate transpose)?Real symmetric: diagonalizable over ℝ. Hermitian or normal: diagonalizable over ℂ by a unitary matrix (a matrix whose inverse is its conjugate transpose), not necessarily over ℝ (a rotation is an example). Stop.
3Is it triangular?The eigenvalues are the diagonal entries. Read them off and go to step 4.
4Are the n eigenvalues all different, and all in the field?Diagonalizable. This is sufficient but not necessary. Stop.
5Does a polynomial with distinct roots kill A, such as A² = A or A² = I? Or is A a non-zero nilpotent matrix (some power of A is zero)?If a distinct-root polynomial gives zero, the minimal polynomial divides it, so A is diagonalizable. A non-zero nilpotent matrix is never diagonalizable.
6For each repeated eigenvalue λ, compare nullity(A − λI) with AM.Equal for every repeated eigenvalue: diagonalizable. Any shortfall: not diagonalizable.

Step 5 is the shortcut that saves time in an exam. The minimal polynomial is the lowest-degree monic polynomial p with p(A) = 0, and A is diagonalizable exactly when it has no repeated roots. Our Cayley Hamilton theorem page covers how it relates to the characteristic polynomial.

Does a repeated eigenvalue mean a matrix is not diagonalizable?

No. A repeated eigenvalue only means the matrix needs step 6. It is not diagonalizable only if some eigenvalue has GM smaller than AM.

Take A = [[0, −9], [1, −6]]. Its characteristic polynomial is (x + 3)², so λ = −3 has AM 2. Then A + 3I = [[3, −9], [1, −3]] has rank 1, so the nullity is 1. GM is 1, smaller than 2, so A is not diagonalizable.

A common slip here is to take the rank of A itself instead of the rank of A − λI. A has determinant 9, so its rank is 2, which tells you nothing about the eigenspace.

Now take B = [[3, 0, 0], [0, 3, 1], [0, 0, 5]]. The eigenvalue 3 also repeats, with AM 2. But B − 3I = [[0, 0, 0], [0, 0, 1], [0, 0, 2]] has rank 1, so the nullity is 2. GM equals AM, so B is diagonalizable.

For a 2×2 matrix the answer is simpler: a repeated eigenvalue λ gives a diagonalizable matrix only if the matrix is λI. For 3×3 and larger, cases like B appear, and exam setters use them.

How often is a matrix diagonalizable? What our count shows

Among the 19,683 3×3 matrices with entries −1, 0 or 1, 31.6% are diagonalizable over ℝ and 79.4% over ℂ. Among the 14,641 2×2 matrices with entries −5 to 5, the figures are 68.4% and 97.4%. We worked this out ourselves in November 2026; the script below is the test we applied to each matrix.

Method. We took every matrix in three families: 2×2 with entries from −5 to 5 (14,641 matrices), 3×3 with entries 0 or 1 (512), and 3×3 with entries −1, 0 or 1 (19,683). We classified each one with exact integer arithmetic. A matrix is diagonalizable over ℂ when the squarefree part of its characteristic polynomial (the polynomial with repeated factors removed) evaluates to the zero matrix at A. It is diagonalizable over ℝ when, in addition, every root is real. We cross-checked the 512-matrix family with a floating-point eigenvalue and rank routine, and the counts matched (320 over ℂ, 268 over ℝ).

FamilyMatricesDistinct real eigenvaluesDistinct, some complexRepeated, diagonalizableRepeated, defectiveDiagonalizable over ℝDiagonalizable over ℂ
2×2, entries −5 to 514,64110,0084,2461137610,019 (68.4%)14,265 (97.4%)
3×3, entries 0 or 15122045264192268 (52.3%)320 (62.5%)
3×3, entries −1, 0, 119,6835,6529,4025734,0566,225 (31.6%)15,627 (79.4%)

In each row the four middle counts add up to the number of matrices.

Three things stand out:

  1. Repeated eigenvalues are not a death sentence. Among matrices with a repeated eigenvalue, 11 of 387 (2.8%) were diagonalizable in the 2×2 family, 64 of 256 (25.0%) in the 3×3 {0, 1} family, and 573 of 4,629 (12.4%) in the 3×3 {−1, 0, 1} family. The 11 in the 2×2 family are exactly the scalar matrices λI.
  2. The field changes the answer a lot. In the 3×3 {−1, 0, 1} family only 31.6% were diagonalizable over ℝ, against 79.4% over ℂ. The rotation matrix [[0, −1], [1, 0]] is the standard case: its eigenvalues are ±i, so it diagonalizes over ℂ and not over ℝ.
  3. The counts describe these small integer families only. Exam questions are chosen, not drawn at random, so read the table as a picture of how the cases are distributed, not as exam odds.

How do you use diagonalization to find a matrix power such as A¹⁰?

Once A = PDP⁻¹, the power is Aᵏ = PDᵏP⁻¹, and Dᵏ just raises each diagonal entry to the kth power (Statlect).

Let A = [[4, 1], [2, 3]]. The trace is 7 and the determinant is 10, so the eigenvalues are 2 and 5, which are distinct, so step 4 already says A is diagonalizable. For λ = 2, the vector (−1, 2) works, because A(−1, 2) = (−2, 4). For λ = 5, the vector (1, 1) works, because A(1, 1) = (5, 5).

So P = [[−1, 1], [2, 1]], D = diag(2, 5) and P⁻¹ = [[−1/3, 1/3], [2/3, 1/3]]. Then D¹⁰ = diag(1024, 9765625), and

PD¹⁰ = [[−1024, 9765625], [2048, 9765625]].

Multiplying by P⁻¹ gives A¹⁰ = [[6510758, 3254867], [6509734, 3255891]].

A long staircase of many identical steps beside a lift that goes straight to the same hilltop.
Diagonalizing first turns ten repeated multiplications into one short step on the diagonal.

Which of four practice matrices are diagonalizable over ℝ or ℂ?

Try each with the six steps before reading the answers. Exam papers ask this kind of question in the form "which of the following is diagonalizable?" (GATE Maths previous papers with solutions is where to practise the real format.)

  1. M1 = [[3, 1, 0], [0, 3, 0], [0, 0, 5]]
  2. M2 = [[2, 0, 0], [0, 2, 0], [1, 0, 3]]
  3. M3 = [[0, −1], [1, 0]], over ℝ and over ℂ
  4. M4 = [[0, 1, 0], [0, 0, 1], [0, 0, 0]]

Answers.

  1. M1 is not diagonalizable. It is triangular with eigenvalues 3, 3, 5. M1 − 3I has rank 2, so nullity 1, which is less than AM 2.
  2. M2 is diagonalizable. It is triangular with eigenvalues 2, 2, 3. The eigenvalue 2 repeats, but M2 − 2I has rank 1, so nullity 2 equals AM.
  3. M3 is diagonalizable over ℂ and not over ℝ. Its characteristic polynomial is x² + 1, with roots ±i.
  4. M4 is not diagonalizable. It is a non-zero nilpotent matrix: its characteristic polynomial is x³, but M4² is not zero, so the minimal polynomial is x³, which has a repeated root.
A student's hands sort four blank cards into two groups on a desk with a notebook and a pencil.
Sorting each practice matrix into a yes or no pile mirrors how the six steps settle every question.

Can you check diagonalizability exactly with Python?

Yes, with exact arithmetic. Floating-point routines such as numpy.linalg.eig return approximate eigenvectors, and for a repeated eigenvalue the rounding can make nearly dependent eigenvectors look independent. This script applies step 5's logic exactly: it tests whether the squarefree part of the characteristic polynomial sends A to zero.

from sympy import Matrix, Poly, symbols, gcd, quo, eye, zeros
x = symbols('x')

def diagonalizable(A, over_reals=False):
    cp = Poly(A.charpoly(x).as_expr(), x)
    sqfree = quo(cp, gcd(cp, cp.diff(x)))   # remove repeated factors
    n = A.shape[0]
    value, power = zeros(n, n), eye(n)
    for c in reversed(sqfree.all_coeffs()):  # evaluate sqfree at A
        value += c * power
        power = power * A
    ok = value == zeros(n, n)
    if over_reals:                            # also need every root real
        ok = ok and sqfree.count_roots() == sqfree.degree()
    return ok

print(diagonalizable(Matrix([[0, -1], [1, 0]])))                   # True  (over C)
print(diagonalizable(Matrix([[0, -1], [1, 0]]), over_reals=True))  # False (over R)

It gives the answers listed above for M1 to M4 and for the matrix [[0, −9], [1, −6]].

Which SBTech Math course covers diagonalization of a matrix?

Our Linear Algebra Master Course covers eigenvalues and eigenvectors, diagonalization, and minimal and characteristic polynomials, with discussion of previous-year questions (PYQs) and practice questions. SB Sir (Sunil Bansal) teaches it in Hindi and English. It costs ₹2,499 as of November 2026.

Questions about which course fits your exam? Email sbtechmath@gmail.com or use our contact form; we reply to contact-form enquiries within 24 hours.

Prepare diagonalization with SB Sir's Linear Algebra course

Ask which SBTech Math course fits your exam and we reply to contact-form enquiries within 24 hours.
Contact SBTech Math

Frequently asked questions

No. The diagonal matrix D is unique only up to the order of its entries, and P changes when you reorder the eigenvalues, rescale an eigenvector, or pick a different basis of an eigenspace of dimension 2 or more.
Yes, when each repeated eigenvalue has as many independent eigenvectors as its repeat count. For each repeated λ, compare the nullity of A − λI with the repeat count; a match for every repeated eigenvalue means diagonalizable.
Over ℂ, find its eigenvalues, which for a rotation by angle θ are cos θ ± i sin θ, then use the complex eigenvectors as the columns of P. Over ℝ it cannot be diagonalized unless the angle is 0 or π.
Check whether the minimal polynomial has distinct roots. If a polynomial with distinct roots gives zero at A (for example A² = A or A² = I), the matrix is diagonalizable. A non-zero nilpotent matrix never is.
It turns hard calculations into easy ones: powers Aᵏ, functions of a matrix, and classification questions about which matrices are similar. Both syllabi name it, and the GATE 2027 Mathematics syllabus also names diagonalization by a unitary matrix.

Sources

  1. 1.GATE 2027 Mathematics (MA) syllabus, IIT Madras, IIT Madras
  2. 2.CSIR-UGC NET Mathematical Sciences common syllabus for Parts B and C, CSIR Human Resource Development Group
  3. 3.Diagonalizable matrix, Wikipedia
  4. 4.Matrix diagonalization, Statlect
  5. 5.Our own computation (November 2026): the three-family classification, the A¹⁰ calculation and the practice-matrix answers, all using exact integer arithmetic in Python with sympy
  6. 6.Linear Algebra Master Course, SBTech Math

Keep reading

SBTechMath.

India's trusted Mathematics learning platform for CSIR-NET, GATE, IIT-JAM, CUET PG, and competitive exam aspirants. Learn concepts that help you succeed.

© 2026 SBTech Math

Powered by PageLens.ai

Crack CSIR-NET, GATE & IIT-JAM with concept-first learning.

Start Now