{"id":728,"date":"2013-07-22T12:00:14","date_gmt":"2013-07-22T17:00:14","guid":{"rendered":"https:\/\/blogs.mathworks.com\/cleve\/?p=728"},"modified":"2013-08-05T14:08:51","modified_gmt":"2013-08-05T19:08:51","slug":"eigshow-week-2","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/cleve\/2013\/07\/22\/eigshow-week-2\/","title":{"rendered":"eigshow, week 2"},"content":{"rendered":"\r\n<div class=\"content\"><!--introduction--><p>Three more examples with <tt>eigshow<\/tt>, all of them degenerate in some way or another.<\/p><!--\/introduction--><h3>Contents<\/h3><div><ul><li><a href=\"#2bbdf94a-cef3-4f75-99ea-ef7f686cd3a0\">A scalar matrix<\/a><\/li><li><a href=\"#45fe17ab-ca4c-49dd-b82b-a7b19a1c60f0\">A singular matrix<\/a><\/li><li><a href=\"#fd038ca7-1ffc-448f-912f-5ad462345c7e\">A defective matrix<\/a><\/li><\/ul><\/div><h4>A scalar matrix<a name=\"2bbdf94a-cef3-4f75-99ea-ef7f686cd3a0\"><\/a><\/h4><p>The first example is a scalar multiple of the identity matrix. It is not available from the pull-down menu in the <tt>eigshow<\/tt> title, but <tt>eigshow<\/tt> can be called with a 2-by-2 matrix argument.<\/p><pre class=\"codeinput\">format <span class=\"string\">rat<\/span>, format <span class=\"string\">compact<\/span>\r\nA = [5 0; 0 5]\/4\r\n<\/pre><pre class=\"codeoutput\">A =\r\n       5\/4            0       \r\n       0              5\/4     \r\n<\/pre><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/cleve\/eigshowp_w2a.gif\" alt=\"\"> <\/p><p>The blue ellipse is a circle.  <tt>Ax<\/tt> is always equal to <tt>(5\/4)*x<\/tt> and so <tt>A*x<\/tt> is always parallel to <tt>x<\/tt>. <i>Any<\/i> vector is an eigenvector.  <tt>5\/4<\/tt> is a double eigenvalue. <tt>eigshow<\/tt> chooses two unit vectors as the eigenvectors but it could have chosen any two vectors.<\/p><h4>A singular matrix<a name=\"45fe17ab-ca4c-49dd-b82b-a7b19a1c60f0\"><\/a><\/h4><pre class=\"codeinput\">A = [2 4; 2 4]\/4\r\n<\/pre><pre class=\"codeoutput\">A =\r\n       1\/2            1       \r\n       1\/2            1       \r\n<\/pre><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/cleve\/eigshowp_w2b.gif\" alt=\"\"> <\/p><p>The blue ellipse has collapsed to a line.  It may be a hard to see when <tt>A*x<\/tt> is parallel to <tt>x<\/tt>, but it is when <tt>x<\/tt> itself is in the line, or when <tt>A*x<\/tt> is the zero vector.  The corresponding eigenvalues are <tt>3\/2<\/tt> (the half-length of the line) and zero. [Note added Aug. 5, 2013: This is not correct.  See my comment posted today.]<\/p><h4>A defective matrix<a name=\"fd038ca7-1ffc-448f-912f-5ad462345c7e\"><\/a><\/h4><pre class=\"codeinput\">A = [6 4; -1 2]\/4\r\n<\/pre><pre class=\"codeoutput\">A =\r\n       3\/2            1       \r\n      -1\/4            1\/2     \r\n<\/pre><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/cleve\/eigshowp_w2c.gif\" alt=\"\"> <\/p><p>Matrices with this type of behavior are rare, but important. The blue ellipse is not degenerate, but as you move around the unit circle <tt>Ax<\/tt> lines up parallel for only one <tt>x<\/tt> and its negative. This is a matrix of order two with only <i>one<\/i> eigenvector. It has a double eigenvalue equal to 1 and a nondiagonal Jordan Canonical Form.  Such matrices are known as <i>defective<\/i> and play an important role in the theory of ordinary differential equations and dynamical systems.<\/p><script language=\"JavaScript\"> <!-- \r\n    function grabCode_762520ca27bc4ea9b6c931c7f85e04a1() {\r\n        \/\/ Remember the title so we can use it in the new page\r\n        title = document.title;\r\n\r\n        \/\/ Break up these strings so that their presence\r\n        \/\/ in the Javascript doesn't mess up the search for\r\n        \/\/ the MATLAB code.\r\n        t1='762520ca27bc4ea9b6c931c7f85e04a1 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 762520ca27bc4ea9b6c931c7f85e04a1';\r\n    \r\n        b=document.getElementsByTagName('body')[0];\r\n        i1=b.innerHTML.indexOf(t1)+t1.length;\r\n        i2=b.innerHTML.indexOf(t2);\r\n \r\n        code_string = b.innerHTML.substring(i1, i2);\r\n        code_string = code_string.replace(\/REPLACE_WITH_DASH_DASH\/g,'--');\r\n\r\n        \/\/ Use \/x3C\/g instead of the less-than character to avoid errors \r\n        \/\/ in the XML parser.\r\n        \/\/ Use '\\x26#60;' instead of '<' so that the XML parser\r\n        \/\/ doesn't go ahead and substitute the less-than character. \r\n        code_string = code_string.replace(\/\\x3C\/g, '\\x26#60;');\r\n\r\n        copyright = 'Copyright 2013 The MathWorks, Inc.';\r\n\r\n        w = window.open();\r\n        d = w.document;\r\n        d.write('<pre>\\n');\r\n        d.write(code_string);\r\n\r\n        \/\/ Add copyright line at the bottom if specified.\r\n        if (copyright.length > 0) {\r\n            d.writeln('');\r\n            d.writeln('%%');\r\n            if (copyright.length > 0) {\r\n                d.writeln('% _' + copyright + '_');\r\n            }\r\n        }\r\n\r\n        d.write('<\/pre>\\n');\r\n\r\n        d.title = title + ' (MATLAB code)';\r\n        d.close();\r\n    }   \r\n     --> <\/script><p style=\"text-align: right; font-size: xx-small; font-weight:lighter;   font-style: italic; color: gray\"><br><a href=\"javascript:grabCode_762520ca27bc4ea9b6c931c7f85e04a1()\"><span style=\"font-size: x-small;        font-style: italic;\">Get \r\n      the MATLAB code <noscript>(requires JavaScript)<\/noscript><\/span><\/a><br><br>\r\n      Published with MATLAB&reg; R2013b<br><\/p><p class=\"footer\"><br>\r\n      Published with MATLAB&reg; R2013b<br><\/p><\/div><!--\r\n762520ca27bc4ea9b6c931c7f85e04a1 ##### SOURCE BEGIN #####\r\n%% eigshow, week 2\r\n% Three more examples with |eigshow|, all of them degenerate in\r\n% some way or another.\r\n%\r\n%% A scalar matrix\r\n% The first example is a scalar multiple of the identity matrix.\r\n% It is not available from the pull-down menu in the |eigshow| title,\r\n% but |eigshow| can be called with a 2-by-2 matrix argument.\r\n\r\nformat rat, format compact\r\nA = [5 0; 0 5]\/4\r\n\r\n%%\r\n%\r\n% <<eigshowp_w2a.gif>>\r\n%\r\n% The blue ellipse is a circle.  |Ax| is always equal to |(5\/4)*x|\r\n% and so |A*x| is always parallel to |x|.\r\n% _Any_ vector is an eigenvector.  |5\/4| is a double eigenvalue.\r\n% |eigshow| chooses two unit vectors as the eigenvectors but it could\r\n% have chosen any two vectors.\r\n\r\n%% A singular matrix\r\n\r\nA = [2 4; 2 4]\/4\r\n\r\n%%\r\n%\r\n% <<eigshowp_w2b.gif>>\r\n%\r\n% The blue ellipse has collapsed to a line.  It may be a hard to see\r\n% when |A*x| is parallel to |x|, but it is when |x| itself is in the line,\r\n% or when |A*x| is the zero vector.  The corresponding eigenvalues are\r\n% |3\/2| (the half-length of the line) and zero. [Note added Aug. 5, 2013:\r\n% This is not correct.  See my comment posted today.]\r\n\r\n%% A defective matrix\r\n\r\nA = [6 4; -1 2]\/4\r\n\r\n%%\r\n%\r\n% <<eigshowp_w2c.gif>>\r\n%\r\n% Matrices with this type of behavior are rare, but important.\r\n% The blue ellipse is not degenerate, but as you move around the\r\n% unit circle |Ax| lines up parallel for only one |x| and its negative.\r\n% This is a matrix of order two with only _one_ eigenvector.\r\n% It has a double eigenvalue equal to 1 and a nondiagonal Jordan\r\n% Canonical Form.  Such matrices are known as _defective_ and play an\r\n% important role in the theory of ordinary differential equations and\r\n% dynamical systems.\r\n\r\n##### SOURCE END ##### 762520ca27bc4ea9b6c931c7f85e04a1\r\n-->","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img decoding=\"async\"  class=\"img-responsive\" src=\"https:\/\/blogs.mathworks.com\/images\/cleve\/eigshowp_w2a.gif\" onError=\"this.style.display ='none';\" \/><\/div><!--introduction--><p>Three more examples with <tt>eigshow<\/tt>, all of them degenerate in some way or another.... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/cleve\/2013\/07\/22\/eigshow-week-2\/\">read more >><\/a><\/p>","protected":false},"author":78,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[13,6],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/728"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/users\/78"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/comments?post=728"}],"version-history":[{"count":8,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/728\/revisions"}],"predecessor-version":[{"id":742,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/728\/revisions\/742"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/media?parent=728"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/categories?post=728"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/tags?post=728"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}