Skip to content
Tutorials Center
My learning

Topics

Lesson 11 of 62 ยท Matrices

Special Matrices: Skew-Symmetric, Orthogonal, Idempotent, Nilpotent and More

A field guide to special matrices: definitions, how to recognize each type, and the determinant and eigenvalue facts that follow, with a NumPy classifier.

Some matrices come up so often, or have such useful structure, that they get names. Knowing the names is not trivia: each type promises a property you can use without any extra work. An orthogonal matrix never stretches vectors. A symmetric matrix has real eigenvalues. A nilpotent matrix vanishes if you multiply it by itself enough times. A projection satisfies Pยฒ = P.

You have already met several of these: symmetric, skew-symmetric, identity, diagonal and triangular matrices. This lesson collects them with the rest of the family into one catalogue, tells you what each type guarantees about its determinant and eigenvalues, and finishes with a NumPy function that recognizes them. Complex versions (Hermitian and unitary) get a full treatment in Complex Matrices.

The catalogue

All matrices below are square. A^T is the transpose and A^H (the conjugate transpose) is the transpose with every entry replaced by its complex conjugate. For real matrices A^H = A^T.

Type Defining rule What it guarantees
Symmetric A^T = A real eigenvalues, orthogonal eigenvectors
Skew-symmetric A^T = -A zero diagonal; eigenvalues are 0 or purely imaginary pairs ยฑbi; det = 0 when n is odd
Orthogonal A^T A = I preserves lengths and angles; det = ยฑ1; eigenvalues have `
Idempotent Aยฒ = A eigenvalues only 0 or 1; rank = trace
Nilpotent A^k = 0 for some k all eigenvalues are 0; det = 0 and trace = 0
Involutory Aยฒ = I eigenvalues ยฑ1; A is its own inverse
Hermitian A^H = A real eigenvalues (complex analogue of symmetric)
Unitary A^H A = I preserves lengths; `
Normal A A^H = A^H A unitarily diagonalizable; includes symmetric, skew, orthogonal, Hermitian and unitary matrices

A few quick sketches of why the guarantees hold:

  • Skew-symmetric, odd size: det(A) = det(A^T) = det(-A) = (-1)^n det(A). For odd n this says det(A) = -det(A), so det(A) = 0. Also x^T A x = 0 for every x, since the number equals its own negative.
  • Orthogonal: A^T A = I means det(A)ยฒ = 1. Lengths are preserved because |Ax|ยฒ = x^T A^T A x = x^T x. Rotations and reflections are the examples.
  • Idempotent: if Av = ฮปv then Aยฒv = ฮปยฒv, but Aยฒ = A, so ฮปยฒ = ฮป and ฮป is 0 or 1. Every projection matrix is idempotent. Since the trace is the sum of eigenvalues, it counts the ones: trace = rank.
  • Nilpotent: A^k = 0 forces every ฮป^k = 0, so all eigenvalues vanish. A strictly upper triangular matrix (zeros on and below the diagonal) is always nilpotent.

Matrices with a promise

Symmetric Equals its own transpose.
Orthogonal Rotations and reflections.
Idempotent Doing it twice changes nothing.
Nilpotent Some power is the zero matrix.
1 / 2

A classifier in NumPy

Floating-point arithmetic needs tolerances, so each test uses np.allclose. The function reports every label that applies, and we feed it a gallery of examples and print the eigenvalue facts alongside.

Python Recognizing special matrices and checking their eigenvalues

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

A single matrix can carry several labels. The reflection is symmetric, orthogonal and involutory at once. A rotation is orthogonal and normal but not symmetric. The shear in the gallery earns no label (its list is empty): the normal test is the only one that could catch it and it fails.

Building special matrices from others

Many special matrices are made by a recipe, which also tells you where they come from:

  • Symmetric from any B: B + B^T, or B^T B.
  • Skew-symmetric from any B: B - B^T.
  • Orthogonal from any matrix with independent columns: the Q of a QR factorization.
  • Idempotent from a basis matrix A: the projection A (A^T A)^(-1) A^T.
  • Nilpotent: put a shifted diagonal of ones in a zero matrix, for example [[0, 1], [0, 0]].

Check your understanding

Quick check ยท 5 questions

of 5 answered You scored / 5 ยท perfect!

  1. 1. A 5 x 5 real skew-symmetric matrix has determinant...

    For odd n, det(A) = det(A^T) = det(-A) = (-1)^n det(A) = -det(A), so det(A) = 0.
  2. 2. If A is idempotent, which values can its eigenvalues take?

    From A^2 = A we get lambda^2 = lambda, so lambda is 0 or 1.
  3. 3. What is true of every orthogonal matrix Q?

    |Qx|^2 = x^T Q^T Q x = x^T x, so lengths never change. The determinant is 1 or -1.
  4. 4. Which matrix is nilpotent?

    Squaring [[0, 1], [0, 0]] gives the zero matrix. The swap matrix squares to the identity, and the shear never reaches zero.
  5. 5. The conjugate transpose of a real matrix is...

    Real entries equal their own conjugates, so A^H = A^T. That is why Hermitian generalizes symmetric and unitary generalizes orthogonal.

Summary

  • Named matrices carry guarantees: symmetric means real eigenvalues, orthogonal means length-preserving, idempotent means eigenvalues 0 or 1, nilpotent means all eigenvalues 0.
  • Skew-symmetric matrices have zero diagonal, purely imaginary eigenvalues, x^T A x = 0, and determinant 0 when the size is odd.
  • Hermitian and unitary are the complex counterparts of symmetric and orthogonal, built with the conjugate transpose A^H.
  • Always test with tolerances in floating point, for example np.allclose.

Next: Block Matrices and Partitioned Products, a way to organize large matrices into smaller pieces.