All code is in a single .h file except for a .cpp file with the
main() demo. Computation time scales as N^4. Also has class template Polynomial. Has extensive operators and methods. Algorithm summary: Any polynomial of degree m is uniquely and simply determined by its values at m+1 points. In particular the characteristic polynomial of an NxN matrix A can be determined by evaluating the determinant |x * I - A| at N+1 distinct values of x. Householder reduction is used to find determinants. Householder reduction of x*I - A with x an eigenvalue is used to determine the corresponding eigenvector. x*I - A = Q*B where Q is unitary and B is upper triangular. If x is an eigenvalue of A, there must be at least one zero on the diagonal of B. An eigenvector of A will be a vector in the null space of B. The upper triangular form of B makes finding its null vectors easy. For a zero on the diagonal of B, make the eigenvector have a 1 at that row, zeros below, and work upwards.
Features
- C++ complex eigenvectors and eigenvalues for complex matrix
- C++ class templates Matrix and Polynomiar
- Overloaded operators
- Householder reduction for complex matrices
- C++ zroots using STL std::complex
- Builds with WSL2 Ubuntu and Debian g++, Raspbian Bullseye g++, Visual Studio 2022 See notes in testmatrixtemplate.cpp