How can one show that a matrix is nilpotent or not?

Context: In linear algebra, a nilpotent matrix is a square matrix $$N$$ such that $$N^{k}=0\,$$ for some positive integer $$k$$. (The smallest such $$k$$ is sometimes called the index of $$N$$.)

Question: How can one show that a matrix is nilpotent or not? Direct matrix multiplication for checking the definition is an obvious choice but seems not efficient. Is there any other method to do it?

• Despite the upvotes and two (somewhat conflicting) Answers, the Question is not presently in a form conducive to a good answer. The definition of a nilpotent matrix does involve matrix multiplication (check!). So there may be an algebraic condition that applies to a matrix you know without doing the multiplication yourself, but your one line Question does not shed light on what interests you about such cases. Commented Aug 29, 2019 at 12:07

A matrix is nilpotent iff its only eigen value (in the algebraic closure of the base field) is $$0$$. This follows easily from Caley - Hamilton Theorem. See https://en.wikipedia.org/wiki/Cayley%E2%80%93Hamilton_theorem

Thanks to Kezer for pointing out the taking the algebraic closure is needed.

• Quick remark: Here "only eigenvalue" means "only eigenvalues in the algebraic closure of the ground field". A not as elegant proof as Cayley Hamilton would be to note that the Jordan Canonical Form would then clearly be nilpotent. Commented Aug 11, 2019 at 6:26
• Kezer, you beat me to it. For example, the only real eigenvalue of the real matrix $\pmatrix{0&0&0\\0&0&-1\\0&1&0}$ is $0$, but this matrix is not nilpotent. Commented Aug 11, 2019 at 6:27
• Yeah, nice! I guess we should write out the proof to let everyone see that it's needed. If $A$ were nilpotent, then $A^n = 0$ for some $n$. Its minimal polynomial then has to divide $X^n$, so we can conclude that all eigenvalues of the algebraic closure have to be $0$. And if every eigenvalue in the algebraic closure is $0$, then the characteristic polynomial is $X^n$. So done by Cayley-Hamilton. Commented Aug 11, 2019 at 6:41
• Calculate the characteristic polynomial, it should be $x^n = 0$. Commented Aug 12, 2019 at 13:00

It is useless considering the algebraic closure of the base field $$K$$. Indeed, to calculate the $$A$$'s eigenvalues, ​​using standard numeric methods, is a bad idea because (in general) we only get approximations of them.

Assume, for example, that $$A\in M_n(\mathbb{Z})$$ ($$\mathbb{Z}$$ is not even a field). We are led to show that

i) or $$\det(xI-A)=x^n$$. The calculation can be done (using an elaborate software) in $$O(n^3)$$ operations. Yet, when $$n$$ is large, the coefficients may be very large; in binary operations, the complexity can be reduced (via a complicated software) to $$(n^{3.2}\log(max(|a_{i,j}|)))^{1+o(1)}$$, cf.

https://perso.ens-lyon.fr/gilles.villard/BIBLIOGRAPHIE/PDF/KaVi04.pdf

ii) Either $$A^k=0$$ where $$k\geq n$$; we calculate $$A^n$$ with the binary method $$A^2,A^4,\cdots$$. We calculate $$O(\log n)$$ products, that is, using $$O(n^3\log n)$$ operations. As in i), the entries may be very large; then, in elemetary operations, the complexity is at least in $$O(n^4\log n)$$.

• Who is the brave ignorant who downvoted my post ?
– user91684
Commented Sep 29, 2019 at 22:04