(*^ ::[ Information = "This is a Mathematica Notebook file. It contains ASCII text, and can be transferred by email, ftp, or other text-file transfer utility. It should be read or edited using a copy of Mathematica or MathReader. If you received this as email, use your mail application or copy/paste to save everything from the line containing (*^ down to the line containing ^*) into a plain text file. On some systems you may have to give the file a name ending with ".ma" to allow Mathematica to recognize it as a Notebook. The line below identifies what version of Mathematica created this file, but it can be opened using any other version as well."; FrontEndVersion = "NeXT Mathematica Notebook Front End Version 2.2"; NeXTStandardFontEncoding; fontset = title, inactive, noPageBreakBelow, noPageBreakInGroup, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, L1, e8, 24, "Times"; ; fontset = subtitle, inactive, noPageBreakBelow, noPageBreakInGroup, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, L1, e6, 18, "Times"; ; fontset = subsubtitle, inactive, noPageBreakBelow, noPageBreakInGroup, nohscroll, preserveAspect, groupLikeTitle, center, M7, italic, L1, e6, 14, "Times"; ; fontset = section, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, grayBox, M22, bold, L1, a20, 18, "Times"; ; fontset = subsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, blackBox, M19, bold, L1, a15, 14, "Times"; ; fontset = subsubsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, whiteBox, M18, bold, L1, a12, 12, "Times"; ; fontset = text, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12; fontset = smalltext, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 10, "Times"; ; fontset = input, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeInput, M42, N23, bold, L1, 12, "Courier"; ; fontset = output, output, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L-5, 12, "Courier"; ; fontset = message, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L1, 12, "Courier"; ; fontset = print, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L1, 12, "Courier"; ; fontset = info, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L1, 12, "Courier"; ; fontset = postscript, PostScript, formatAsPostScript, output, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeGraphics, M7, l34, w282, h287, L1, 12, "Courier"; ; fontset = name, inactive, noPageBreakInGroup, nohscroll, preserveAspect, M7, italic, B65535, L1, 10, "Times"; ; fontset = header, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, italic, L1, 12, "Times"; ; fontset = leftheader, 12; fontset = footer, inactive, nohscroll, noKeepOnOnePage, preserveAspect, center, M7, italic, L1, 12, "Times"; ; fontset = leftfooter, 12; fontset = help, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12; fontset = clipboard, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12; fontset = completions, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12, "Courier"; ; fontset = special1, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12; fontset = special2, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12; fontset = special3, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12; fontset = special4, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12; fontset = special5, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12; paletteColors = 128; magnification = 125; currentKernel; ] :[font = title; inactive; preserveAspect; startGroup] Eigenvalues and Eigenvectors :[font = subsection; inactive; Cclosed; preserveAspect; startGroup] What are they??? :[font = text; inactive; preserveAspect] Good question. Let's get right to the point. Let A be a square n ´ n matrix (these are the only kind of matrices for which eigenvalues and eigenvectors will be defined). An eigenvector of A is a NONZERO vector x in Rn (or Cn, if we are working over complex nos), such that for some scalar number l, we have A x = l x The number l is called an eigenvalue of the matrix A, and the vector x is called an eigenvector belonging to (or corresponding to) the eigenvalue l. Observe that the eigenvalue l is allowed to be the 0 scalar, but eigenvectors x are, by definition, never the 0 vector. (Question: what does it tell you about a matrix that 0 is an eigenvalue of it?) Mathematica knows all about eigenvalues and eigenvectors. Click the following cells. ;[s] 31:0,0;70,1;71,2;181,3;192,4;223,5;224,6;231,7;232,8;239,9;240,10;315,11;316,12;341,13;342,14;357,15;358,16;373,17;383,18;420,19;421,20;436,21;460,22;465,23;481,24;500,25;501,26;534,27;535,28;589,29;590,30;810,-1; 31:1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = input; preserveAspect] a = {{4,0,1},{-2,1,0},{-2,0,1}} :[font = input; preserveAspect] MatrixForm[a] :[font = input; preserveAspect] Eigenvalues[a] :[font = input; preserveAspect] Eigenvectors[a] :[font = text; inactive; preserveAspect] Curious, isn't it? Let's try another example. :[font = input; preserveAspect] b = {{3,2},{-1,0}} :[font = input; preserveAspect] Eigenvalues[b] :[font = input; preserveAspect] Eigenvectors[b] :[font = text; inactive; preserveAspect] Let's check some of these proposed values: :[font = input; preserveAspect] a . {0,1,0} :[font = input; preserveAspect] a. {-1,2,2} :[font = input; preserveAspect] a.{-1,1,1} :[font = input; preserveAspect] b.{-1,1} :[font = text; inactive; preserveAspect] What do you think is the number of eigenvalues of a given matrix A? O. K.,... try this :[font = input; preserveAspect] c = {{-2,-1},{5,2}} :[font = input; preserveAspect] Eigenvalues[c] :[font = input; preserveAspect] Eigenvectors[c] :[font = text; inactive; preserveAspect] What do you say about your answer to the previous question? :[font = text; inactive; preserveAspect] So what is the general story? You'll find out more technical details in class lecture, but here are some of the basic points about eigenvalues and eigenvectors: A has eigenvalue l iff A x = l x, for some nonzero vector x iff A x - l x = 0, x nonzero iff (A - l I) x = 0, x nonzero iff x is a nonzero element of the Null Space of (A - l I) iff rank (A - l I) < n = size of A iff det (A - l I) = 0. But observe that the det above is just a polynomial of degree n in the variable l. The last equation above is called the characteristic equation of A. It will have exactly n roots, if we allow for repetitions and complex numbers. Once we have found all eigenvalues of A, we can always find the appropriate Null Space and hence all eigenvectors belonging to each eigenvalue. By the way, this Null Space has a name: it is called the eigenspace corresponding to the eigenvalue l. As an example, click the following cell: ;[s] 30:0,0;184,1;185,2;202,3;203,4;260,5;261,6;309,7;310,8;353,9;354,10;404,11;405,12;440,13;441,14;494,15;495,16;568,17;570,18;589,19;590,20;632,21;655,22;684,23;686,24;953,25;996,26;997,27;1000,28;1040,29;1051,-1; 30:1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0; :[font = input; preserveAspect] Det[a - lambda*IdentityMatrix[3]] :[font = input; preserveAspect] Factor[Det[a-lambda*IdentityMatrix[3]]] :[font = input; preserveAspect] Det[c - lambda*IdentityMatrix[2]] :[font = text; inactive; preserveAspect] Now fill in the next cell with one of the eigenvalues of the matrix a before doing the subsequent cell: ;[s] 3:0,0;68,1;69,2;104,-1; 3:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = input; preserveAspect] eval = 1 :[font = input; preserveAspect] NullSpace[a-eval*IdentityMatrix[3]] :[font = text; inactive; preserveAspect] So now you see that the Eigenvector command is really calculating null spaces. Once you have calculated the null spaces you have a complete listing, in principle, of all the eigenvectors and values of the matrix. Actually, you specify a basis for the null space of the matrix a - lambda*IdentityMatrix[n]. This space, the eigenspace of the matrix a corresponding to the eigenvalue lambda, has one vector in it which is not an eigenvector. Which one is it? A complete listing of all eigenvalues and eigenspaces of the matrix A is called the eigensystem of the matrix A. In principle, you should be able to calculate eigensystems by hand. Of course, in practice this may be difficult. Mathematica knows about these systems and can help us out. Click the follow cells: ;[s] 11:0,0;279,1;280,2;352,3;353,4;386,5;392,6;550,7;561,8;697,9;708,10;779,-1; 11:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = input; preserveAspect] ? Eigensystem :[font = input; preserveAspect] Eigensystem[a] :[font = input; preserveAspect; endGroup] :[font = subsection; inactive; Cclosed; preserveAspect; startGroup] Why are they??? :[font = text; inactive; preserveAspect] This is a good question and the answer could go on and on. We will try to indicate their importance for one special class of problems, namely, discrete dynamical systems. Here is how such a system is described: one starts with an initial state vector x0. Now to pass from one state vector to the next, one uses the rule xn+1 = A xn, where xk means the kth state vector. The matrix A is fixed for the dynamical system. It is called the transition matrix of the system. You have already seen one such example, namely, Markov chains. There are others, from fields like biology and economics. Let's try to understand how state vectors change in the case of the matrix A from the previous section. ;[s] 11:0,0;259,1;260,2;336,3;339,4;347,5;348,6;364,7;366,8;465,9;482,10;730,-1; 11:1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = input; preserveAspect] x0 = {1,1,1} :[font = input; preserveAspect] a.x0 :[font = input; preserveAspect] a.a.x0 :[font = input; preserveAspect] a.a.a.x0 :[font = input; preserveAspect] a.a.a.a.x0 :[font = input; preserveAspect] a.a.a.a.a.x0 :[font = text; inactive; preserveAspect] What do you predict will be the next state, approximately? What do you get if you divide the above vector by its largest component? Now compare these to the eigenvectors and eigenvalues of A. Now do the whole sequence above with another random vector x0. Next try the same thing with the matrix b. Repeat the above type of sequence. ;[s] 5:0,0;256,1;257,2;300,3;301,4;339,-1; 5:1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = input; preserveAspect] x0 = {1,1} :[font = text; inactive; preserveAspect] What's going on here? Here is a start on an explanation: Notice that x2 = A x1 = A A x0, x3 = A x2 = A A A x0, etc. See the pattern? xn = An x0. So, to understand how a dynamical system works, what we really need to know is how the powers of the transition matrix A behave. But in general, this is very hard!!! Here is a case we can handle: what if A is diagonal? ;[s] 19:0,0;72,1;73,2;81,3;82,4;91,5;92,6;104,7;105,8;113,9;114,10;124,11;125,12;157,13;158,14;164,15;165,16;167,17;168,18;405,-1; 19:1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = input; preserveAspect] d = {{1, 0, 0}, {0, 2, 0}, {0, 0, 3}} :[font = input; preserveAspect] MatrixForm[d] :[font = input; preserveAspect] MatrixForm[d.d] :[font = input; preserveAspect] MatrixForm[d.d.d] :[font = text; inactive; preserveAspect] See what's going on? It's easy to show this FACT: For a (square) diagonal matrix D and positive integer n the matrix Dn is computed from D by raising each diagonal entry of D to the nth power. By the way, one can use this fact to answer a question that we will be interested in in the next section: When do the positive powers of D tend to a constant matrix? Answer....? Now for a more general A. Let's take a 3 ´ 3 matrix A. What if we could find three linearly independent eigenvectors v1, v2, and v3? We would have A v1 = l1 v1 A v2 = l2 v2 A v3 = l3 v3, æl1 0 0 ö Or: A [v1, v2, v3] = [v1, v2, v3] . ÷ 0 l2 0 ç è 0 0 l3 ø Now set P = [v1, v2, v3] and set D = DiagonalMatrix[l1,l2, l3]. Then P is invertible . (Why?) Moreover, the above equation, if multiplied on the left by P-1, gives the equation P-1 A P = D. Consider D D = (P-1 A P ) (P-1 A P ) =P-1 A A P = P-1 A2 P. In general, the same holds for the nth powers of A and D. Finally, multiply on the left and right by P and P-1 to obtain: KEY FACT: If there is a matrix P such that P-1 A P = D, then for all positive integers n, An = P Dn P-1. Call a matrix A diagonalizable if there exists an invertible matrix P such that P-1 A P is a diagonal matrix. What is the story here? Notice that all the steps we performed are reversible. So what we have really shown (for the case n = 3, but the same argument works in general) is the following important fact: KEY FACT (Diagonalization Theorem): Let A be an n´n matrix. Then A is diagonalizable if and only if there exists a basis of eigenvectors v1, v2, ... , vn of A (i.e. v1, v2, ... , vn are linearly independent) for Rn. Moreover, in this case the matrix P = [v1, v2, ... , vn] is nonsingular and P-1 A P is a diagonal matrix with the eigenvalues of A along its main diagonal. Just as an aside, here is a very handy fact worth knowing: FACT: A set of eigenvectors of the matrix A which correspond to distinct eigenvalues of A must necessarily be linearly independent. Nice application: APPLICATION: If the n´n matrix A has n distinct eigenvalues, then A is diagonalizable. Let's carry out this whole program on the matrix a of the previous section. ;[s] 139:0,0;127,1;128,2;436,3;437,4;515,5;516,6;519,7;520,8;527,9;528,10;553,11;554,12;558,13;559,14;560,15;562,16;563,17;571,18;572,19;576,20;577,21;578,22;580,23;581,24;589,25;590,26;594,27;595,28;596,29;598,30;599,31;611,32;613,33;614,34;624,35;625,36;636,37;637,38;640,39;641,40;644,41;645,42;652,43;653,44;656,45;657,46;660,47;661,48;665,49;666,50;671,51;672,52;673,53;679,54;680,55;690,56;691,57;700,58;701,59;702,60;703,61;704,62;724,63;725,64;728,65;729,66;732,67;733,68;764,69;765,70;766,71;767,72;768,73;769,74;771,75;772,76;773,77;871,78;873,79;900,80;902,81;936,82;938,83;947,84;949,85;958,86;960,87;969,88;970,89;972,90;974,91;975,92;977,93;1091,94;1093,95;1104,96;1154,97;1155,98;1157,99;1203,100;1210,101;1211,102;1220,103;1221,104;1224,105;1226,106;1248,107;1262,108;1316,109;1318,110;1610,111;1611,112;1704,113;1705,114;1708,115;1709,116;1718,117;1720,118;1735,119;1736,120;1739,121;1740,122;1749,123;1750,124;1784,125;1785,126;1829,127;1830,128;1833,129;1834,130;1843,131;1844,132;1868,133;1870,134;2192,135;2193,136;2212,137;2213,138;2346,-1; 139:1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = input; preserveAspect] s = Eigensystem[a] :[font = input; preserveAspect] d = DiagonalMatrix[s[[1]]] :[font = input; preserveAspect] p = Transpose[s[[2]]] :[font = input; preserveAspect] MatrixForm[a.p] :[font = input; preserveAspect] MatrixForm[p . d] :[font = input; preserveAspect] d - Inverse[p].a.p :[font = input; preserveAspect] a - p.d.Inverse[p] :[font = text; inactive; preserveAspect] Finally, let's verify the above equation, say for the fifth power of A: :[font = input; preserveAspect] p . d.d.d.d.d . Inverse[p] :[font = input; preserveAspect; endGroup] a.a.a.a.a :[font = subsection; inactive; Cclosed; preserveAspect; startGroup] Foxes and Chickens??? :[font = text; inactive; preserveAspect] Yes, foxes and chickens. Consider the following problem: a population of foxes and chickens enjoys a predator/prey relationship which is modelled as a linear relationship. The coefficients that model the relationship are determined experimentally, and one parameter, the kill rate k (of chickens by foxes ) varies with different populations and locales. If Fn and Cn are the fox and chicken populations at the beginning of year n, then the population in the following year is given by Fn+1 = 0.6 Fn + 0.5 Cn Cn+1 = -k Fn + 1.2 Cn Can you attach a meaning to each of the coefficients? In matrix form we can write the column vector [Fi, Ci] as xi and express the formula as xi+1 = A xi, where the matrix A = {{0.6, 0.5}, {-k, 1.2}}. Click the following cell: ;[s] 33:0,0;285,1;286,2;364,3;365,4;371,5;372,6;434,7;435,8;496,9;499,10;509,11;510,12;521,13;522,14;526,15;529,16;535,17;536,18;539,19;540,20;551,21;552,22;660,23;661,24;664,25;665,26;673,27;674,28;706,29;709,30;717,31;718,32;798,-1; 33:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = input; preserveAspect] a = {{0.6, 0.5},{-k, 1.2}} :[font = text; inactive; preserveAspect] Now here is the question: for what values of the kill rate k will the fox and chicken populations die out? For what values will it grow without bound? Is there a value for which the populations will stabilize? Here is where Mathematica really shines ! We recognize this as a discrete linear dynamical system. From our earlier discussion, we realize that the growth of the state vector depends on the largest eigenvalue (in absolute value). If this eigenvalue is greater than one, we expect that some part of the population will grow without bound. If it is smaller than one we expect that both populations will die out in time. If it is equal to one, we expect that the populations will stabilize. So let's make a graph of the size of the eigenvalues (in absolute value) of the matrix a as a function of the parameter k: ;[s] 9:0,0;61,1;62,2;231,3;242,4;805,5;806,6;840,7;841,8;843,-1; 9:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = input; preserveAspect] s[k_] := Max[Abs[Eigenvalues[a]]] :[font = input; preserveAspect] Plot[s[k],{k,0,2}] :[font = text; inactive; preserveAspect] Now narrow the graph a little and see if you can find a value of k for which the largest eigenvalue is about 1 and test this value on the population x below. ;[s] 3:0,0;65,1;66,2;160,-1; 3:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = input; preserveAspect] x = {100,1000} :[font = input; preserveAspect] k = .5 :[font = input; preserveAspect] a.a.a.a.x :[font = input; preserveAspect] a.a.a.a.a.a.a.a.x :[font = input; preserveAspect] a.a.a.a.a.a.a.a.a.a.a.a.x :[font = input; preserveAspect] a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.x :[font = text; inactive; preserveAspect; endGroup] Conclusions ??? :[font = subsection; inactive; Cclosed; preserveAspect; startGroup] Exercises :[font = text; inactive; preserveAspect] Find the eigenvalues and eigenvectors for the following matrices. Which are diagonalizable? :[font = text; inactive; preserveAspect] æ3 5 7ö 1) A = ç0 2 1÷ è1 4 6ø ;[s] 12:0,0;25,1;26,2;33,3;34,4;56,5;57,6;64,7;65,8;91,9;92,10;99,11;100,-1; 12:1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0; :[font = text; inactive; preserveAspect] æ1 0 3 5 7ö ç2 -1 7 0 8÷ (Hint: use NSolve[] to approximate the eigenvalues 2) B = ÷-5 2 4 0 -1ç and find each eigenspace separately.) ç 3 2 0 -6 3 ç è 1 0 2 -1 2ø ;[s] 20:0,0;26,1;27,2;40,3;41,4;68,5;69,6;82,7;83,8;173,9;174,10;188,11;189,12;271,13;272,14;286,15;287,16;314,17;315,18;328,19;329,-1; 20:1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0; :[font = text; inactive; preserveAspect] æ20 5 0ö 3) C = ç -8 32 1 ç è 1 1 23ø ;[s] 13:0,0;26,1;27,2;37,3;38,4;43,5;61,6;62,7;73,8;74,9;117,10;118,11;129,12;130,-1; 13:1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0; :[font = text; inactive; preserveAspect; endGroup; endGroup] 4) For each matrix, find the characteristic polynomial P(x), and evaluate it at that matrix. (i.e., if the characteristic polynomial for the matrix D is x2 + 2 x - 1, evaluate D2 + 2 D - I2.) ;[s] 7:0,0;168,1;170,2;205,3;206,4;216,5;217,6;220,-1; 7:1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0; ^*)