Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
documentation:language_reference:objects:matrix:functions:eigensystem [2024/12/12 17:16] – Maurits W. Haverkort | documentation:language_reference:objects:matrix:functions:eigensystem [2024/12/12 17:32] (current) – Maurits W. Haverkort | ||
---|---|---|---|
Line 37: | Line 37: | ||
{ 0 , 0 , 8.6691 } } | { 0 , 0 , 8.6691 } } | ||
</ | </ | ||
+ | |||
+ | |||
+ | ===== Example ===== | ||
+ | |||
+ | ### | ||
+ | For a non-Hermitian matrix | ||
+ | ### | ||
+ | |||
+ | ==== Input ==== | ||
+ | <code Quanty Example.Quanty> | ||
+ | A = Matrix.New({{1, | ||
+ | {5,3,7}, | ||
+ | {3,5,1}}) | ||
+ | val, funL, funR = Eigensystem(A) | ||
+ | print(" | ||
+ | print(" | ||
+ | print(" | ||
+ | print(" | ||
+ | </ | ||
+ | |||
+ | ==== Result ==== | ||
+ | <file Quanty_Output> | ||
+ | WARNING: non hermitian matrix found | ||
+ | Using left and right handed eigensystem | ||
+ | With potential complex eigenvalues | ||
+ | The eigenvalues are | ||
+ | { -3.8133538424944 , -0.86687641096757 , 9.680230253462 } | ||
+ | The left eigenfunctions are | ||
+ | { { 0.139 , -0.6419 | ||
+ | { -0.974 | ||
+ | { -0.5567 | ||
+ | |||
+ | The right eigenfunctions are | ||
+ | { { -0.3991 | ||
+ | { -0.9178 | ||
+ | { -0.2901 | ||
+ | |||
+ | The matrix transformed to a diagonal matrix by its eigenfunctions is | ||
+ | { { -3.8134 , 0 , 0 } , | ||
+ | { 0 , -0.8669 , 0 } , | ||
+ | { 0 , 0 , 9.6802 } } | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Example ===== | ||
+ | |||
+ | ### | ||
+ | For an Hermitian matrix with small non-Hermitian part | ||
+ | ### | ||
+ | |||
+ | ==== Input ==== | ||
+ | <code Quanty Example.Quanty> | ||
+ | A = Matrix.New({{1, | ||
+ | {1-1E-7, | ||
+ | {3,5,1}}) | ||
+ | val, funL, funR = Eigensystem(A) | ||
+ | print(" | ||
+ | print(" | ||
+ | print(" | ||
+ | print(" | ||
+ | |||
+ | print(" | ||
+ | </ | ||
+ | |||
+ | ==== Result ==== | ||
+ | <file Quanty_Output> | ||
+ | WARNING: non hermitian matrix found | ||
+ | Using left and right handed eigensystem | ||
+ | With potential complex eigenvalues | ||
+ | The eigenvalues are | ||
+ | { -3.7873476689872 , 0.64886022722351 , 8.1384874417637 } | ||
+ | The left eigenfunctions are | ||
+ | { { -0.3763 | ||
+ | { -0.853 | ||
+ | { -0.3616 | ||
+ | |||
+ | The right eigenfunctions are | ||
+ | { { -0.3763 | ||
+ | { -0.853 | ||
+ | { -0.3616 | ||
+ | |||
+ | The matrix transformed to a diagonal matrix by its eigenfunctions is | ||
+ | { { -3.7873 , 0 , 0 } , | ||
+ | { 0 , 0.6489 , 0 } , | ||
+ | { 0 , 0 , 8.1385 } } | ||
+ | |||
+ | The left and right hand vectors are now only marginally different | ||
+ | { { -3.7873 , -5.4e-8 , 2.3e-9 } , | ||
+ | { 9.2e-9 , 0.6489 , -6.7e-9 } , | ||
+ | { -4.9e-9 , -8.4e-8 , 8.1385 } } | ||
+ | </ | ||
+ | |||
+ | |||
===== Table of contents ===== | ===== Table of contents ===== | ||
{{indexmenu> | {{indexmenu> | ||