Group Abstract Group Abstract

Message Boards Message Boards

1
|
942 Views
|
8 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Viewing eigenvalues and eigenvectors

Posted 3 months ago

In order to get a better understanding of Eigenvectors and Eigenvalues, I am plotting both the given and calculated the vectors geometrically using Graphics[] and running into problems - see attached notebook.

  1. The calculated eigenvectors seem to have a different magnitude than the original vectors, which I am assuming is the result of me not including the Eigenvalues in the graph. However, when I try to include the calculated Eigenvalues into the graph, I get error messages, which are probably syntax errors resulting in me not coding the function correctly. So would someone please show me the correct way to include the Eigenvalues into the Graphic function?

  2. It appears that the calculated eigenvectors point in a different direction than the given vectors, which I do not understand. So, would someone with a better understanding of Eigenvectors help me get a better understanding as to what the geometric view is actual showing me?

Thanks,
Mitch Sandlin

POSTED BY: Mitchell Sandlin
8 Replies

On a math note, if I understand you, the "given" vectors are the row vectors of the matrix {{-3,2},{-15,8}}, that is the vectors {-3, 2} and {-15, 8}. I do not think there is any general relationship between the row vectors and eigenvectors of a matrix.

The first column of a matrix mat is the vector you get from the product mat.{1,0}. The second column is the result of mat.{0,1}. An eigenvector is a (nonzero) linear combination of the columns that happens, when multiplied by mat, to yield a scalar multiple of itself. (Of course, every product mat.{x,y} is a linear combination of the columns of mat, so the scalar-multiple property is key for eigenvectors.)

POSTED BY: Michael Rogers

Thanks for the information, it was very helpful. When calculating eigenvectors using the functions Eigenvectors or Eigensystems they produce decimal values that are most times hard to understand and to visualize. There are other Eigenvectors solutions that are whole numbers, sometimes positive, that make it easy to understand the ratios between the entities under study. For example, in a predator/prey study of rabbits and foxes, Eigenvectors of {3, 1) could indicate 3 rabbits to every fox which is much easier to understand than two very long decimal numbers. When calculating the Eigenvectors manually, I can calculate the easier to understand Eigenvectors from the matrix produced using inspection and trial & error.

It just seems there should be a method, possibly using parameters) to use the Mathematica functions of Eigenvectors, or Eigensystem to calculate these values. In any event, I again want to thank you for your help and wish you a very merry Christmas and a wonderful New Year.

Mitch Sandlin

POSTED BY: Mitchell Sandlin
Posted 2 months ago

You could use Ratios to get the 3:1-type analysis or normalize the eigenvectors to have one of its components to be 1:

evecs = Eigenvectors[N@{{-3, 2}, {-15, 9}}];
Ratios /@ evecs
Normalize[#, Min[Abs[Select[#, # != 0 &]]] &] & /@ evecs
Normalize[#, Norm[#, Infinity] &] & /@ evecs
#/First[#] & /@ evecs
(*
{{-0.230336, -0.973111}, {-0.49079, -0.871278}}  <-- e-vectors
{{4.22474}, {1.77526}}                           <-- ratios of components
{{-1., -4.22474}, {-1., -1.77526}}               <-- smallest component ±1
{{-0.236701, -1.}, {-0.563299, -1.}}             <-- largest component ±1
{{1., 4.22474}, {1., 1.77526}}                   <-- first component 1 (beware ÷0)
*)

Happy holidays to you, too!

POSTED BY: Updating Name

Another way to visualize eigenvectors is to draw arrows along the unit circle, instead of the whole plane:

mat = {{1, -1/2}, {-1, -1/2}};
pts = CirclePoints[80];
Graphics[{Circle[], pts /. {x_?NumericQ, y_} :>
    {Hue[VectorAngle[{x, y},
        mat . {x, y}]/(Pi)],
     Arrow[{{x, y},
       {x, y} + 1/4 Norm[mat] mat . {x, y}}]}}]
POSTED BY: Gianluca Gorni

Thanks for the information. I am still trying to understand exactly what the unit circle with vectors pointing outward is indicating. Looking at vectors in the plane, it is somewhat easy to identify and understand the flows, but the unit circle vectors is a bit of a stretch for me. In any event, thanks for the help, and have a very merry Christmas and a wonderful New Year.

Mitch Sandlin

POSTED BY: Mitchell Sandlin

Along the unit circle, the eigenvectors with real eigenvalue are the arrows that are orthogonal to the circle. They should be easy to spot visually. The length of the vector indicates the eigenvalue. Merry Christmas!

POSTED BY: Gianluca Gorni

Mitchell,

in your code you have too many curly brackets; try

Graphics[{Red, Arrow[{{0, 0}, 3 {1, 3}}], Blue, Arrow[{{0, 0}, 2 {2, 5}}]}, Axes -> True, AxesLabel -> {"x", "y"}]

For an understanding of eigenvectors here is a simple example to play with: Red are the eigenvectors, green represents the input vector and blue the resulting output. The vectors of the vector field gives the direction of this output.

mat = {{1., -.5}, {-1, -.5}};
{ev, evec} = Eigensystem[mat];
Manipulate[
 VectorPlot[mat . {x, y}, {x, -3, 3}, {y, -3, 3}, 
  Epilog -> {Red, Arrow[ev[[1]] {{0, 0}, evec[[1]]}], 
    Arrow[ev[[2]] {{0, 0}, evec[[2]]}], 
    Arrow[-ev[[1]] {{0, 0}, evec[[1]]}], 
    Arrow[-ev[[2]] {{0, 0}, evec[[2]]}], Green, Arrow[{{0, 0}, vec}], 
    Blue, Arrow[{{0, 0}, mat . vec}]}, 
  PerformanceGoal -> "Quality"], {{vec, {1, 1}}, Locator}]

Does that help? Regards -- Henrik

POSTED BY: Henrik Schachner

Yes it does and Danke so much. Have a very merry Christmas and a great New Year.

POSTED BY: Mitchell Sandlin
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard