1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
<HTML>
<HEAD>
<TITLE>Eigenvectors and eigenvalues</TITLE>
</HEAD>
<BODY bgcolor="#FFFFFF" fgcolor="#000000">
<P>
<font size="+3" color="green"><B>Eigenvectors and eigenvalues</B></font></P>
<P>
<TABLE border="1" cols="2" frame="box" rules="all" width="572">
<TR>
<TD width="15%" valign="top"><B>Syntax</B>:</TD>
<TD width="85%"><CODE>
y = EIGEN(m)</CODE>
</TD></TR>
</table></p>
<p>
If matrix <code>m</code> is an <code>n</code> by <code>n</code> symmetric matrix,
then <CODE>EIGEN(m)</CODE> returns a matrix with <code>n</code> rows and
<code>n+1</code> columns. Column <code>n+1</code> contains the eigenvalues, while columns <code>1</code>
through <code>n</code> are the eigenvectors of the symmetric matrix <code>m</code>.
The eigenvector <code>x</code> and the eigenvalue <code>s</code> of matrix
<code>m</code> satisfy the equation:
<code>m<>x = s*x</code>.</p>
<p>
One way to check a result is with the following script:</p>
<p>
<font color="blue"><pre>
e=EIGEN(m)
n=vlen(m)[1]
DO j = [1:n]
=m<>e[*,j]-e[j,n+1]*e[*,j] ! these should be all zero (or close to zero)
ENDDO
</pre></font></p>
<p>
<font size="+1" color="green">Example</font></p>
<p>
The following commands:</p>
<p>
<font color="blue"><pre>
m=[[2;-1;0;0];[-1;2;-1;0];[0;-1;2;-1];[0;0;-1;2]]
e=eigen(m)
</pre></font></p>
<p>
produces:
<pre>
matrix m
2 -1 0 0
-1 2 -1 0
0 -1 2 -1
0 0 -1 2
matrix e
0.371748 0.601501 0.601501 -0.371748 0.381966
0.601501 0.371748 -0.371748 0.601501 1.38197
0.601501 -0.371748 -0.371748 -0.601501 2.61803
0.371748 -0.601501 0.601501 0.371748 3.61803
</pre></p>
<p>
The eigenvalues are <code>e[*,5] = [0.381966;1.38197;2.61803;3.61803]</code></p>
<p>
The four eigenvectors are <code>e[*,j]</code> for <code>j=[1:4]</code></p>
<P>
<a href="../Dilog/dilog.htm"><img align="top" border="0" src="../../../shadow_left.gif">
<font size="+1" color="olive">Dilog function</font></a><br />
<a href="../EllipticIntegrals/ellipticintegrals.htm">
<img align="top" border="0" src="../../../shadow_right.gif">
<font size="+1" color="olive">Elliptic integrals</font></a>
</P>
</BODY>
</HTML>
|