Mentor
Two of my favorite areas of study are linear algebra and computer programming. In this article I combine these areas by using Python to confirm that a given matrix satisfies the Cayley-Hamilton theorem. The theorem due to Arthur Cayley and William Hamilton states that if ##f(\lambda) = \lambda^n + c_{n-1}\lambda^{n-1} + \dots + c_1\lambda + c_0## is the characteristic polynomial for a square matrix A , then A is a solution to this characteristic equation. That is, ##f(A) = A^n + c_{n-1}A^{n-1} + \dots + c_1A + c_0I = 0##. Here I is the identity matrix of order n, 0 is the zero matrix, also of order n.
Characteristic polynomial – the determinant |A – λI|, where A is an n x n square matrix,  I is the n x n identity matrix, and λ is a scalar variable, real or complex. The characteristic polynomial for a square matrix is a function of the variable, λ...