Check whether repeatedly multiplying a square matrix by itself eventually produces the all-zero matrix.
Check whether repeatedly multiplying a square matrix by itself eventually produces the all-zero matrix.
The calculator repeatedly multiplies the matrix by itself — A, A², A³, and so on — checking after each step whether the result has become the all-zero matrix. By a result called the Cayley-Hamilton theorem, an n×n nilpotent matrix is guaranteed to reach zero by at most the n-th power, so the calculator stops looking beyond that point.