This repository has been archived by the owner on Aug 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 172
/
similarity.xml
1262 lines (1068 loc) · 51.5 KB
/
similarity.xml
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
<?xml version="1.0" encoding="UTF-8"?>
<!--********************************************************************
Copyright 2017 Georgia Institute of Technology
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation. A copy of
the license is included in gfdl.xml.
*********************************************************************-->
<restrict-version versions="1554 default">
<section xml:id="similarity">
<title>Similarity</title>
<objectives>
<ol>
<li>Learn to interpret similar matrices geoemetrically.</li>
<li>Understand the relationship between the eigenvalues, eigenvectors, and characteristic polynomials of similar matrices.</li>
<li><em>Recipe:</em> compute <m>Ax</m> in terms of <m>B,C</m> for <m>A=CBC\inv</m>.</li>
<li><em>Picture:</em> the geometry of similar matrices.</li>
<li><em>Vocabulary word:</em> <term>similarity</term>.</li>
</ol>
</objectives>
<introduction>
<p>
Some matrices are easy to understand. For instance, a diagonal matrix
<me>
D = \mat{2 0 ; 0 1/2}
</me>
just scales the coordinates of a vector: <m>D{x\choose y} = {2x\choose y/2}</m>. The purpose of most of the rest of this chapter is to understand complicated-looking matrices by analyzing to what extent they <q>behave like</q> simple matrices. For instance, the matrix
<me>
A = \frac 1{10}\mat{11 6; 9 14}
</me>
has eigenvalues <m>2</m> and <m>1/2</m>, with corresponding eigenvectors <m>v_1 = {2/3\choose 1}</m> and <m>v_2 = {-1\choose 1}</m>. Notice that
<me>
\spalignsysdelims..\syseq{
D(xe_1+ye_2) = xDe_1+yDe_2 = 2xe_1-\frac12ye_2;
A(xv_1+yv_2) = xAv_1+yAv_2\hfil, = 2xv_1-\frac12yv_2\rlap.}
</me>
Using <m>v_1,v_2</m> instead of the usual coordinates makes <m>A</m> <q>behave</q> like a diagonal matrix.
</p>
<figure>
<caption>The matrices <m>A</m> and <m>D</m> behave similarly. Click <q>multiply</q> to multiply the colored points by <m>D</m> on the left and <m>A</m> on the right. (We will see in <xref ref="diagonalization"/> why the points follow hyperbolic paths.)</caption>
<mathbox source="demos/dynamics2.html?mat=2,0:0,1/2&v1=2/3,1&v2=-1,1&y=1,5" height="600px"/>
</figure>
<p>
The other case of particular importance will be matrices that <q>behave</q> like a rotation matrix: indeed, this will be crucial for understanding <xref ref="complex-eigenvalues"/> geometrically. See this <xref ref="similarity-to-rotation"/>.
</p>
<p>
In this section, we study in detail the situation when two matrices behave similarly with respect to different coordinate systems. In <xref ref="diagonalization"/> and <xref ref="complex-eigenvalues"/>, we will show how to use eigenvalues and eigenvectors to find a simpler matrix that behaves like a given matrix.
</p>
</introduction>
<subsection>
<title>Similar Matrices</title>
<p>
We begin with the algebraic definition of similarity.
</p>
<definition>
<idx><h>Similarity</h><h>definition of</h></idx>
<idx><h>Matrix</h><h>similar</h><see>Similarity</see></idx>
<statement>
<p>
Two <m>n\times n</m> matrices <m>A</m> and <m>B</m> are <term>similar</term> if there exists an invertible <m>n\times n</m> matrix <m>C</m> such that <m>A = CBC\inv</m>.
</p>
</statement>
</definition>
<example xml:id="similarity-eg1">
<p>
The matrices
<me>
\mat{-12 15; -10 13} \sptxt{and} \mat{3 0; 0 -2}
</me>
are similar because
<me>
\mat{-12 15; -10 13} = \mat{-2 3; 1 -1} \mat{3 0; 0 -2} \mat{-2 3; 1 -1}\inv,
</me>
as the reader can verify.
</p>
</example>
<example>
<p>
The matrices
<me>
\mat{3 0 ; 0 -2} \sptxt{and} \mat{1 0; 0 1}
</me>
are not similar. Indeed, the second matrix is the identity matrix <m>I_2</m>, so if <m>C</m> is any invertible <m>2\times 2</m> matrix, then
<me>
CI_2C\inv = CC\inv = I_2 \neq \mat{3 0; 0 -2}.
</me>
</p>
</example>
<p>
<idx><h>Similarity</h><h>identity matrix</h></idx>
<idx><h>Identity matrix</h><h>similarity</h></idx>
As in the above example, one can show that <m>I_n</m> is the only matrix that is similar to <m>I_n</m>, and likewise for any scalar multiple of <m>I_n</m>.
</p>
<bluebox>
<p>
Similarity is unrelated to row equivalence. Any invertible matrix is row equivalent to <m>I_n</m>, but <m>I_n</m> is the only matrix similar to <m>I_n</m>. For instance,
<me>\mat{2 1; 0 2} \sptxt{and} \mat{1 0; 0 1}</me>
are row equivalent but not similar.
</p>
</bluebox>
<p>
As suggested by its name, similarity is what is called an <em>equivalence relation</em>. This means that it satisfies the following properties.
</p>
<proposition xml:id="similarity-eq-reln">
<idx><h>Similarity</h><h>equivalence relation</h></idx>
<statement>
<p>
Let <m>A,B</m>, and <m>C</m> be <m>n\times n</m> matrices.
<ol>
<li>
<alert>Reflexivity:</alert> <m>A</m> is similar to itself.
</li>
<li>
<alert>Symmetry:</alert> if <m>A</m> is similar to <m>B</m>, then <m>B</m> is similar to <m>A</m>.
</li>
<li>
<alert>Transitivity:</alert> if <m>A</m> is similar to <m>B</m> and <m>B</m> is similar to <m>C</m>, then <m>A</m> is similar to <m>C</m>.
</li>
</ol>
</p>
</statement>
<proof>
<p>
<ol>
<li>
Taking <m>C = I_n = I_n\inv</m>, we have <m>A = I_n A I_n\inv</m>.
</li>
<li>
Suppose that <m>A = CBC\inv.</m> Multiplying both sides on the left by <m>C\inv</m> and on the right by <m>C</m> gives
<me>
C\inv A C = C\inv(CBC\inv)C = B.
</me>
Since <m>(C\inv)\inv = C</m>, we have <m>B = C\inv A (C\inv)\inv</m>, so that <m>B</m> is similar to <m>A</m>.
</li>
<li>
Suppose that <m>A = DBD\inv</m> and <m>B = ECE\inv</m>. Subsituting for <m>B</m> and remembering that <m>(DE)\inv = E\inv D\inv</m>, we have
<me>
A = D(ECE\inv)D\inv = (DE)C(DE)\inv,
</me>
which shows that <m>A</m> is similar to <m>C</m>.
</li>
</ol>
</p>
</proof>
</proposition>
<example>
<p>
The matrices
<me>\mat{-12 15; -10 13} \sptxt{and} \mat{3 0; 0 -2}</me>
are similar, as we saw in this <xref ref="similarity-eg1"/>. Likewise, the matrices
<me>\mat{-12 15; -10 13} \sptxt{and} \mat{-12 5; -30 13}</me>
are similar because
<me>
\mat{-12 5; -30 13} = \mat{2 -1; 2 1}\mat{-12 15; -10 13}\mat{2 -1; 2 1}\inv.
</me>
It follows that
<me>\mat{-12 5; -30 13} \sptxt{and} \mat{3 0; 0 -2}</me>
are similar to each other.
</p>
</example>
<p>
We conclude with an observation about similarity and powers of matrices.
</p>
<fact xml:id="similarity-powers">
<idx><h>Similarity</h><h>and powers</h></idx>
<idx><h>Matrix multiplication</h><h>powers</h><h>and similarity</h></idx>
<statement>
<p>
Let <m>A = CBC\inv</m>. Then for any <m>n\geq 1</m>, we have
<me>A^n = CB^n C\inv.</me>
</p>
</statement>
<proof visible="true">
<p>
First note that
<me>
A^2 = AA = (CBC\inv)(CBC\inv) = CB(C\inv C)BC\inv = CBI_nBC\inv = CB^2C\inv.
</me>
Next we have
<me>
A^3 = A^2A = (CB^2C\inv)(CBC\inv) = CB^2(C\inv C)BC\inv = CB^3C\inv.
</me>
The pattern is clear.
</p>
</proof>
</fact>
<example>
<statement>
<p>
Compute <m>A^{100}</m>, where
<me>A = \mat{5 13; -2 -5} = \mat{-2 3; 1 -1}\mat{0 -1; 1 0}\mat{-2 3; 1 -1}\inv.</me>
</p>
</statement>
<solution>
<p>
By the <xref ref="similarity-powers"/>, we have
<me>
A^{100} = \mat{-2 3; 1 -1}\mat{0 -1; 1 0}^{100}\mat{-2 3; 1 -1}\inv.
</me>
The matrix <m>\smallmat 0{-1}10</m> is a counterclockwise rotation by <m>90^\circ</m>. If we rotate by <m>90^\circ</m> four times, then we end up where we started. Hence rotating by <m>90^\circ</m> one hundred times is the identity transformation, so
<me>
A^{100} = \mat{-2 3; 1 -1}\mat{1 0; 0 1}\mat{-2 3; 1 -1}\inv
= \mat{1 0; 0 1}.
</me>
</p>
</solution>
</example>
</subsection>
<subsection>
<title>Geometry of Similar Matrices</title>
<idx><h>Similarity</h><h>geometry of</h></idx>
<p>
Similarity is a very interesting construction when viewed geometrically. We will see that, roughly, <em>similar matrices do the same thing in different coordinate systems.</em> The reader might want to review <m>\cB</m>-coordinates and nonstandard coordinate grids in <xref ref="bases-as-coord-systems"/> before reading this subsection.
</p>
<p>
By conditions 4 and 5 of the <xref ref="imt-2"/>, an <m>n\times n</m> matrix <m>C</m> is invertible if and only if its columns <m>v_1,v_2,\ldots,v_n</m> form a basis for <m>\R^n</m>. This means we can speak of the <m>\cB</m>-coordinates of a vector in <m>\R^n</m>, where <m>\cB</m> is the basis of columns of <m>C</m>. Recall that
<me>
[x]_\cB = \vec{c_1 c_2 \vdots, c_n} \sptxt{means}
x = c_1v_1 + c_2v_2 + \cdots + c_nv_n
= \mat{| | ,, |; v_1 v_2 \cdots, v_n; | | ,, |}\vec{c_1 c_2 \vdots, c_n}.
</me>
Since <m>C</m> is the matrix with columns <m>v_1,v_2,\ldots,v_n</m>, this says that <m>x = C[x]_\cB</m>. Multiplying both sides by <m>C\inv</m> gives <m>[x]_\cB = C\inv x.</m> To summarize:
</p>
<bluebox>
<idx><h><m>\cB</m>-coordinates</h><h>change of basis matrix</h></idx>
<p>
Let <m>C</m> be an invertible <m>n\times n</m> matrix with columns <m>v_1,v_2,\ldots,v_n</m>, and let <m>\cB = \{v_1,v_2,\ldots,v_n\}</m>, a basis for <m>\R^n</m>. Then for any <m>x</m> in <m>\R^n</m>, we have
<me>
C[x]_\cB = x \sptxt{and} C\inv x = [x]_\cB.
</me>
This says that <em><m>C</m> changes from the <m>\cB</m>-coordinates to the usual coordinates</em>, and <em><m>C\inv</m> changes from the usual coordinates to the <m>\cB</m>-coordinates.</em>
</p>
</bluebox>
<p>
Suppose that <m>A = CBC\inv.</m> The above observation gives us another way of computing <m>Ax</m> for a vector <m>x</m> in <m>\R^n</m>. Recall that
<m>CBC\inv x = C(B(C\inv x)),</m>
so that multiplying <m>CBC\inv</m> by <m>x</m> means <em>first</em> multiplying by <m>C\inv</m>, <em>then</em> by <m>B</m>, <em>then</em> by <m>C</m>. See this <xref ref="matrix-mult-order-ops"/>.
</p>
<bluebox>
<title>Recipe: Computing <m>Ax</m> in terms of <m>B</m></title>
<idx><h>Similarity</h><h>action on a vector</h></idx>
<p>
Suppose that <m>A = CBC\inv,</m> where <m>C</m> is an invertible matrix with columns <m>v_1,v_2,\ldots,v_n.</m> Let <m>\cB = \{v_1,v_2,\ldots,v_n\}</m>, a basis for <m>\R^n</m>. Let <m>x</m> be a vector in <m>\R^n</m>. To compute <m>Ax</m>, one does the following:
<ol>
<li>
Multiply <m>x</m> by <m>C\inv</m>, which changes to the <m>\cB</m>-coordinates: <m>[x]_\cB = C\inv x</m>.
</li>
<li>
Multiply this by <m>B</m>: <m>B[x]_\cB = BC\inv x</m>.
</li>
<li>
Interpreting this vector as a <m>\cB</m>-coordinate vector, we multiply it by <m>C</m> to change back to the usual coordinates:
<m>Ax = CBC\inv x = CB[x]_\cB.</m>
</li>
</ol>
<latex-code>
\begin{tikzpicture}[scale=.8, thin border nodes]
\draw[help lines] (-3,-3) grid (3,3);
\node at (0, 3.5) {$\cB$-coordinates};
\draw[seq-green, vector] (0, 0) to["{$[x]_\cB$}" above right] (-2, 1);
\draw[seq-red, vector] (0, 0) to["{$B[x]_\cB$}"] (-2, -1);
\draw[->, shorten=2mm, thick] (8, 1) to[bend right]
node[above=1mm] {multiply by $C\inv$} (3, 1);
\draw[->, shorten=2mm, thick] (3, -1) to[bend right]
node[below=1mm] {multiply by $C$} (8, -1);
\point at (0, 0);
\begin{scope}[xshift=11cm]
\draw[help lines] (-3,-3) grid (3,3);
\node at (0, 3.5) {usual coordinates};
\draw[seq-green, vector] (0, 0) to["$x$" below right] (1, 2);
\draw[seq-red, vector] (0, 0) to["$Ax$"] (-1, 2);
\point at (0, 0);
\end{scope}
\end{tikzpicture}
</latex-code>
</p>
<p>
To summarize: if <m>A = CBC\inv</m>, then <m>A</m> and <m>B</m> do the same thing, only in different coordinate systems.
</p>
</bluebox>
<p>
The following example is the heart of this section.
</p>
<specialcase xml:id="similarity-worked-eg">
<idx><h>Similarity</h><h>worked example</h></idx>
<p>
Consider the matrices
<me>
A = \mat{1/2 3/2; 3/2 1/2} \qquad
B = \mat{2 0; 0 -1} \qquad
C = \mat{1 1; 1 -1}.
</me>
One can verify that <m>A = CBC\inv</m>: see this <xref ref="diagonal-eg-22"/>. Let <m>v_1 = {1\choose 1}</m> and <m>v_2 = {1\choose -1}</m>, the columns of <m>C</m>, and let <m>\cB = \{v_1,v_2\}</m>, a basis of <m>\R^2</m>.
</p>
<p>
The matrix <m>B</m> is diagonal: it scales the <m>x</m>-direction by a factor of <m>2</m> and the <m>y</m>-direction by a factor of <m>-1</m>.
<latex-code>
\def\theo{\includegraphics[width=6cm]{theo11.jpg}}
\begin{tikzpicture}[scale=.8, thin border nodes]
\node[transform shape] at (0, 0) {\theo};
\draw[seq-violet, opacity=1, vector] (0,0) -- (1,0) node[right] {$e_1$};
\draw[seq-blue, opacity=1, vector] (0,0) -- (0,1) node[above] {$e_2$};
\point at (0, 0);
\begin{scope}[xshift=10cm, xscale=2, yscale=-1]
\clip (-1.5, -3) rectangle (1.5, 3);
\node[transform shape] at (0, 0) {\theo};
\draw[seq-violet, opacity=1, vector] (0,0) -- (1, 0) node[right] {$Be_1$};
\draw[seq-blue, opacity=1, vector] (0,0) -- (0, 1) node[below] {$Be_2$};
\point at (0, 0);
\end{scope}
\draw (-3, -3) rectangle (3, 3);
\draw[xshift=10cm] (-3, -3) rectangle (3, 3);
\draw[->, shorten=2mm, thick] (3, 1) to[bend left, "$B$" above=.5mm] (7, 1);
\end{tikzpicture}
</latex-code>
To compute <m>Ax</m>, first we multiply by <m>C\inv</m> to find the <m>\cB</m>-coordinates of <m>x</m>, then we multiply by <m>B</m>, then we multiply by <m>C</m> again. For instance, let <m>\textcolor{seq-green}x = {0\choose -2}</m>.
<ol>
<li>
We see from the <m>\cB</m>-coordinate grid below that
<m>\textcolor{seq-green}x = -\textcolor{seq-violet}{v_1} + \textcolor{seq-blue}{v_2}</m>. Therefore, <m>C\inv\textcolor{seq-green}x = \textcolor{seq-green}{[x]_\cB} = {-1\choose 1}.</m>
</li>
<li>
Multiplying by <m>B</m> scales the coordinates: <m>\textcolor{seq-red}{B[x]_\cB} = {-2\choose -1}</m>.
</li>
<li>
Interpreting <m>{-2\choose -1}</m> as a <m>\cB</m>-coordinate vector, we multiply by <m>C</m> to get
<me>
\textcolor{seq-red}{Ax} = C\vec{-2 -1} = -2\textcolor{seq-violet}{v_1} - \textcolor{seq-blue}{v_2} = \vec{-3 -1}.
</me>
Of course, this vector lies at <m>(-2, -1)</m> on the <m>\cB</m>-coordinate grid.
</li>
</ol>
<latex-code>
\begin{tikzpicture}[scale=.85, thin border nodes]
\draw[help lines] (-3,-3) grid (3,3);
\node at (0, 3.5) {$\cB$-coordinates};
\draw[seq-violet, vector, opacity=.5] (0,0) -- (1,0);
\draw[seq-blue, vector, opacity=.5] (0,0) -- (0,1);
\draw[seq-green, vector] (0, 0) to["{$[x]_\cB$}" {above left, pos=1}] (-1, 1);
\draw[seq-red, vector] (0, 0) to["{$B[x]_\cB$}"] (-2, -1);
\draw[->, shorten=2mm, thick] (9, 1) to[bend right]
node[above=1mm] {multiply by $C\inv$} (3, 1);
\node[align=center] (A) at (6, 0)
{scale $x$ by $2$\\scale $y$ by $-1$};
\draw[->, shorten >=2mm, thick] (A) -- (3, 0);
\draw[->, shorten=2mm, thick] (3, -1) to[bend right]
node[below=1mm] {multiply by $C$} (9, -1);
\point at (0, 0);
\begin{scope}[xshift=12cm]
\node at (0, 3.5) {usual coordinates};
\draw[help lines] (-3, -3) rectangle (3, 3);
\path[clip] (-3, -3) rectangle (3, 3);
\begin{scope}[cm={(1,1,1,-1,(0,0))}, scale=.7]
\draw[help lines] (-5,-5) grid (5,5);
\draw[seq-violet, vector, opacity=.5] (0,0) -- (1,0);
\draw[seq-blue, vector, opacity=.5] (0,0) -- (0,1);
\draw[seq-green, vector] (0, 0) to["$x$" left] (-1, 1);
\draw[seq-red, vector] (0, 0) to["$Ax$" above left] (-2, -1);
\end{scope}
\point at (0, 0);
\end{scope}
\end{tikzpicture}
</latex-code>
Now let <m>\textcolor{seq-green}x = \frac 12{5\choose -3}</m>.
<ol>
<li>
We see from the <m>\cB</m>-coordinate grid that
<m>\textcolor{seq-green}x = \frac 12\textcolor{seq-violet}{v_1} + 2\textcolor{seq-blue}{v_2}</m>. Therefore, <m>C\inv\textcolor{seq-green}x = \textcolor{seq-green}{[x]_\cB} = {1/2\choose 2}.</m>
</li>
<li>
Multiplying by <m>B</m> scales the coordinates: <m>\textcolor{seq-red}{B[x]_\cB} = {1\choose -2}</m>.
</li>
<li>
Interpreting <m>{1\choose -2}</m> as a <m>\cB</m>-coordinate vector, we multiply by <m>C</m> to get
<me>
\textcolor{seq-red}{Ax} = C\vec{1 -2} = \textcolor{seq-violet}{v_1} - 2\textcolor{seq-blue}{v_2} = \vec{-1 3}.
</me>
This vector lies at <m>(1, -2)</m> on the <m>\cB</m>-coordinate grid.
</li>
</ol>
<latex-code>
\begin{tikzpicture}[scale=.85, thin border nodes]
\draw[help lines] (-3,-3) grid (3,3);
\node at (0, 3.5) {$\cB$-coordinates};
\draw[seq-violet, vector, opacity=.5] (0,0) -- (1,0);
\draw[seq-blue, vector, opacity=.5] (0,0) -- (0,1);
\draw[seq-green, vector] (0, 0) to["{$[x]_\cB$}" {above left, pos=1}] (1/2, 2);
\draw[seq-red, vector] (0, 0) to["{$B[x]_\cB$}" pos=.7] (1, -2);
\draw[->, shorten=2mm, thick] (9, 1) to[bend right]
node[above=1mm] {multiply by $C\inv$} (3, 1);
\node[align=center] (A) at (6, 0)
{scale $x$ by $2$\\scale $y$ by $-1$};
\draw[->, shorten >=2mm, thick] (A) -- (3, 0);
\draw[->, shorten=2mm, thick] (3, -1) to[bend right]
node[below=1mm] {multiply by $C$} (9, -1);
\point at (0, 0);
\begin{scope}[xshift=12cm]
\node at (0, 3.5) {usual coordinates};
\draw[help lines] (-3, -3) rectangle (3, 3);
\path[clip] (-3, -3) rectangle (3, 3);
\begin{scope}[cm={(1,1,1,-1,(0,0))}, scale=.7]
\draw[help lines] (-5,-5) grid (5,5);
\draw[seq-violet, vector, opacity=.5] (0,0) -- (1,0);
\draw[seq-blue, vector, opacity=.5] (0,0) -- (0,1);
\draw[seq-green, vector] (0, 0) to["$x$" {above right, pos=.7}] (1/2, 2);
\draw[seq-red, vector] (0, 0) to["$Ax$" left] (1, -2);
\end{scope}
\point at (0, 0);
\end{scope}
\end{tikzpicture}
</latex-code>
To summarize:
<ul>
<li>
<m>B</m> scales the <m>e_1</m>-direction by <m>2</m> and the <m>e_2</m>-direction by <m>-1</m>.
</li>
<li>
<m>A</m> scales the <m>v_1</m>-direction by <m>2</m> and the <m>v_2</m>-direction by <m>-1</m>.
</li>
</ul>
<latex-code>
\def\theo{\includegraphics[width=6cm]{theo11.jpg}}
\begin{tikzpicture}[scale=.8, thin border nodes]
\node[transform shape] at (0, 0) {\theo};
\draw[seq-violet, opacity=1, vector] (0,0) -- (1,0) node[right] {$e_1$};
\draw[seq-blue, opacity=1, vector] (0,0) -- (0,1) node[above] {$e_2$};
\point at (0, 0);
\begin{scope}[xshift=9cm, xscale=2, yscale=-1]
\clip (-1.5, -3) rectangle (1.5, 3);
\node[transform shape] at (0, 0) {\theo};
\draw[seq-violet, opacity=1, vector] (0,0) -- (1, 0) node[right] {$Be_1$};
\draw[seq-blue, opacity=1, vector] (0,0) -- (0, 1) node[below] {$Be_2$};
\point at (0, 0);
\end{scope}
\begin{scope}[yshift=-9cm]
\clip (-3, -3) rectangle (3, 3);
\begin{scope}[cm={(1,1,1,-1,(0,0))}]
\node[transform shape] at (0, 0) {\theo};
\draw[seq-violet, opacity=1, vector] (0,0) -- (1,0) node[right] {$v_1$};
\draw[seq-blue, opacity=1, vector] (0,0) -- (0,1) node[right] {$v_2$};
\end{scope}
\point at (0, 0);
\end{scope}
\begin{scope}[yshift=-9cm, xshift=9cm]
\clip (-3, -3) rectangle (3, 3);
\begin{scope}[cm={(1,1,1,-1,(0,0))}]
\begin{scope}[xscale=2, yscale=-1]
\node[transform shape] at (0, 0) {\theo};
\draw[seq-violet, opacity=1, vector] (0,0) -- (1,0) node[right] {$Av_1$};
\draw[seq-blue, opacity=1, vector] (0,0) -- (0,1) node[left] {$Av_2$};
\end{scope}
\end{scope}
\point at (0, 0);
\end{scope}
\draw (-3, -3) rectangle (3, 3);
\draw[xshift=9cm] (-3, -3) rectangle (3, 3);
\draw[yshift=-9cm] (-3, -3) rectangle (3, 3);
\draw[xshift=9cm, yshift=-9cm] (-3, -3) rectangle (3, 3);
\draw[->, shorten=2mm, thick] (3, 1) to[bend left, "$B$" above=.5mm] (6, 1);
\draw[->, shorten=2mm, thick, yshift=-9cm]
(3, -1) to[bend right, "$A$" above=.5mm] (6, -1);
\draw[->, shorten=2mm, thick] (-1, -6) to[bend left, "$C\inv$" right=.5mm] (-1, -3);
\draw[->, shorten=2mm, thick, xshift=9cm]
(1, -3) to[bend left, "$C$" left=.5mm] (1, -6);
\end{tikzpicture}
</latex-code>
</p>
<figure>
<caption>The geometric relationship between the similar matrices <m>A</m> and <m>B</m> acting on <m>\R^2</m>. Click and drag the heads of <m>x</m> and <m>[x]_\cB</m>. Study this picture until you can reliably predict where the other three vectors will be after moving one of them: this is the essence of the geometry of similar matrices.</caption>
<mathbox source="demos/similarity.html?B=2,0:0,-1&C=1,1:1,-1&closed" height="600px"/>
</figure>
</specialcase>
<example hide-type="true" xml:id="similarity-another-matrix">
<title>Interactive: Another matrix similar to <m>B</m></title>
<p>
Consider the matrices
<me>
A' = \frac 15\mat{-8 -9; 6 13} \qquad
B = \mat{2 0; 0 -1} \qquad
C' = \frac 12\mat{-1 -3; 2 1}.
</me>
Then <m>A' = C'B(C')\inv</m>, as one can verify. Let <m>v_1'=\frac 12{-1\choose 2}</m> and <m>v_2' = \frac 12{-3\choose 1}</m>, the columns of <m>C'</m>, and let <m>\cB' = \{v_1',v_2'\}</m>. Then <m>A'</m> does the same thing as <m>B</m>, as in the previous <xref ref="similarity-worked-eg"/>, except <m>A'</m> uses the <m>\cB'</m>-coordinate system. In other words:
<ul>
<li>
<m>B</m> scales the <m>e_1</m>-direction by <m>2</m> and the <m>e_2</m>-direction by <m>-1</m>.
</li>
<li>
<m>A'</m> scales the <m>v_1'</m>-direction by <m>2</m> and the <m>v_2'</m>-direction by <m>-1</m>.
</li>
</ul>
<latex-code>
\def\theo{\includegraphics[width=6cm]{theo6.jpg}}
\begin{tikzpicture}[scale=.8, thin border nodes]
\node[transform shape] at (0, 0) {\theo};
\draw[seq-violet, opacity=1, vector] (0,0) -- (1,0) node[right] {$e_1$};
\draw[seq-blue, opacity=1, vector] (0,0) -- (0,1) node[above] {$e_2$};
\point at (0, 0);
\begin{scope}[xshift=9cm, xscale=2, yscale=-1]
\clip (-1.5, -3) rectangle (1.5, 3);
\node[transform shape] at (0, 0) {\theo};
\draw[seq-violet, opacity=1, vector] (0,0) -- (1, 0) node[right] {$Be_1$};
\draw[seq-blue, opacity=1, vector] (0,0) -- (0, 1) node[below] {$Be_2$};
\point at (0, 0);
\end{scope}
\begin{scope}[yshift=-9cm]
\clip (-3, -3) rectangle (3, 3);
\begin{scope}[cm={(-1/2,1,-3/2,1/2,(0,0))}]
\node[transform shape] at (0, 0) {\theo};
\draw[seq-violet, opacity=1, vector] (0,0) -- (1,0) node[above] {$v_1'$};
\draw[seq-blue, opacity=1, vector] (0,0) -- (0,1) node[left] {$v_2'$};
\end{scope}
\point at (0, 0);
\end{scope}
\begin{scope}[yshift=-9cm, xshift=9cm]
\clip (-3, -3) rectangle (3, 3);
\begin{scope}[cm={(-1/2,1,-3/2,1/2,(0,0))}]
\begin{scope}[xscale=2, yscale=-1]
\node[transform shape] at (0, 0) {\theo};
\draw[seq-violet, opacity=1, vector] (0,0) -- (1,0) node[above=-1mm] {$A'v_1'$};
\draw[seq-blue, opacity=1, vector] (0,0) -- (0,1) node[right] {$A'v_2'$};
\end{scope}
\end{scope}
\point at (0, 0);
\end{scope}
\draw (-3, -3) rectangle (3, 3);
\draw[xshift=9cm] (-3, -3) rectangle (3, 3);
\draw[yshift=-9cm] (-3, -3) rectangle (3, 3);
\draw[xshift=9cm, yshift=-9cm] (-3, -3) rectangle (3, 3);
\draw[->, shorten=2mm, thick] (3, 1) to[bend left, "$B$" above=.5mm] (6, 1);
\draw[->, shorten=2mm, thick, yshift=-9cm]
(3, -1) to[bend right, "$A'$" above=.5mm] (6, -1);
\draw[->, shorten=2mm, thick] (-1, -6) to[bend left, "$(C')\inv$" right=.5mm] (-1, -3);
\draw[->, shorten=2mm, thick, xshift=9cm]
(1, -3) to[bend left, "$C'$" left=.5mm] (1, -6);
\end{tikzpicture}
</latex-code>
</p>
<figure>
<caption>The geometric relationship between the similar matrices <m>A'</m> and <m>B</m> acting on <m>\R^2</m>. Click and drag the heads of <m>x</m> and <m>[x]_{\cB'}</m>.</caption>
<mathbox source="demos/similarity.html?B=2,0:0,-1&C=-1/2,-3/2:1,1/2&closed" height="600px"/>
</figure>
</example>
<example xml:id="similarity-eg-rotation">
<title>A matrix similar to a rotation matrix</title>
<p>
Consider the matrices
<me>
A = \frac 16\mat{7 -17; 5 -7} \qquad
B = \mat{0 -1; 1 0} \qquad
C = \mat{2 -1/2; 1 1/2}.
</me>
One can verify that <m>A = CBC\inv.</m> Let <m>v_1 = {2\choose 1}</m> and <m>v_2 = \frac 12{-1\choose 1}</m>, the columns of <m>C</m>, and let <m>\cB = \{v_1,v_2\}</m>, a basis of <m>\R^2</m>.
</p>
<p>
The matrix <m>B</m> rotates the plane counterclockwise by <m>90^\circ</m>.
<latex-code>
\def\theo{\includegraphics[width=6cm]{theo10.jpg}}
\begin{tikzpicture}[scale=.8, thin border nodes]
\node[transform shape] at (0, 0) {\theo};
\draw[seq-violet, opacity=1, vector] (0,0) -- (1,0) node[right] {$e_1$};
\draw[seq-blue, opacity=1, vector] (0,0) -- (0,1) node[above] {$e_2$};
\point at (0, 0);
\begin{scope}[xshift=10cm]
\clip (-3, -3) rectangle (3, 3);
\begin{scope}[rotate=90]
\node[transform shape] at (0, 0) {\theo};
\draw[seq-violet, opacity=1, vector] (0,0) -- (1, 0) node[above] {$Be_1$};
\draw[seq-blue, opacity=1, vector] (0,0) -- (0, 1) node[left] {$Be_2$};
\end{scope}
\point at (0, 0);
\end{scope}
\draw (-3, -3) rectangle (3, 3);
\draw[xshift=10cm] (-3, -3) rectangle (3, 3);
\draw[->, shorten=2mm, thick] (3, 1) to[bend left, "$B$" above=.5mm] (7, 1);
\end{tikzpicture}
</latex-code>
To compute <m>Ax</m>, first we multiply by <m>C\inv</m> to find the <m>\cB</m>-coordinates of <m>x</m>, then we multiply by <m>B</m>, then we multiply by <m>C</m> again. For instance, let <m>\textcolor{seq-green}x = \frac 32{1\choose 1}</m>.
<ol>
<li>
We see from the <m>\cB</m>-coordinate grid below that
<m>\textcolor{seq-green}x = \textcolor{seq-violet}{v_1} + \textcolor{seq-blue}{v_2}</m>. Therefore, <m>C\inv\textcolor{seq-green}x = \textcolor{seq-green}{[x]_\cB} = {1\choose 1}.</m>
</li>
<li>
Multiplying by <m>B</m> rotates by <m>90^\circ</m>: <m>\textcolor{seq-red}{B[x]_\cB} = {-1\choose 1}</m>.
</li>
<li>
Interpreting <m>{-1\choose 1}</m> as a <m>\cB</m>-coordinate vector, we multiply by <m>C</m> to get
<me>
\textcolor{seq-red}{Ax} = C\vec{-1 1} = -\textcolor{seq-violet}{v_1} + \textcolor{seq-blue}{v_2} = \frac 12\vec{-5 -1}.
</me>
Of course, this vector lies at <m>(-1, 1)</m> on the <m>\cB</m>-coordinate grid.
</li>
</ol>
<latex-code>
\begin{tikzpicture}[scale=.75, thin border nodes]
\node at (0, 3.5) {$\cB$-coordinates};
\begin{scope}[scale=3/2, arrows={[line width=.6pt]}]
\draw[help lines] (-2,-2) grid (2, 2);
\draw[help lines, seq-yellow] (0, 0) circle[radius=1];
\draw[seq-violet, vector, opacity=.5] (0,0) -- (1,0);
\draw[seq-blue, vector, opacity=.5] (0,0) -- (0,1);
\draw[|->, shorten=1.5mm, dashed]
(1,1) arc[radius=sqrt(2), start angle=45, delta angle=90];
\draw[seq-green, vector] (0, 0) -- (1, 1) node[above right] {$[x]_\cB$};
\draw[seq-red, vector] (0, 0) -- (-1, 1) node[above left] {$B[x]_\cB$};
\end{scope}
\draw[->, shorten=2mm, thick] (9, 1) to[bend right]
node[above=1mm] {multiply by $C\inv$} (3, 1);
\node (A) at (6, 0) {rotate by $90^\circ$};
\draw[->, shorten >=2mm, thick] (A) -- (3, 0);
\draw[->, shorten=2mm, thick] (3, -1) to[bend right]
node[below=1mm] {multiply by $C$} (9, -1);
\point at (0, 0);
\begin{scope}[xshift=12cm]
\node at (0, 3.5) {usual coordinates};
\draw[help lines] (-3, -3) rectangle (3, 3);
\path[clip] (-3, -3) rectangle (3, 3);
\begin{scope}[cm={(2,1,-1/2,1/2,(0,0))}, arrows={[line width=.6pt]}]
\draw[help lines] (-10,-10) grid (10, 10);
\draw[help lines, seq-yellow] (0, 0) circle[radius=1];
\draw[seq-violet, vector, opacity=.5] (0,0) -- (1,0);
\draw[seq-blue, vector, opacity=.5] (0,0) -- (0,1);
\draw[|->, dashed, shorten=1.5mm]
(1,1) arc[radius=sqrt(2), start angle=45, delta angle=90];
\draw[seq-green, vector] (0, 0) -- (1, 1) node[above right] {$x$};
\draw[seq-red, vector] (0, 0) -- (-1, 1) node[below=1mm, xshift=1mm] {$Ax$};
\end{scope}
\point at (0, 0);
\end{scope}
\end{tikzpicture}
</latex-code>
Now let <m>\textcolor{seq-green}x = \frac 12{-1\choose -2}</m>.
<ol>
<li>
We see from the <m>\cB</m>-coordinate grid that
<m>\textcolor{seq-green}x = -\frac 12\textcolor{seq-violet}{v_1} - \textcolor{seq-blue}{v_2}</m>. Therefore, <m>C\inv\textcolor{seq-green}x = \textcolor{seq-green}{[x]_\cB} = {-1/2\choose -1}.</m>
</li>
<li>
Multiplying by <m>B</m> rotates by <m>90^\circ</m>: <m>\textcolor{seq-red}{B[x]_\cB} = {1\choose -1/2}</m>.
</li>
<li>
Interpreting <m>{1\choose -1/2}</m> as a <m>\cB</m>-coordinate vector, we multiply by <m>C</m> to get
<me>
\textcolor{seq-red}{Ax} = C\vec{1 -1/2} = \textcolor{seq-violet}{v_1} - \frac 12\textcolor{seq-blue}{v_2} = \frac 14\vec{9 3}.
</me>
This vector lies at <m>(1, -\frac 12)</m> on the <m>\cB</m>-coordinate grid.
</li>
</ol>
<latex-code>
\begin{tikzpicture}[scale=.75, thin border nodes]
\node at (0, 3.5) {$\cB$-coordinates};
\begin{scope}[scale=3/2, arrows={[line width=.6pt]}]
\draw[help lines] (-2,-2) grid (2, 2);
\draw[help lines, seq-yellow] (0, 0) circle[radius=1];
\draw[seq-violet, vector, opacity=.5] (0,0) -- (1,0);
\draw[seq-blue, vector, opacity=.5] (0,0) -- (0,1);
\draw[|->, shorten=1.5mm, dashed]
(-1/2,-1) arc[radius=sqrt(5/4), start angle={atan2(-1,-1/2)}, delta angle=90];
\draw[seq-green, vector] (0, 0) -- (-1/2, -1) node[below left=-1mm] {$[x]_\cB$};
\draw[seq-red, vector] (0, 0) -- (1, -1/2) node[right] {$B[x]_\cB$};
\end{scope}
\draw[->, shorten=2mm, thick] (9, 1) to[bend right]
node[above=1mm] {multiply by $C\inv$} (3, 1);
\node (A) at (6, 0) {rotate by $90^\circ$};
\draw[->, shorten >=2mm, thick] (A) -- (3, 0);
\draw[->, shorten=2mm, thick] (3, -1) to[bend right]
node[below=1mm] {multiply by $C$} (9, -1);
\point at (0, 0);
\begin{scope}[xshift=12cm]
\node at (0, 3.5) {usual coordinates};
\draw[help lines] (-3, -3) rectangle (3, 3);
\path[clip] (-3, -3) rectangle (3, 3);
\begin{scope}[cm={(2,1,-1/2,1/2,(0,0))}, arrows={[line width=.6pt]}]
\draw[help lines] (-10,-10) grid (10, 10);
\draw[help lines, seq-yellow] (0, 0) circle[radius=1];
\draw[seq-violet, vector, opacity=.5] (0,0) -- (1,0);
\draw[seq-blue, vector, opacity=.5] (0,0) -- (0,1);
\draw[|->, shorten=1.5mm, dashed]
(-1/2,-1) arc[radius=sqrt(5/4), start angle={atan2(-1,-1/2)}, delta angle=90];
\draw[seq-green, vector] (0, 0) -- (-1/2,-1) node[below] {$x$};
\draw[seq-red, vector] (0, 0) -- (1, -1/2) node[right] {$Ax$};
\end{scope}
\point at (0, 0);
\end{scope}
\end{tikzpicture}
</latex-code>
To summarize:
<ul>
<li>
<m>B</m> rotates counterclockwise around the circle centered at the origin and passing through <m>e_1</m> and <m>e_2</m>.
</li>
<li>
<m>A</m> rotates counterclockwise around the ellipse centered at the origin and passing through <m>v_1</m> and <m>v_2</m>.
</li>
</ul>
<latex-code>
\def\theo{\includegraphics[width=6cm]{theo10.jpg}}
\begin{tikzpicture}[scale=.75, thin border nodes]
\node[transform shape] at (0, 0) {\theo};
\draw[seq-yellow, opacity=.5] (0,0) circle[radius=1];
\draw[seq-violet, opacity=1, vector] (0,0) -- (1,0) node[right] {$e_1$};
\draw[seq-blue, opacity=1, vector] (0,0) -- (0,1) node[above] {$e_2$};
\point at (0, 0);
\begin{scope}[xshift=9cm, rotate=90]
\clip (-3, -3) rectangle (3, 3);
\node[transform shape] at (0, 0) {\theo};
\draw[seq-yellow, opacity=.5] (0,0) circle[radius=1];
\draw[seq-violet, opacity=1, vector] (0,0) -- (1, 0) node[right] {$Be_1$};
\draw[seq-blue, opacity=1, vector] (0,0) -- (0, 1) node[below] {$Be_2$};
\point at (0, 0);
\end{scope}
\begin{scope}[yshift=-9cm]
\clip (-3, -3) rectangle (3, 3);
\begin{scope}[cm={(2,1,-1/2,1/2,(0,0))}]
\node[transform shape] at (0, 0) {\theo};
\draw[seq-yellow, opacity=.5] (0,0) circle[radius=1];
\draw[seq-violet, opacity=1, vector] (0,0) -- (1,0) node[above] {$v_1$};
\draw[seq-blue, opacity=1, vector] (0,0) -- (0,1) node[left] {$v_2$};
\end{scope}
\point at (0, 0);
\end{scope}
\begin{scope}[yshift=-9cm, xshift=9cm]
\clip (-3, -3) rectangle (3, 3);
\begin{scope}[cm={(2,1,-1/2,1/2,(0,0))}, rotate=90]
\node[transform shape] at (0, 0) {\theo};
\draw[seq-yellow, opacity=.5] (0,0) circle[radius=1];
\draw[seq-violet, opacity=1, vector] (0,0) -- (1,0) node[above] {$Av_1$};
\draw[seq-blue, opacity=1, vector] (0,0) -- (0,1) node[below] {$Av_2$};
\end{scope}
\point at (0, 0);
\end{scope}
\draw (-3, -3) rectangle (3, 3);
\draw[xshift=9cm] (-3, -3) rectangle (3, 3);
\draw[yshift=-9cm] (-3, -3) rectangle (3, 3);
\draw[xshift=9cm, yshift=-9cm] (-3, -3) rectangle (3, 3);
\draw[->, shorten=2mm, thick] (3, 1) to[bend left, "$B$" above=.5mm] (6, 1);
\draw[->, shorten=2mm, thick, yshift=-9cm]
(3, -1) to[bend right, "$A'$" above=.5mm] (6, -1);
\draw[->, shorten=2mm, thick] (-1, -6) to[bend left, "$C\inv$" right=.5mm] (-1, -3);
\draw[->, shorten=2mm, thick, xshift=9cm]
(1, -3) to[bend left, "$C$" left=.5mm] (1, -6);
\end{tikzpicture}
</latex-code>
</p>
<figure>
<caption>The geometric relationship between the similar matrices <m>A</m> and <m>B</m> acting on <m>\R^2</m>. Click and drag the heads of <m>x</m> and <m>[x]_\cB</m>.</caption>
<mathbox source="demos/similarity.html?B=0,-1:1,0&C=2,-1/2:1,1/2&snap=off" height="600px"/>
</figure>
</example>
<p>
To summarize and generalize the previous example:
</p>
<bluebox xml:id="similarity-to-rotation">
<title>A Matrix Similar to a Rotation Matrix</title>
<p>
Let
<me>
B = \mat{\cos\theta,-\sin\theta; \sin\theta,\cos\theta}
\qquad
C = \mat{| |; v_1 v_2; | |}
\qquad
A = CBC\inv,
</me>
where <m>C</m> is assumed invertible. Then:
<ul>
<li>
<m>B</m> rotates the plane by an angle of <m>\theta</m> around the circle centered at the origin and passing through <m>e_1</m> and <m>e_2</m>, in the direction from <m>e_1</m> to <m>e_2</m>.
</li>
<li>
<m>A</m> rotates the plane by an angle of <m>\theta</m> around the ellipse centered at the origin and passing through <m>v_1</m> and <m>v_2</m>, in the direction from <m>v_1</m> to <m>v_2</m>.
</li>
</ul>
<latex-code>
\def\theo{\includegraphics[width=6cm]{theo10.jpg}}
\begin{tikzpicture}[scale=.75, thin border nodes]
\node[transform shape] at (0, 0) {\theo};
\draw[seq-yellow, opacity=.5] (0,0) circle[radius=1];
\draw[seq-violet, opacity=1, vector] (0,0) -- (1,0) node[right] {$e_1$};
\draw[seq-blue, opacity=1, vector] (0,0) -- (0,1) node[above] {$e_2$};
\point at (0, 0);
\begin{scope}[xshift=9cm, rotate=90]
\clip (-3, -3) rectangle (3, 3);
\node[transform shape] at (0, 0) {\theo};
\draw[seq-yellow, opacity=.5] (0,0) circle[radius=1];
\draw[seq-violet, opacity=1, vector] (0,0) -- (1, 0) node[right] {$Be_1$};
\draw[seq-blue, opacity=1, vector] (0,0) -- (0, 1) node[below] {$Be_2$};
\point at (0, 0);
\end{scope}
\begin{scope}[yshift=-9cm]
\clip (-3, -3) rectangle (3, 3);
\begin{scope}[cm={(2,1,-1/2,1/2,(0,0))}]
\node[transform shape] at (0, 0) {\theo};
\draw[seq-yellow, opacity=.5] (0,0) circle[radius=1];
\draw[seq-violet, opacity=1, vector] (0,0) -- (1,0) node[above] {$v_1$};
\draw[seq-blue, opacity=1, vector] (0,0) -- (0,1) node[left] {$v_2$};
\end{scope}
\point at (0, 0);
\end{scope}
\begin{scope}[yshift=-9cm, xshift=9cm]
\clip (-3, -3) rectangle (3, 3);
\begin{scope}[cm={(2,1,-1/2,1/2,(0,0))}, rotate=90]
\node[transform shape] at (0, 0) {\theo};
\draw[seq-yellow, opacity=.5] (0,0) circle[radius=1];
\draw[seq-violet, opacity=1, vector] (0,0) -- (1,0) node[above] {$Av_1$};
\draw[seq-blue, opacity=1, vector] (0,0) -- (0,1) node[below] {$Av_2$};
\end{scope}
\point at (0, 0);
\end{scope}
\draw (-3, -3) rectangle (3, 3);
\draw[xshift=9cm] (-3, -3) rectangle (3, 3);
\draw[yshift=-9cm] (-3, -3) rectangle (3, 3);
\draw[xshift=9cm, yshift=-9cm] (-3, -3) rectangle (3, 3);
\draw[->, shorten=2mm, thick] (3, 1) to[bend left, "$B$" above=.5mm] (6, 1);
\draw[->, shorten=2mm, thick, yshift=-9cm]
(3, -1) to[bend right, "$A'$" above=.5mm] (6, -1);
\draw[->, shorten=2mm, thick] (-1, -6) to[bend left, "$C\inv$" right=.5mm] (-1, -3);
\draw[->, shorten=2mm, thick, xshift=9cm]
(1, -3) to[bend left, "$C$" left=.5mm] (1, -6);
\end{tikzpicture}
</latex-code>
</p>
</bluebox>
<example hide-type="true" xml:id="similarity-33-eg">
<title>Interactive: Similar <m>3\times 3</m> matrices</title>
<p>
Consider the matrices
<me>
A = \mat{-1 0 0; -1 0 2; -1 1 1} \qquad
B = \mat{-1 0 0; 0 -1 0; 0 0 2} \qquad
C = \mat{-1 1 0; 1 1 1; -1 0 1}.
</me>
Then <m>A = CBC\inv</m>, as one can verify. Let <m>v_1,v_2,v_3</m> be the columns of <m>C</m>, and let <m>\cB = \{v_1,v_2,v_3\}</m>, a basis of <m>\R^3</m>. Then <m>A</m> does the same thing as <m>B</m>, except <m>A</m> uses the <m>\cB</m>-coordinate system. In other words:
<ul>
<li>
<m>B</m> scales the <m>e_1,e_2</m>-plane by <m>-1</m> and the <m>e_3</m>-direction by <m>2</m>.
</li>
<li>