Eigenvalue Practice Generator
A randomly chosen matrix almost never has whole-number eigenvalues, which makes practice questions hard to write and easy to get wrong. These are constructed the other way round: start from a triangular matrix, whose eigenvalues are simply its diagonal, then change basis with a determinant-one matrix that leaves them untouched. The trace and determinant give you two independent ways to check your answer before you have found it.
What this generator does
Picks the eigenvalues first, puts them on the diagonal of a triangular matrix, and conjugates by a unit lower-triangular matrix — which has determinant one and an integer inverse, so the result is an integer matrix with the same eigenvalues.
How to use this tool
- Choose the matrix size.
- Find the eigenvalues by the characteristic polynomial or by inspection.
- Check your answer against the trace and the determinant.
- Reveal the eigenvalues to confirm.
Understanding the controls
- Matrix size
- Between 2 and 4. The check confirms each eigenvalue by determinant, which grows quickly beyond that.
- Seed
- Reproduces the same matrix and eigenvalues exactly.
- Show the answer
- Reveals the eigenvalues, the trace and the determinant together.
Common use cases
- Eigenvalue exercises where the answers are whole numbers
- Showing that trace and determinant constrain the eigenvalues
- Practice at the characteristic polynomial with a tractable answer
- Test cases for an eigenvalue solver
- Setting the same matrix for a class from a seed
How this generator works
Conjugation by an invertible matrix preserves eigenvalues, and a unit lower-triangular matrix has determinant one so its inverse is integral — which keeps the whole matrix in whole numbers. The check tests each claimed eigenvalue properly: it subtracts it from the diagonal and requires the determinant to be zero, which is the definition.
Randomness and fairness
The eigenvalues and the change of basis are random; that the eigenvalues stay whole numbers follows from the construction. Seeded matrices reproduce and are therefore explicitly not cryptographically secure. Unseeded, the browser's cryptographically secure generator is used.
For how randomness is produced across the whole site, see how Generate Random works.
Limitations and good to know
- Eigenvalues are always real and whole. Complex and repeated-with-defective cases are the interesting hard ones and do not appear.
- Eigenvectors are not given, only eigenvalues.
- Sizes stop at four because the verification computes a determinant per eigenvalue.
- The matrix is rarely symmetric, so it is not a covariance-style example.
- Questions are discarded when you leave; seed one to set it for a class.
Privacy and your data
Every matrix and its eigenvalues are computed in your browser. Nothing is transmitted or retained.
Related generators
- Positive Definite Matrix GeneratorMatrices built to be positive definite and proved so twice — by Cholesky decomposition and by Sylvester's criterion.
- Matrix Question GeneratorMultiplication, determinant and inverse questions, with inverses built to have whole-number entries.
- Linear System GeneratorSystems of equations in three to five unknowns with whole-number solutions, guaranteed to have exactly one.
- Symmetric Matrix GeneratorMatrices that equal their own transpose, with the trace, determinant and the count of entries that are actually free.