Spectral Radius

We wrote the program radius.c to compute the largest eigenvalue of a matrix using the power method. For the data file A.dat the output of this program is
n=4
(1 3) (6 1) (0 1) (1 0) 
(0 4) (-1 2) (4 0.2) (0 1) 
(1 1) (2 2) (3 3) (4 4) 
(6 0) (-1.2 2.3) (3.1 4.5) (-1 0) 
lambda=4.28214 6.06714
lambda=6.51923 6.26749
lambda=7.16173 7.29069
lambda=7.1359 7.13804
lambda=7.44994 7.27844
lambda=7.33535 7.34779
lambda=7.38929 7.29725
lambda=7.38333 7.34983
lambda=7.36579 7.32334
lambda=7.38217 7.32954
This indicates the largest eigenvalue is approximately 7.38+7.33i and therefore the spectral radius

ρ(A) ≈ sqrt(7.382+7.332) ≈ 10.4.

This can be verified by using the linear algebra program GNU Octave with the script check.m, which has output

GNU Octave, version 3.2.4
Copyright (C) 2009 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type `warranty'.

Octave was configured for "i486-pc-linux-gnu".

Additional information about Octave is available at http://www.octave.org.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/help-wanted.html

Report bugs to  (but first, please read
http://www.octave.org/bugs.html to learn how to write a helpful report).

For information about changes from previous versions, type `news'.

A =

 Columns 1 through 3:

   1.00000 + 3.00000i   6.00000 + 1.00000i   0.00000 + 1.00000i
   0.00000 + 4.00000i  -1.00000 + 2.00000i   4.00000 + 0.20000i
   1.00000 + 1.00000i   2.00000 + 2.00000i   3.00000 + 3.00000i
   6.00000 + 0.00000i  -1.20000 + 2.30000i   3.10000 + 4.50000i

 Column 4:

   1.00000 + 0.00000i
   0.00000 + 1.00000i
   4.00000 + 4.00000i
  -1.00000 + 0.00000i

lambda =

   7.3757 + 7.3276i
   1.6028 + 5.7916i
  -0.7272 - 4.1148i
  -6.2513 - 1.0044i


Last Updated: Wed Sep 17 11:22:30 PDT 2014