<?xml version="1.0" encoding="utf-8" ?> <!-- for emacs: -*- coding: utf-8 -*- --> <!-- Apache may like this line in the file .htaccess: AddCharset utf-8 .html --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd" > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head><title>eigenvectors -- find eigenvectors of a matrix over RR or CC</title> <link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/> </head> <body> <table class="buttons"> <tr> <td><div><a href="_eigenvectors_lp..._cm_sp__Hermitian_sp_eq_gt_sp..._rp.html">next</a> | <a href="_eigenvalues_lp..._cm_sp__Hermitian_sp_eq_gt_sp..._rp.html">previous</a> | <a href="_eigenvectors_lp..._cm_sp__Hermitian_sp_eq_gt_sp..._rp.html">forward</a> | <a href="_eigenvalues_lp..._cm_sp__Hermitian_sp_eq_gt_sp..._rp.html">backward</a> | up | <a href="index.html">top</a> | <a href="master.html">index</a> | <a href="toc.html">toc</a> | <a href="http://www.math.uiuc.edu/Macaulay2/">Macaulay2 web site</a></div> </td> </tr> </table> <hr/> <div><h1>eigenvectors -- find eigenvectors of a matrix over RR or CC</h1> <div class="single"><h2>Synopsis</h2> <ul><li><div class="list"><dl class="element"><dt class="heading">Usage: </dt><dd class="value"><div><tt>(eigvals, eigvecs) = eigenvectors M</tt></div> </dd></dl> </div> </li> <li><div class="single">Inputs:<ul><li><span><tt>M</tt>, <span>a <a href="___Matrix.html">matrix</a></span>, or a <a href="___Mutable__Matrix.html" title="the class of all mutable matrices">MutableMatrix</a> over <a href="___R__R.html" title="the class of all real numbers">RR</a> or <a href="___C__C.html" title="the class of all complex numbers">CC</a>, which is a square n by n matrix</span></li> </ul> </div> </li> <li><div class="single">Outputs:<ul><li><span><tt>eigvals</tt>, <span>a <a href="___Vertical__List.html">vertical list</a></span>, a list of the eigenvalues of <tt>M</tt></span></li> <li><span><tt>eigvecs</tt>, <span>a <a href="___Matrix.html">matrix</a></span>, or <span>a <a href="___Mutable__Matrix.html">mutable matrix</a></span>, if <tt>M</tt> is one), whose columns are the corresponding eigenvectors of <tt>M</tt></span></li> </ul> </div> </li> <li><div class="single"><a href="_using_spfunctions_spwith_spoptional_spinputs.html">Optional inputs</a>:<ul><li><span><a href="_eigenvectors_lp..._cm_sp__Hermitian_sp_eq_gt_sp..._rp.html">Hermitian => ...</a>, -- Hermitian=>true means assume the matrix is symmetric or Hermitian</span></li> </ul> </div> </li> </ul> </div> <div class="single"><h2>Description</h2> <div>The resulting matrix is over <a href="___C__C.html" title="the class of all complex numbers">CC</a>, and contains the eigenvectors of <tt>M</tt>. The lapack library is used to compute eigenvectors of real and complex matrices.<p/> Recall that if <tt>v</tt> is a non-zero vector such that <tt>Mv = av</tt>, for a scalar a, then <tt>v</tt> is called an eigenvector corresponding to the eigenvalue <tt>a</tt>.<table class="examples"><tr><td><pre>i1 : M = matrix{{1, 2}, {5, 7}} o1 = | 1 2 | | 5 7 | 2 2 o1 : Matrix ZZ <--- ZZ</pre> </td></tr> <tr><td><pre>i2 : eigenvectors M o2 = ({-.358899}, | -.827138 -.262266 |) {8.3589 } | .561999 -.964996 | o2 : Sequence</pre> </td></tr> </table> If the matrix is symmetric (over <a href="___R__R.html" title="the class of all real numbers">RR</a>) or Hermitian (over <a href="___C__C.html" title="the class of all complex numbers">CC</a>), this information should be provided as an optional argument <tt>Hermitian=>true</tt>. In this case, the resulting eigenvalues will be returned as real numbers, and if <tt>M</tt> is real, the matrix of of eigenvectors will be real.<table class="examples"><tr><td><pre>i3 : M = matrix {{1, 2}, {2, 1}} o3 = | 1 2 | | 2 1 | 2 2 o3 : Matrix ZZ <--- ZZ</pre> </td></tr> <tr><td><pre>i4 : (e,v) = eigenvectors(M, Hermitian=>true) o4 = ({-1}, | -.707107 .707107 |) {3 } | .707107 .707107 | o4 : Sequence</pre> </td></tr> <tr><td><pre>i5 : class \ e o5 = {RR} {RR} o5 : VerticalList</pre> </td></tr> <tr><td><pre>i6 : v o6 = | -.707107 .707107 | | .707107 .707107 | 2 2 o6 : Matrix RR <--- RR 53 53</pre> </td></tr> </table> </div> </div> <div class="single"><h2>Caveat</h2> <div>The eigenvectors are approximate.</div> </div> <div class="single"><h2>See also</h2> <ul><li><span><a href="_eigenvalues.html" title="find eigenvalues of a matrix">eigenvalues</a> -- find eigenvalues of a matrix</span></li> <li><span><a href="___S__V__D.html" title="singular value decomposition of a matrix">SVD</a> -- singular value decomposition of a matrix</span></li> </ul> </div> <div class="waystouse"><h2>Ways to use <tt>eigenvectors</tt> :</h2> <ul><li>eigenvectors(Matrix)</li> <li>eigenvectors(MutableMatrix)</li> </ul> </div> </div> </body> </html>