Article View: sci.math.num-analysis
Article #1221Re: Very simple eigenvector/eigenvalue calculation
From: Guenter Rote
Date: Wed, 07 Nov 2001 16:28
Date: Wed, 07 Nov 2001 16:28
54 lines
3325 bytes
3325 bytes
jonmach wrote: ... > 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. you made an error in the calculation > (1-4, 3) = (-3, 3) IS NOT an eigenvector for the eigenvalue 1. it IS. > (5-4, 3) = (1, 3) IS an eigenvector for the eigenvalue 5. > > "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). > ... -- G"unter Rote, Freie Universit"at Berlin, Institut f"ur Informatik
Technical Details
Message-ID:
<3BE96136.FB7C5B4C@inf.fu-berlin.de>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!bein.inf.fu-berlin.DE!not-for-mailReferences:
<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: 109d8a,e88e7b69d54b66a5 X-Google-Attributes: gid109d8a,public X-Google-Thread: 107079,e88e7b69d54b66a5 X-Google-Attributes: gid107079,public X-Google-Thread: 1014db,e88e7b69d54b66a5 X-Google-Attributes: gid1014db,public X-Google-Thread: 10d67e,e88e7b69d54b66a5 X-Google-Attributes: gid10d67e,public X-Google-ArrivalTime: 2001-11-07 08:28:40 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!bein.inf.fu-berlin.DE!not-for-mail From: Guenter Rote <rote@inf.fu-berlin.de> Newsgroups: sci.math.num-analysis,sci.math,comp.lang.c,aus.mathematics,alt.math.undergrad Subject: Re: Very simple eigenvector/eigenvalue calculation Date: Wed, 07 Nov 2001 17:28:38 +0100 Organization: Freie Universitaet Berlin Lines: 54 Message-ID: <3BE96136.FB7C5B4C@inf.fu-berlin.de> References: <c31cdc29.0111070230.16042ed1@posting.google.com> <iB8G7.310759$bY5.1235789@news-server.bigpond.net.au> <c31cdc29.0111070630.64bed4ba@posting.google.com> NNTP-Posting-Host: bein.inf.fu-berlin.de (160.45.111.122) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: fu-berlin.de 1005150518 36047526 160.45.111.122 (16 17 19) X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.3 i686) X-Accept-Language: de-AT, de, en