🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: sci.math.num-analysis
Article #1222

Re: Very simple eigenvector/eigenvalue calculation

#1222
From: Doug Magnoli
Date: Fri, 09 Nov 2001 06:07
89 lines
4986 bytes
The expressions Alan gave you for the eigenvectors aren't as you've interpreted them, instead they're different ways of
expressing the same thing and therefore they generate four eigenvectors, all of which are correct, but you'll notice
that two of them are duplicates.

For example, with the matrix you used below, the eigenvectors you get are:

(1,-1) for eigenvalue 1, which works
(-3,3) for eigenvalue 1, which works

(1,3) for eigenvalue 5, which works
(1,3) for eigenvalue 5, which works

Notice that the third and fourth eigenvectors are identical.  The first and second are identical because they're related
by a scalar constant, and remember that you can always multiply an eigenvector by any scalar and it will still be an
eigenvalue.

Hope that clears something up.

-Doug Magnoli


jonmach wrote:

> Alan,
>
> Many many thanks for this.
>
> I got to the point where I worked out that I could calculate the
> polynomial, and can calculate the roots for this.  I just didn't know
> how to get the eigenvectors from this.
>
> e.g. [ 2 1 ]
>      [ 3 4 ]
>
> gives the polynomial x^2 - 6x + 5 = 0
> giving roots (x - 1) (x - 5)
>
> As you state,
>
> > The eigenvectors can then be written as (b, x-a) or (x-d, c).
>
> Your solution provides me with 4 potential eigenvectors.
>
> (1, 1-2) = (1, -1) IS an eigenvector for the eigenvalue 1.
> (1, 5-2) = (1, -3) IS NOT an eigenvector for the eigenvalue 5.
> (1-4, 3) = (-3, 3) IS NOT an eigenvector for the eigenvalue 1.
> (5-4, 3) = (1, 3) IS an eigenvector for the eigenvalue 5.
>
> However, it is a simple matter to work out which 2 work, and discard
> the others.
>
> Problem solved.  Thanks again
>
> Jon
>
> "Alan Miller" <amiller@bigpond.net.au> wrote in message news:<iB8G7.310759$bY5.1235789@news-server.bigpond.net.au>...
> > jonmach wrote in message ...
> > >Hi All,
> > >
> > >I've trawled the net and have found some very comprehensive libraries
> > >and source for calculating the eigenvalues/eigenvectors of an nxn
> > >matrix.  However, this is very much overkill for what I need.
> > >
> > >I have a single 2X2 matrix holding real values and simply need to
> > >calculate the 2 eigenvalues and corresponding eigenvectors.  Is there
> > >a very simple algorithm for this that already exists in
> > >C/Fortran/Java/C++?
> > >
> > >Many many thanks in advance for any assistance on this.
> > >
> > >Jon
> >
> > The matrix:-
> > ( a  b )
> > ( c  d )
> > has eigenvalues obtained by solving (a-x)(d-x) - bc = 0 for x.
> > This is simply a quadratic equation, and the solutions are:
> > 2x = -(a+d) +/- sqrt[ (a-d)^2 + 4bc ]
> > The roots can of course be complex, if b & c have opposite signs
> > and are moderately large compared with the diagonal elements a & d.
> > The eigenvectors can then be written as (b, x-a) or (x-d, c).
> >
> > Complex operations and variables are intrinsic in Fortran, so that
> > may be the easiest language to use.
> >
> > Now I have done your homework for you, you may like to look up
> > the numerical solution of quadratic equations to minimize cancellation
> > errors.   If (a-d)^2 is approximately equal to -4bc, the cancellation errors
> > could be very large, if you use the simple formula above.
Technical Details
Message-ID: <3BEB72A2.964D5152@home.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!newsfeed.direct.ca!look.ca!newshub2.rdc1.sfba.home.com!news.home.com!news1.rdc1.sfba.home.com.POSTED!not-for-mail
References: <c31cdc29.0111070230.16042ed1@posting.google.com> <iB8G7.310759$bY5.1235789@news-server.bigpond.net.au> <c31cdc29.0111070630.64bed4ba@posting.google.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11516a,e88e7b69d54b66a5
X-Google-Attributes: gid11516a,public
X-Google-Thread: 1014db,e88e7b69d54b66a5
X-Google-Attributes: gid1014db,public
X-Google-Thread: 109d8a,e88e7b69d54b66a5
X-Google-Attributes: gid109d8a,public
X-Google-Thread: 107079,e88e7b69d54b66a5
X-Google-Attributes: gid107079,public
X-Google-Thread: 10d67e,e88e7b69d54b66a5
X-Google-Attributes: gid10d67e,public
X-Google-ArrivalTime: 2001-11-08 22:07:35 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!newsfeed.direct.ca!look.ca!newshub2.rdc1.sfba.home.com!news.home.com!news1.rdc1.sfba.home.com.POSTED!not-for-mail
Message-ID: <3BEB72A2.964D5152@home.com>
From: Doug Magnoli <dmagnoli@home.com>
Reply-To: dmagnoli@home.com
X-Mailer: Mozilla 4.78 (Macintosh; U; PPC)
X-Accept-Language: en,cs,it,fr-FR,es,de,pl,ja,ko,zh-CN
MIME-Version: 1.0
Newsgroups: sci.math.num-analysis,sci.math,comp.lang.c,aus.mathematics,alt.math.undergrad
Subject: Re: Very simple eigenvector/eigenvalue calculation
References: <c31cdc29.0111070230.16042ed1@posting.google.com> <iB8G7.310759$bY5.1235789@news-server.bigpond.net.au> <c31cdc29.0111070630.64bed4ba@posting.google.com>
Content-Type: text/plain; charset=us-ascii; x-mac-type="54455854"; x-mac-creator="4D4F5353"
Content-Transfer-Encoding: 7bit
Lines: 90
Date: Fri, 09 Nov 2001 06:07:34 GMT
NNTP-Posting-Host: 24.20.86.47
X-Complaints-To: abuse@home.net
X-Trace: news1.rdc1.sfba.home.com 1005286054 24.20.86.47 (Thu, 08 Nov 2001 22:07:34 PST)
NNTP-Posting-Date: Thu, 08 Nov 2001 22:07:34 PST
Organization: Excite@Home - The Leader in Broadband http://home.com/faster