Closed JoeSpencer1 closed 1 year ago
Ok, I have the eigenvalues. Now I just need to make the eigenvectors.
Now the eigenvalues are finished. Next I should find the eigenvectors.
Complex eigenvectors are harder to find...
Here are eigenvectors for a 2x2 matrix: https://math.stackexchange.com/questions/395698/fast-way-to-calculate-eigen-of-2x2-matrix-using-a-formula
For a larger matrix, once you have it in row echelon form you can set the last entry of the eigenvector to one and then find the others by elimination. Be flexible on the first/final entry.
Hmm I think you need to find the eigenvectors with algebra.
Also, the last term of the eigenvector can be complex in some cases.
Find 1st entry in terms of the others, then remove 1st entry from equation for 2nd entry, until you have equation for last entry. Set last entry real portion equal to 1. After this use the same method to find λ if any of the eigenvalues are complex.
What do you do for repeated eigenvalues or eigenvectors whose last entry is zero?
You should work this out on paper to figure out how to make the eigenvectors. I'm pretty sure the last entry is different mainly for repeat eigenvalues.
Some repeat eigenvalues only have one eigenvector. For example, this matrix only has 2 eigenvectors: {{-2,2,3},{-9,7,5},{-5,2,6}}
Solve for imaginary eigenvectors first, then real.
🤦🏻♂️I know this is super basic, but ChatGPT generated this method. You can set up 2 equations, with a as the real portion and b as the imaginary portion, so λ=a+bi. They are: (A-aI)yr-byi=0, (A-aI)yi+byr=0
Both real and complex eigenvectors can be found now. The program still cannot find eigenvectors for repeat eigenvalues, though.
If the eigenvalue is a repeat diagonal entry, this will also have to be resolved differently.
If the eigenvalue is on the main diagonal, you'll have problems with the multiplicity function too.
I think eigenvalues should work for all matrices now, even weird ones.
Add functionality for these special cases.