The problem of diagonalizing a matrix A can be thought of as A = PDP-1 where P is ain invertible matrix whose columns are the eigenvectors of A, and D is a diagonal matrix whose diagonal entries are the eigenvalues of A.
This tool allows the user to "reverse engineer" a diagonalization problem. The goal is to construct Integer Matrices with Integer Eigenvalues (IMIEs).
You will supply the integer matrix P, and the tool will calculate the determinant of P to assure that it is non-zero, so that P is invertible).
The tool will then allow you to select integer eigenvalues in such a way that A will be an IMIE. The matrix A along with its characteristic polynomial will be returned
In our paper (citation), we give two quick proofs that as long as all the eigen values are congruent to each other modulo the determinant of P, the matric A = PDP-1 has integer entries.
No. There exist other IMIEs that are not obtained by this tool. Given certain matrices, P, one can select eigenvalues with are not congruent modulo the determinant of P and still get an IMIE. (see aforementioned paper)
The (title of the) paper "Almost All Integer Matrices Have No Integer Eigenvalues" by Martin and Wong (Amer. Math. Monthly) addresses this question. One cannot start with an integer matrix A and expect it to have integer eigenvalues.
Nevertheless, virually all introductory linear algebra and ordinary differential equations classes at the undergraduate level ask students to diagonalize matrices. Exercises always use IMIEs (and are nearly always 4 × 4 or smaller). This tool allows an instructor or textbook writer to dynamically contruct IMIEs until the characteristic polynomial looks resonably factorable by their students. One can avoid the value 0 as an eigenvalue (and thus avoid degenerate problems in ODEs) while maintaining fairly small eigenvalues.
Sorry, this tool will not help you with those. However, we will be adding a different tool for constructing all 3 × 3 diagonalizable matrices with a double eigenvalue. Coming soon.