-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathchapter6.tex
More file actions
3255 lines (3045 loc) · 117 KB
/
Copy pathchapter6.tex
File metadata and controls
3255 lines (3045 loc) · 117 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
% Split Eigen-analysis and Complex Arithmetic into two chapters
\chapter{Eigen-analysis}
\label{ch_eig}
\section{Eigenvalues and eigenvectors}
\begin{definition}
Let $A$ be an $n\times n$ matrix. A number $\lambda$ and a vector
$\xx$ are called an eigenvalue eigenvector pair if
\begin{enumerate}[(1)]
\item $\xx\ne\zv$
\item $A\xx = \lambda\xx$
\end{enumerate}
\end{definition}
In other words, the action of $A$ on the vector $\xx$ is to stretch or
shrink it by an amount $\lambda$ without changing its direction. We
say $\lambda$ is an eigenvalue of $A$ if there exists a vector $\xx$
so that $\lambda$ and $\xx$ are an eigenvalue eigenvector pair.
Notice that we do not allow $\xx=\zv$. If we did, any number $\lambda$
would be an eigenvalue. However we do allow $\lambda=0$. Saying that
$0$ is an eigenvalue of $A$ means that there is a non-zero solution
$\xx$ (the eigenvector) of $A\xx=0\xx=\zv$. So we see that $0$ is an
eigenvalue of $A$ precisely when $A$ is not invertible.
Let's look at some examples. Consider first the matrix of reflection
about a line making an angle of $\theta$ with the $x$ axis shown in
Figure~\ref{fig_refeig}. Let $\xx$ be any vector that lies along the
line. Then the reflection doesn't affect $\xx$. This means that $R\xx
= \xx$. In other words, $\xx$ is an eigenvector with eigenvalue $1$. On
the other hand, suppose that $\yy$ is a vector at right angles to the
line. Then the reflection flips $\yy$ into minus itself. So
$R\yy=-\yy$. In other words, $\yy$ is an eigenvector with eigenvalue
$-1$. If we take any other vector and reflect it, we don't end up with
a vector that lies on the same line as the original vector. Thus there
are no further eigenvectors or eigenvalues.
\begin{figure}
\centerline{\includegraphics[height=1.5in]{5_refeig}}
\caption{Eigenvalues and eigenvectors of a 2D reflection.
\label{fig_refeig}}
\end{figure}
An important point to notice is that the eigenvector is not uniquely
determined. The vector $\xx$ could be {\it any} vector along the
line, and $\yy$ could be {\it any} vector orthogonal to the line. In
fact, if we go back to the original definition of eigenvalue and
eigenvector we can see that if $\lambda$ and $\xx$ are an eigenvalue
eigenvector pair, then so are $\lambda$ and $s\xx$ for any non-zero
number $s$, since $s\xx\ne\zv$ and $As\xx=sA\xx=s\lambda \xx =\lambda
s\xx$. So the important thing about an eigenvector is its direction,
not its length. However, there is no such ambiguity in the definition
of the eigenvalue. The reflection matrix has exactly two eigenvalues:
$1$ and $-1$.
In some sense, the reflection matrix $R$ illustrates the most
satisfactory situation. $R$ is a $2\times 2$ matrix with two distinct
eigenvalues. The corresponding eigenvectors $\xx$ and $\yy$ are
linearly independent (in fact they are orthogonal) and form a basis
for two dimensional space. It will be important in applications to
determine whether or not there exists a basis of eigenvectors of a
given matrix. In this example, $\xx$ and $\yy$ are a basis of
eigenvectors of $R$.
As our next example, consider the identity matrix $I$. Since the
identity matrix doesn't change a vector, we have $I\xx=\xx$ for any
vector $\xx$. Thus any vector $\xx$ is an eigenvector of $I$ with
eigenvalue $1$. This example shows that a given eigenvalue may have
many eigenvectors associated with it. However, in this example, there
still exists a basis of eigenvectors: any basis at all is a basis of
eigenvectors of $I$.
Next we will consider the rotation matrix $\ldots$ and run into
trouble. Suppose $R$ is the matrix of rotation by $\pi/4$ ({\em i.e.}
$45^\circ$). Then $R\xx$ is never in the same direction as $\xx$,
since $R$ changes the direction of $\xx$ by $\pi/4$. So $R$ has no
eigenvalues and no eigenvectors. This unfortunate state of affairs
will cause us to make a considerable detour into the theory of complex
numbers. It turns out that if we work with complex numbers rather than
real numbers, then the rotation matrix has eigenvalues too.
\subsection{Computing the eigenvalues and eigenvectors}
We now consider the problem of finding all eigenvalue eigenvector
pairs for a given $n\times n$ matrix $A$. To start, suppose someone
tells you that a particular value $\lambda$ is an eigenvalue of
$A$. How can you find the corresponding eigenvector $\xx$? This
amounts to solving the equation $A\xx=\lambda\xx$ for $\xx$. This can
be rewritten
\[
(A-\lambda I)\xx = \zv,
\]
where $I$ denotes the identity matrix. In other words $\xx$ is a
non-zero solution to a homogeneous equation. It can be found by
Gaussian elimination.
For example, suppose you know that $4$ is an eigenvalue of
\[
\left[\matrix{3&-6&-7\cr 1&8&5\cr -1& -2 & 1\cr}\right].
\]
To find the corresponding eigenvector, we must solve
\[
\left(\left[\matrix{3&-6&-7\cr 1&8&5\cr -1& -2 & 1\cr}\right]
- 4\left[\matrix{1&0&0\cr 0&1&0\cr 0& 0& 1\cr}\right]\right)
\left[\matrix{x_1\cr x_2\cr x_3\cr}\right] =
\left[\matrix{0\cr 0\cr 0\cr}\right].
\]
This can be written
\[
\left[\matrix{-1&-6&-7\cr 1&4&5\cr -1& -2 & -3\cr}\right]
\left[\matrix{x_1\cr x_2\cr x_3\cr}\right] =
\left[\matrix{0\cr 0\cr 0\cr}\right].
\]
To solve this we reduce the matrix. This yields
\[
\left[\matrix{-1&-6&-7\cr 0&-2&-2\cr 0&0&0\cr}\right]
\]
The fact that the rank of this matrix is less than $3$ confirms that
$4$ is indeed an eigenvalue. If the rank of the matrix were $3$ then
the only solution to the equation would be $\zv$ which is not a valid
eigenvector.
Taking $x_3=s$ as a parameter, we find that $x_2=-s$ and
$x_1=-s$. Thus
\[
\xx = s\left[\matrix{-1\cr -1\cr 1\cr}\right]
\]
is an eigenvector (for any non-zero choice of $s$). In particular, we
could take $s=1$. Then
\[
\xx = \left[\matrix{-1\cr -1\cr 1\cr}\right].
\]
When doing calculations by hand, it makes sense to take the scalar
multiple $s$ in the eigenvector calculation so that it simplifies the
form of the eigenvector (clears common denominators in the components, for example).
Eigenvectors computed in MATLAB are normalized (scaled so that they
have length 1).
Now that we have a method for finding the eigenvectors once we know
the eigenvalues, the natural question is: Is there a way to determine
the eigenvalues without knowing the eigenvectors? This is where
determinants come in. The number $\lambda$ is an eigenvector if there
is some non-zero solution $\xx$ to the equation $(A-\lambda
I)\xx=\zv$. In other words, $\lambda$ is an eigenvalue if the matrix
$(A-\lambda I)$ is not invertible. This happens precisely when
$\det(A-\lambda I)=0$.
This gives us a method for finding the eigenvalues. Compute
$\det(A-\lambda I)$. This will be a polynomial in $\lambda$. The
eigenvalues will be exactly the values of $\lambda$ that make this
polynomial zero, i.e., the roots of the polynomial.
So here is the algorithm for finding the eigenvalues and eigenvectors:
\begin{enumerate}[(1)]
\item Compute $\det(A-\lambda I)$ and find the values of $\lambda$ for
which it is zero. These are the eigenvalues.
\item For each eigenvalue, find the non-zero solutions to $(A-\lambda
I)\xx=\zv$. These are the eigenvectors.
\end{enumerate}
I should mention that this is actually only a practical way to find
eigenvalues when the matrix is small. Finding eigenvalues of large
matrices is an important problem and many efficient methods have been
developed for use on computers.
\begin{example} Find the eigenvalues and eigenvectors of
\[
A=\left[\matrix{2&1\cr 1&2\cr}\right].
\]
{\rm First we compute
\begin{eqnarray*}
\det(A-\lambda I) &=& (2-\lambda)(2-\lambda)-1 \\
&=&\lambda^2 - 4\lambda +3
\end{eqnarray*}
We can find the roots of this polynomial using the quadratic formula
or by factoring it by inspection. We get
\[
\lambda^2 - 4\lambda +3 = (\lambda -1)(\lambda -3),
\]
so the eigenvalues are $1$ and $3$. Now we find the eigenvector for
$\lambda=1$. We must solve $(A-I)\xx=\zv$. The matrix for this
homogeneous system of equations is
\[
\left[\matrix{1&1\cr 1&1\cr}\right].
\]
Reducing this matrix yields
\[
\left[\matrix{1&1\cr 0&0\cr}\right]
\]
so an eigenvector is
\[
\left[\matrix{1\cr -1}\right]
\]
Next we find the eigenvector for $\lambda=3$. We must solve $(A-3I)\xx=\zv$.
The matrix for this homogeneous system of equations is
\[
\left[\matrix{-1&1\cr 1&-1\cr}\right]
\]
Reducing this matrix yields
\[
\left[\matrix{-1&1\cr 0&0\cr}\right]
\]
so an eigenvector is
\[
\left[\matrix{1\cr 1}\right].
\]}
\end{example}
\begin{example}
Let us find the eigenvalues and eigenvectors of
\[
A=\left[\matrix{3&-6&-7\cr 1&8&5\cr -1& -2 & 1\cr}\right].
\]
{\rm First we compute
\begin{eqnarray*}
\det(A-\lambda I) &=&
\det\left[\matrix{3-\lambda&-6&-7 \cr
1&8-\lambda&5\cr -1& -2 & 1-\lambda\cr}\right] \\
&=&(3-\lambda)((8-\lambda)(1-\lambda)+10)
+6((1-\lambda)+10)-7(-2+(8-\lambda)) \\
&=&-\lambda^3+12\lambda^2-44\lambda+48
\end{eqnarray*}
It is not always easy to find the zeros of a polynomial of degree
$3$. However, if we already know one solution, we can find the other
two. Sometimes, one can find one solution by guessing. In this case we
already know that $4$ is a solution (since this is the same matrix
that appeared in the example in the last section). We can check this:
\[
-64 +12\times 16 - 44\times 4 - 48 = 0
\]
This means that $\lambda^3+12\lambda^2-44\lambda+48$ can be factored as
$-\lambda^3+12\lambda^2-44\lambda+48=(\lambda - 4)q(\lambda)$, where
$q(\lambda)$ is a second degree polynomial. To find $q(\lambda)$ we can
use long division of polynomials.
\[
\matrix{
& &-\lambda^2 & + 8\lambda &-12\cr
\lambda-4 &\hfill\Big) &-\lambda^3 &+12\lambda^2 &-44\lambda &+48 \cr
& &-\lambda^3 &+4 \lambda^2\cr
& & &8 \lambda^2 &-44\lambda\cr
& & &8 \lambda^2 &-32\lambda\cr
& & & &-12\lambda &+48 \cr
& & & &-12\lambda &+48\cr
}
\]
This yields $q(\lambda)=-\lambda^2 + 8\lambda -12$ This can be
factored using the quadratic formula (or by inspection) as
$q(\lambda)=-(\lambda-2)(\lambda-6)$ So we conclude
\[
-\lambda^3+12\lambda^2-44\lambda+48=-(\lambda - 4)(\lambda-2)(\lambda-6)
\]
and the eigenvalues are $2$, $4$ and $6$.
Now we find the eigenvector for $\lambda=2$. We must solve $(A-2I)\xx=\zv$.
The matrix for this homogeneous system of equations is
\[
\left[\matrix{1&-6&-7\cr 1&6&5\cr -1& -2 & -1\cr}\right]
\]
Reducing this matrix yields
\[
\left[\matrix{1&-6&-7\cr 0&-8&-8\cr 0& 0& 0\cr}\right]
\]
so an eigenvector is
\[
\left[\matrix{1\cr -1\cr 1}\right]
\]
Next we find the eigenvector for $\lambda=4$. We must solve
$(A-4I)\xx=\zv$. The matrix for this homogeneous system of equations
is
\[
\left[\matrix{-1&-6&-7\cr 1&4&5\cr -1& -2 & -3\cr}\right]
\]
Reducing this matrix yields
\[
\left[\matrix{-1&-6&-7\cr 0&-2&-2\cr 0& 0& 0\cr}\right]
\]
so an eigenvector is
\[
\left[\matrix{-1\cr -1\cr 1}\right]
\]
Finally we find the eigenvector for $\lambda=6$. We must solve
$(A-6I)\xx=\zv$. The matrix for this homogeneous system of equations
is
\[
\left[\matrix{-3&-6&-7\cr 1&2&5\cr -1& -2 & -5\cr}\right]
\]
Reducing this matrix yields
\[
\left[\matrix{-3&-6&-7\cr 0&0&8\cr 0& 0& 0\cr}\right]
\]
so an eigenvector is
\[
\left[\matrix{-2\cr 1\cr 0}\right]
\]}
\end{example}
\begin{example} {\bf (Repeated Eigenvalues)}
\label{ch6newex1}
Find the eigenvalues and eigenvectors of
\[
A=\left[\matrix{1&1&0\cr 0&2&0\cr 0&-1&1\cr}\right].
\]
{\rm Consider
\[
\det(A-\lambda I)=\det\left[\matrix{1-\lambda&1&0\cr 0&2-\lambda&0\cr 0&-1&1-\lambda\cr}\right].
\]
In this case it makes sense to expand along the last column. This
yields
\[
\det(A-\lambda I) = 0-0+(1-\lambda)(1-\lambda)(2-\lambda) = (1-\lambda)^2(2-\lambda)
\]
This is already factored, so the zeros are $\lambda=1$ and
$\lambda=2$. Notice that the factor $(1-\lambda)$ occurs occurs to the
second power. In this situation there are fewer distinct eigenvalues
than we expect. Lets compute the eigenvectors. To find the
eigenvectors for $\lambda=1$ we must solve the homogeneous equation
with matrix $A-I$, i.e.,
\[
\left[\matrix{0&1&0\cr 0&1&0\cr 0&-1&0\cr}\right]
\]
This reduces to
\[
\left[\matrix{0&1&0\cr 0&0&0\cr 0&0&0\cr}\right]
\]
and we find that there are two parameters in the solution. The set of
solutions in parametric form is
\[
s\left[\matrix{1\cr 0\cr 0\cr}\right] + t\left[\matrix{0\cr 0\cr 1\cr}\right]
\]
We can find two linearly independent solutions by setting $s=1$, $t=0$
and $s=0$, $t=1$. This gives
\[
\left[\matrix{1\cr 0\cr 0\cr}\right], \left[\matrix{0\cr 0\cr 1\cr}\right]
\]
To find the eigenvectors for $\lambda=2$ we must solve the homogeneous
equation with matrix $A-2I$, i.e.,
\[
\left[\matrix{-1&1&0\cr 0&0&0\cr 0&-1&-1\cr}\right]
\]
This reduces to
\[
\left[\matrix{-1&1&0\cr 0&-1&-1\cr 0&0&0\cr}\right]
\]
and we find that the set of solutions in parametric form is
\[
s\left[\matrix{1\cr 1\cr -1\cr}\right]
\]
Setting $s=1$ gives the eigenvector
\[
\left[\matrix{1\cr 1\cr -1\cr}\right]
\]
In this $3\times 3$ example, even though there are only two distinct
eigenvalues, $1$ and $2$, there are still three independent
eigenvectors (i.e., a basis), because the eigenvalue $1$ has two
independent eigenvectors associated to it.}
\end{example}
\begin{example} {\bf (Repeated Eigenvalues with ``Missing" Eigenvectors)}
\label{ch6newex2}
Find the eigenvalues and eigenvectors of
\[
A=\left[\matrix{2&1\cr 0&2\cr}\right].
\]
{\rm Here
\[
\det(A-\lambda I) = (\lambda - 2)^2
\]
so there is only one eigenvalues $\lambda = 2$. To find the
eigenvectors, we must solve the homogeneous system with matrix
\[
\left[\matrix{0&1\cr 0&0\cr}\right].
\]
The solutions are
\[
s\left[\matrix{1\cr 0\cr}\right]
\]
so there is only one eigenvector direction. So here is a matrix
that does not have a basis of eigenvectors. Matrices like
this, that have too few eigenvectors, will not be studied further in this course,
but they do occur in applications.}
\end{example}
\subsection{Complex eigenvalues and eigenvectors}
Since eigenvalues are found as roots of polynomials, we now see that
they can be complex. A discussion of complex eigenvalues and
eigenvectors is given below.
\begin{example}
Lets consider the matrix of rotation by $\pi/2$. This is the matrix
\[
A=\left[\matrix{0&1\cr -1&0\cr}\right].
\]
{\rm We compute
\[
\det(A-\lambda I) = \det\left[\matrix{-\lambda&1\cr -1&-\lambda\cr}\right]
=\lambda^2+1
\]
The roots are $\pm i$ so the eigenvalues are $i$ and $-i$.
Now we compute the eigenvector corresponding to the eigenvalue $i$. We must
solve the homogeneous equation with matrix
\[
\left[\matrix{-i&1\cr -1&-i\cr}\right]
\]
Notice that we will have to do complex arithmetic to achieve this,
since the matrix now has complex entries. To reduce this matrix we
have to add $i$ times the first row to the second row. This gives
\[
\left[\matrix{-i&1\cr -1+-i^2&-i+i\cr}\right]=
\left[\matrix{-i&1\cr0&0\cr}\right]
\]
So if we let the $x_2=s$, then $-i x_1+s=0$, or $x_1= -is$. So the
solution is
\[
s\left[\matrix{-i\cr 1\cr}\right]
\]
and we may choose $s=1$. Lets check that this is really an eigenvector:
\[
\left[\matrix{0&1\cr -1&0\cr}\right]\left[\matrix{-i\cr 1\cr}\right]
=\left[\matrix{1\cr i\cr}\right]= i\left[\matrix{-i\cr 1\cr}\right].
\]
To find the other eigenvector we can use a trick. Suppose that the
original matrix $A$ has only real entries. This will always be the
case in our examples. Suppose that $A$ has a complex eigenvalue
eigenvector pair $\lambda$ and $\xx$. Then $A\xx = \lambda
\xx$. Taking the complex conjugate of this equation, we obtain $\bar
A\bar\xx=\bar\lambda\bar\xx$. (Here conjugating a matrix or a vector
just means conjugating each entry). Now, since $A$ has real entries,
$\bar A = A$. Hence $A\bar\xx=\bar\lambda\bar\xx$. In other words
$\bar\lambda$ is an eigenvalue with eigenvector $\bar\xx$. In the
present example, we already know that $\bar i = -i $ is an eigenvalue.
But now we don't have to compute the eigenvector that goes along with
it. It is simply the conjugate of the one we already computed. So the
eigenvector corresponding to $-i$ is
\[
\left[\matrix{i\cr 1\cr}\right]
\] }
\end{example}
The eigenvalues of $A$ are the zeros or roots of the polynomial
$\det(A-\lambda I)$. If we use complex numbers then $\det(A-\lambda
I)$ can be completely factored, i.e.,
\[
\det(A-\lambda
I)=\pm(\lambda-\lambda_1)(\lambda-\lambda_2)\cdots(\lambda-\lambda_n)
\]
Finding the roots may be difficult. However for $2\times 2$ matrices we may
use the quadratic formula.
If all the roots are distinct (i.e., $\lambda_i \ne \lambda_j$ for $i
\ne j$) then the corresponding eigenvectors $\xx_1,\xx_2,\ldots,\xx_n$
are linearly independent (I didn't show you why this is true, so I'm
just asking you to believe it!) and therefore form a basis.
If there are repeated roots, then there are fewer than $n$ distinct
eigenvalues. In this situation, it might happen that there are not
enough eigenvectors to form a basis . However it also might happen that
more than one eigenvector associated to a given eigenvalue, so that in
the end there are enough eigenvectors to form a basis.
Compare Examples~\ref{ch6newex1} and~\ref{ch6newex2} from earlier,
where we saw that either situation can occur. Unfortunately,
the only way we have to find out is to try to compute them all.
\subsection{MATLAB}
\label{s_MATeig}
When applied to a square matrix $\bf A$, {\tt eig(A)} will return the
eigenvalues and the eigenvectors of $\bf A$. To use this command enter
the following in MATLAB:
\begin{verbatim}
>> [P,D] = eig(A)
\end{verbatim}
What will be returned is a matrix {\tt P} with the normalized (unit
length) eigenvectors of {\tt A} in its columns, and a matrix {\tt D}
with the eigenvalues of {\tt A} along it's diagonal. The eigenvalue
corresponding to the $i^{th}$ column of {\tt P} is found in the
$(i,i)$ position of {\tt D}. Using the {\tt eig} command
above will return complex eigenvalues and eigenvectors when present.
\vspace{2mm}
\begin{example}
Consider $A$
\begin{equation}
{\bf A} = \left[
\begin{array}{ccc}
1 & 4 & 5 \\
6 & 3 & 9 \\
2 & 7 & 8
\end{array}
\right]
\end{equation}
We can enter {\tt A} into MATLAB and find its eigenvectors and
eigenvalues with the following commands:
\begin{verbatim}
>> A=[1 4 5; 6 3 9; 2 7 8];
>> [P,D] = eig(A)
P =
-0.3919 -0.5895 0.2238
-0.6401 -0.5446 -0.8511
-0.6609 0.5966 0.4750
D =
15.9657 0 0
0 -0.3653 0
0 0 -3.6004
\end{verbatim}
These results tell us that $A$ has eigenvectors $\lbrace
v_{1},v_{2},v_{3}\rbrace$ and corresponding eigenvalues $\lbrace
\lambda_{1},\lambda_{2},\lambda_{3}\rbrace$ as follows:
\begin{eqnarray*}
\lbrace v_{1},v_{2},v_{3}\rbrace &\approx&
\left\lbrace
\left( \begin{array}{c}
-0.3919 \\
-0.6401 \\
-0.6609
\end{array}
\right),
\left( \begin{array}{c}
-0.5895 \\
-0.5446 \\
0.5966
\end{array}
\right),
\left( \begin{array}{c}
0.2238 \\
-0.8511 \\
0.4750
\end{array}
\right) \right\rbrace \\ \lbrace
\lambda_{1},\lambda_{2},\lambda_{3}\rbrace &\approx & \lbrace 15.9657,
-0.3653, -3.6004 \rbrace
\end{eqnarray*}
\end{example}
\subsection{Problems}
\begin{problem}
\label{op4_1}
Show that $\left[\matrix{1\cr 1\cr}\right]$ and $\left[\matrix{1\cr
-1\cr}\right]$ are eigenvectors for the matrix $\left[\matrix{1&1\cr
1&1\cr}\right]$. What are the corresponding eigenvalues?
\end{problem}
\begin{problem}
\label{op4_2}
Suppose $P$ is a projection matrix. What are the eigenvalues and
eigenvectors of $P$?
\end{problem}
\begin{problem}
\label{op4_3}
Find the eigenvalues and eigenvectors for
\[
\matrix{
a)\quad\left[\matrix{0&3\cr 3&0\cr}\right]&
b)\quad\left[\matrix{-2&-8\cr 4&10\cr}\right]&
c)\quad\left[\matrix{29&-10\cr 105&-36\cr}\right]&
d)\quad\left[\matrix{-9&-14\cr 7&12\cr}\right]\cr
}
\]
\end{problem}
\begin{problem}
\label{2009_a10_4}
Find the eigenvalues and the corresponding eigenvectors of the matrix $$\left[\begin{array}{cc}2&3\\2&1\end{array}\right].$$
\end{problem}
\begin{problem}
\label{op4_4}
Find the eigenvalues and eigenvectors for
\[
\matrix{
a)\quad\left[\matrix{0&-1&1\cr 1&0&2\cr 2&0&2\cr}\right]&
b)\quad\left[\matrix{1&1&1\cr 1&0&-2\cr 1&-1&1\cr}\right]&
c)\quad\left[\matrix{7&-9&-15\cr 0&4&0\cr 3&-9&-11\cr}\right]&
d)\quad\left[\matrix{31&-100&70\cr 18&-59&42\cr 12&-40&29\cr}\right]\cr
}
\]
\end{problem}
\begin{problem}
\label{2009_a10_5}
Let $P$ be a $2\times 2$ transitional probability matrix in the form $$\left[\begin{array}{cc}p_{11}&1-p_{22}\\1-p_{11}&p_{22}\end{array}\right].$$
Prove that one of the eigenvalues of $P$ must be 1, and another one must be in the interval $[-1,1]$. (Hint: Let $c = p_{11} + p_{22}$.)
\end{problem}
\begin{problem}
\label{2009_a11_1}
Find the eigenvalues and the corresponding eigenvectors of
the following matrix.
$$
A=\left[\begin{array}{ccc}
0 & 1 & -1\\
5 & 0 & 1\\
0 & 1 & -1
\end{array}\right]
$$
\end{problem}
\begin{problem}
\label{2009_a11_2}
Find the eigenvalues and the corresponding eigenvectors of
the following matrix.
$$
A=\left[\begin{array}{ccc}
2 & 0 & 1\\
0 & 2 & 1\\
1 & 0 & 2
\end{array}\right]
$$
\end{problem}
\begin{problem}
\label{2009_a11_3}
Is there a rank two matrix M, such that vectors
$\overrightarrow{v}_{\mu_1}=[1,2,3]^T$ and
$\overrightarrow{v}_{\mu_2}=[3,2,1]^T$ are eigenvectors of M, both
corresponding to the same eigenvalue $\mu_1=\mu_2=-1$? If your
answer is yes then find such a matrix, and if your answer is no,
then justify your answer.
\end{problem}
\begin{problem}
\label{2009_a10_4b}
Find the eigenvalues and the corresponding eigenvectors of the matrix $$\left[\begin{array}{cc}2&3\\-2&-1\end{array}\right].$$
\end{problem}
\begin{problem}
\label{2009_a11_4}
Given a $2\times 2$ matrix
$$
A=\left[\begin{array}{cc}
a & i \\
i & b
\end{array}\right]
$$
a, Find values for $a$ and $b$ that $A^2=A$.
b, Find values for $a$ and $b$ that $A^3=A$ and $A^4\neq A$.
c, Find values for $a$ and $b$ that $A^8\neq A$ and $A^9 = A$.
\end{problem}
\begin{problem}
\label{2009_a11_5}
Like in the previous question, given a $2\times 2$ matrix
$$
A=\left[\begin{array}{cc}
a & i \\
i & b
\end{array}\right]
$$
a, Find values for $a$ and $b$ that the two eigenvalues of $A$ are
$\mu_1=2+i$ and $\mu_2=2-i$.
b, Find the eigenvectors of $A$ in the previous question. (where
the two eigenvalues are $2\pm i$)
\end{problem}
\section{Eigenanalysis simplifies matrix powers}
In the previous section we learnt how to find eigenvalues and
eigenvectors of a matrix, including the case when they are
complex. There are two main uses of this eigenanalysis: efficiently
computing powers of a matrix (studied in this section) and in the
solution of differential equations considered in Section~\ref{s_de}
below.
Recall that in the random walk application in Section~\ref{s_random}
we were interested in high powers of a matrix, specifically
\[
\lim_{n \rightarrow \infty} P^n \xx^{(0)}
\]
where $P$ is the matrix of transition probabilities and $\xx^{(0)}$ is
the column vector of initial probabilities. We will explore the use of
eigenanalysis to simplify our understanding of these kind of
problems in two examples below.
\begin{example}
\label{ex_sorcrevisited}
We consider again the sorcerers' duel in Example~\ref{ex_sorceror1}. We
will consider what happens if the duel is allowed to continue without
limit until there is a winner.
Rather than compute
\[
\lim_{n \rightarrow \infty} P^n \xx^{(0)}
\]
numerically in MATLAB as was done in Section~\ref{s_random} we will use an
eigenanalysis of $P$ to understand this limit.
{\rm The transition matrix for this problem is
\[
P = \left[ \matrix{0 & 1/2 & 0 & 0 \cr 2/3 & 0 & 0 & 0 \cr
1/3 & 0 & 1 & 0 \cr 0 & 1/2 & 0 & 1} \right]
\]
with initial state $\xx^{(0)} = (1, 0, 0, 0)^T$. The eigenanalysis of $P$
is summarized below:
\begin{eqnarray*}
\lambda_1 =1 & & \kk_1 = (0,0,1,0)^T \\
\lambda_2 =1 & & \kk_2 = (0,0,0,1)^T \\
\lambda_3 =\frac{1}{\sqrt{3}} & & \kk_3 = (1-\sqrt{3},\frac{2}{\sqrt{3}}
(1-\sqrt{3}),\frac{1}{\sqrt{3}},1)^T \\
\lambda_4 =-\frac{1}{\sqrt{3}} & & \kk_4 = (1+\sqrt{3},-\frac{2}{\sqrt{3}}
(1+\sqrt{3}),-\frac{1}{\sqrt{3}},1)^T
\end{eqnarray*}
Note that $\lambda=1$ is a repeated eigenvalue but there there is still a
basis of eigenvectors (the set of eigenvectors associated with $\lambda=1$ is
two-dimensional). We can write
\begin{equation}
\label{eq_eigcoeff}
\xx^{(0)} = c_1 \kk_1 + c_2 \kk_2 + c_3 \kk_3 + c_4 \kk_4
\end{equation}
for some coefficients $c_1$, $c_2$, $c_3$ and $c_4$ uniquely determined.
Equation (\ref{eq_eigcoeff}) can be written in matrix-vector form
\begin{equation}
\label{eq_coeffsys}
T \cc = \xx^{(0)}
\end{equation}
where $\cc = (c_1, c_2, c_3, c_4)^T$ and $T$ is the $4 \times 4$
matrix with eigenvectors $\kk_1$, $\kk_2$, $\kk_3$ and $\kk_4$ in its columns.
Solving (\ref{eq_coeffsys}) (I used MATLAB) gives $c_1 = 1/2$, $c_2 = 1/2$,
$c_3 \approx -0.6830$ and $c_4 \approx 0.1830$. With these values of $\cc$
(\ref{eq_eigcoeff}) is a representation of $\xx^{(0)}$ as a linear
combination of eigenvectors of $P$. This makes working out later states
$\xx^{(n)}$ easy, as shown below.
\begin{eqnarray*}
\xx^{(1)} & = & P \xx^{(0)} = P(c_1 \kk_1 + c_2 \kk_2
+ c_3 \kk_3 + c_4 \kk_4) \\
& = & c_1 \lambda_1 \kk_1 + c_2 \lambda_2 \kk_2 +
c_3 \lambda_3 \kk_3 + c_4 \lambda_4 \kk_4 \\
& = & c_1 \kk_1 + c_2 \kk_2 +
\frac{1}{\sqrt{3}} c_3 \kk_3 -\frac{1}{\sqrt{3}} c_4 \kk_4
\end{eqnarray*}
where in the middle line we have remembered that the $\kk_i$ vectors
are eigenvectors, so $P \kk_i = \lambda \kk_i$ for $i=1,2,3,4$.
Similarly
\[
\xx^{(2)} = P \xx^{(1)} = P^2 \xx^{(0)} =
c_1 \kk_1 + c_2 \kk_2 +
\frac{1}{3} c_3 \kk_3 +\frac{1}{3} c_4 \kk_4
\]
and
\begin{equation}
\label{eq_useful}
\xx^{(n)} = P^n \xx^{(0)} =
c_1 \kk_1 + c_2 \kk_2 +
\left(\frac{1}{\sqrt{3}}\right)^n c_3 \kk_3
+\left(-\frac{1}{\sqrt{3}}\right)^n c_4 \kk_4
\end{equation}
This formula (\ref{eq_useful}) is a simple formula for the state at any
time $n$ that does not involve much computational work. In addition, it
is easy to see from this formula that
\[
\lim_{n \rightarrow \infty} \xx^{(n)} = (0,0,1/2,1/2)^T
\]
as found numerically in Example \ref{ex_sorceror1}
}
\end{example}
\begin{example}
\label{ex_weather}
The weather in Vancouver is either good, average or
bad on any given day. If the weather is good on any day, there is a
60\% chance the weather will be good, 30\% chance average, and 10\%
bad on the next day. If the weather is average, then on the next day
there is a 40\% chance of good, 30\% of average and 30\% of bad
weather. If the weather is bad then on the next day there is a 40\%
chance of good, 50\% of average and 10\% of bad. If the weather is
good today, what will the weather be like a long time from now?
{\rm We number the states
\begin{enumerate}[1)]
\item good
\item average
\item bad
\end{enumerate}
The corresponding transition matrix is
\[
P = \frac{1}{10} \left[
\matrix{ 6 & 4 & 4 \cr 3 & 3 & 5 \cr 1 & 3 & 1} \right]
\]
The initial state is $\xx^{(0)} = [1, 0, 0]^T$.
The eigenanalysis of $P$ is summarized below:
\begin{eqnarray*}
\lambda_1 =1, & & \kk_1 = [1/2, 1/3, 1/6]^T \\
\lambda_2 =0.2, & & \kk_2 = [-2, 1, 1]^T \\
\lambda_3 =-0.2, & & \kk_1 = [0, -1, 1]^T
\end{eqnarray*}
As above, we put the eigenvectors into the columns of a matrix $T$ and
solve
\[
T \cc = (1,0,0)^T
\]
for $\cc = (1,-1/4,1/12)$. The right hand side $(1,0,0)^T$ of the
system above corresponds to the initial state $\xx^{(0)}$ of good
weather. As before, this gives us the representation of the initial
state as a linear combination of the eigenvectors:
\[
\xx^{(0)} = \kk_1 - \frac{1}{4} \kk_2 + \frac{1}{12} \kk_3.
\]
Again, we see that multiplying by $P$ in this representation leads to
an easy formula since $\kk_i$ are eigenvectors:
\[
\xx^{(n)} = P^n \xx^{(0)} = \kk_1 - \frac{1}{4} (0.2)^n \kk_2 +
\frac{1}{12} (-0.2^n) \kk_3
\]
Note that after a long time ($n \rightarrow \infty$) the second and third terms
above tend to zero, so
\[
\lim_{n \rightarrow \infty} x^{(n)} = \kk_1 = (1/2, 1/3, 1/6)
\]
so after a long time after the first nice day, the weather will have a
1/2 chance of being good, 1/3 average and 1/6 bad.
}
\end{example}
Let us consider the example above a bit more closely. Intuitively, the
weather after a long time should not depend on what it was like the
day you started. In fact, we can show that
\begin{equation}
\label{eq_equilibrium}
\lim_{n \rightarrow \infty} x^{(n)} = \kk_1
\end{equation}
for any starting probability $x^{(0)}$ (for which the entries must be
non-negative and sum to one).
To show this, we have to show that writing
\begin{equation}
\label{eq_prsum}
\xx^{(0)} = c_1 \kk_1 + c_2 \kk_2 + c_3 \kk_3
\end{equation}
always gives $c_1 =1$ no matter what $\xx^{(0)}$ is. Note that the entries
of $\kk_2$ and $\kk_3$ sum to zero and the entries of $\kk_1$ and $x^{(0)}$
sum to one. So by summing the entries of (\ref{eq_prsum}) we see that
$c_1 = 1$ which shows that (\ref{eq_equilibrium}) is true for
any starting probability $x^{(0)}$ as our intuition predicted.
The probability $\kk_1$ that all initial states tend to is called an
{\em equilibrium probability}. In some cases described in the theorem
below you can guarantee the existence of an equilibrium probability.
\begin{theorem}
\label{thm:eq_probability}
If $P$ is a transition matrix (non-negative entries with
all columns summing to one) that in addition has all positive entries
then $P$ has an eigenvalue 1 with a single eigenvector $\kk_1$ that can
chosen to be a probability vector. All other eigenvalues $\lambda$
satisfy $|\lambda|<1$ with eigenvectors with components that sum to
zero. Thus,
\[
\lim_{n \rightarrow \infty} x^{(n)} = \kk_1
\]
for any $x^{(0)}$. That is, $\kk_1$ is an equilibrium probability.
\end{theorem}
Note that the Example~\ref{ex_weather} the transition matrix satisfied the
conditions of the theorem and had a equilibrium probability.
The transition matrix of Example~\ref{ex_sorcrevisited} did not
satisfy the conditions of the theorem and does not have an
equilibrium probability (depending on the initial state, you can tend
to different fractions of times that each sorcerer wins the duel).
We can summarize the process used to analyze these examples:
writing a vector $\xx$
(the initial probability in our examples)
as a linear combination of eigenvectors of a matrix $A$ (the
transition matrix for our examples) then easily writing
$A^n \xx$ as a linear combination of eigenvectors. This process
can be summarized in matrix-vector notation as Diagonalization discussed
in more detail in Section~\ref{s_diagonalization}.
\subsection{Problems}
\begin{problem}
\label{2009_a12_1}
Find the eigenvalues and corresponding eigenvectors of the stochastic matrix $P$ below. Use the eigenvectors and eigenvalues to describe
$$
\lim_{n\rightarrow\infty}P^nx^{(0)},
$$
where $x^{(0)}=[1,0,0]^T$, and
$$
P=\left[\begin{array}{ccc}
0&\frac{1}{4}&\frac{1}{2}\\ \frac{1}{2}&\frac{1}{2}&\frac{1}{2}\\ \frac{1}{2}&\frac{1}{4}&0
\end{array}
\right]
$$
\end{problem}
\begin{problem}
\label{2009_a12_2}
What is the necessary condition on $a$ and $b$, for $P$ having an equilibrium probability? Find the equilibrium probability vector (if it exists) for $a=b=1/4$.
$$
P=\left[\begin{array}{ccc}
\frac{1}{4}&\frac{1}{3}&\frac{1}{2}\\ \frac{1}{2}&\frac{1}{3}&b\\ \frac{1}{4}&\frac{1}{3}&a
\end{array}
\right]
$$
\end{problem}
\section{Systems of linear differential equations}
\label{s_de}
Consider the system of differential equations
\begin{equation}
\label{eq:desys}
\matrix{
y_1'(t) &= a_{1,1} y_1(t) &+ a_{1,2} y_2(t)\cr
y_2'(t) &= a_{2,1} y_1(t) &+ a_{2,2} y_2(t)\cr
}
\end{equation}
This system of equations describes a situation where we have two
quantities $y_1$ and $y_2$, where the rate of change of each one of
the quantities depends on the values of both. We can rewrite this as
a matrix equation. Let $\yy(t)$ be the vector
\[
\yy(t) = \left[\matrix{y_1(t)\cr y_2(t)\cr}\right],
\]
and define the derivative of a vector to be the vector of derivatives, i.e.,
\[
\yy'(t) = \left[\matrix{y_1'(t)\cr y_2'(t)\cr}\right].
\]
Define $A$ to be the matrix
\[
A = \left[\matrix{a_{1,1}&a_{1,2}\cr a_{2,1}&a_{2,2}\cr}\right].
\]
Then the system of equations (\ref{eq:desys}) can be rewritten
\[
\yy'(t)=A\yy.
\]
A general system of linear equations has this form, except $\yy(t)$ is
an $n$-dimensional vector and $A$ is an $n\times n$ matrix. How can
we find solutions to such a system of equations? Taking a hint from
the scalar case, we can try to find solutions of the form
\[
\yy(t) = e^{\lambda t}\xx
\]
where $\xx$ is a fixed vector (not depending on $t$). With this definition
\[
\yy'(t) = \lambda e^{\lambda t}\xx
\]
so that $\yy'=A\yy$ whenever
\[
\lambda e^{\lambda t}\xx = A e^{\lambda t}\xx = e^{\lambda t}A\xx
\]
Dividing by $e^{\lambda t}$, this condition becomes
\[
\lambda\xx = A\xx.
\]
In other words, $\yy(t) = e^{\lambda t}\xx$ is a solution exactly
whenever $\lambda$ and $\xx$ are an eigenvalue eigenvector pair for
$A$. So we can find as many solutions as we have eigenvalue
eigenvector pairs.
To proceed we first notice that if $\yy_1(t)$ and $\yy_2(t)$ are two
solutions to the equation $\yy'=A\yy$, then a linear combination
$c_1\yy_1(t)+c_2\yy_2(t)$ is also a solution, since
\begin{eqnarray*}
{{d}\over{dt}}\Big(c_1\yy_1(t)+c_2\yy_2(t)\Big)
&=&c_1\yy_1'(t)+c_2\yy_2'(t) \\
&=&c_1A\yy_1(t)+c_2A\yy_2(t) \\
&=&A\Big(c_1\yy_1(t)+c_2\yy_2(t)\Big)
\end{eqnarray*}
Notice that we are assuming that the constants $c_1$ and $c_2$ do not
depend on $t$. Similarly, if $\yy_1(t)$, $\yy_2(t)$, $\ldots$,
$\yy_n(t)$ are $n$ solutions then $c_1\yy_1(t)+c_2\yy_2(t)+\cdots
+c_n\yy_n(t)$ is a solution for any choice of constants
$c_1,c_2,\ldots, c_n$.
Now suppose that $A$ is an $n\times n$ matrix. Suppose that
$\lambda_1,\lambda_2,\ldots,\lambda_k$ are its eigenvalues with
eigenvectors $\xx_1, \xx_2, \ldots, \xx_k$. Then we have that for any
choice of constants $c_1, c_2, \ldots, c_k$,
\begin{equation}
\label{eq_gensoln}
\yy(t) = c_1e^{\lambda_1 t}\xx_1 + c_2e^{\lambda_2 t}\xx_2
+\cdots + c_ke^{\lambda_k t}\xx_k
\end{equation}
is a solution. Have we found all solutions? In other words, could
there be a solution of the equation that is not this form, or is every
solution of the form (\ref{eq_gensoln}) for some choice of $c_1, c_2,
\ldots, c_k$?
There is a theorem in differential equations that says that given an
initial condition $\xx_0$ there is one and only one solution of
$\yy' = A\yy$ satisfying $\yy(0)=\yy_0$. So our theoretical question
above is equivalent to the following quite practical question. Given
an initial vector $\yy_0$, does there exist a solution $\yy(t)$ of the
form (\ref{eq_gensoln}) whose value at zero is the given initial condition,