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
/
matrix-trans.xml
1048 lines (944 loc) · 44.9 KB
/
matrix-trans.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.
*********************************************************************-->
<section xml:id="matrix-transformations">
<title>Matrix Transformations</title>
<objectives>
<ol>
<li>Learn to view a matrix geometrically as a function.</li>
<li>Learn examples of matrix transformations: reflection, dilation, rotation, shear, projection.</li>
<li>Understand the vocabulary surrounding transformations: domain, codomain, range.</li>
<li>Understand the domain, codomain, and range of a matrix transformation.</li>
<li><em>Pictures:</em> common matrix transformations.</li>
<li><em>Vocabulary words:</em> <term>transformation</term> / <term>function</term>, <term>domain</term>, <term>codomain</term>, <term>range</term>, <term>identity transformation</term>, <term>matrix transformation</term>.</li>
</ol>
</objectives>
<introduction>
<p>
In this section we learn to understand matrices geometrically as <em>functions</em>, or <em>transformations</em>. We briefly discuss transformations in general, then specialize to matrix transformations, which are transformations that come from matrices.
</p>
</introduction>
<subsection xml:id="matrix-trans-matrices-functions">
<title>Matrices as Functions</title>
<p>
Informally, a <em>function</em> is a rule that accepts inputs and produces outputs. For instance, <m>f(x) = x^2</m> is a function that accepts one number <m>x</m> as its input, and outputs the square of that number: <m>f(2) = 4</m>. In this subsection, we interpret matrices as functions.
</p>
<p>
<idx><h>Matrix</h><h>as a function</h></idx>
<idx><h>Matrix</h><h>as a function</h><see>Matrix transformation</see></idx>
Let <m>A</m> be a matrix with <m>m</m> rows and <m>n</m> columns. Consider the matrix equation <m>b=Ax</m> (we write it this way instead of <m>Ax=b</m> to remind the reader of the notation <m>y=f(x)</m>). If we vary <m>x</m>, then <m>b</m> will also vary; in this way, we think of <m>A</m> as a function with independent variable <m>x</m> and dependent variable <m>b</m>.
<ul>
<li>
The independent variable (the input) is <m>x</m>, which is a vector in <m>\R^n</m>.
</li>
<li>
The dependent variable (the output) is <m>b</m>, which is a vector in <m>\R^m</m>.
</li>
</ul>
The set of all possible output vectors are the vectors <m>b</m> such that <m>Ax=b</m> has some solution; this is the same as the column space of <m>A</m> by this <xref ref="matrixeq-spans-consistency"/>.
<latex-code>
\begin{tikzpicture}[thin border nodes]
\path[use as bounding box] (-3,-5.5) -- (15,3);
\draw[grid lines, light gray] (-3,-3) grid (3,3);
\node (A) at (0,-3.5) {$\R^n$};
\node (B) at (8,-3.5) {$\R^m$};
\draw[->] (A.east) +(5mm,0) -- node[midway,above=1mm] {$b=Ax$}
($(B.west)-(5mm,0)$);
\point["$x$" left] (P) at (1,1,5);
\begin{scope}[myxyz, xshift=8cm]
\path[clip, resetxy] (-3,-3) rectangle (3,3);
\def\v{(-1,2,1)}
\def\w{(0,1,-1)}
\node[coordinate] (X) at \v {};
\node[coordinate] (Y) at \w {};
\draw[very thin] (-2,0,0) -- (0,0,0);
\draw[very thin] (0,-2,0) -- (0,0,0);
\draw[very thin] (0,0,-2) -- (0,0,0);
\begin{scope}[x=(X), y=(Y), transformxy]
\fill[seq4!10, nearly opaque] (-1,-1) rectangle (1,1);
\draw[step=.5cm, seq4!30, very thin] (-1,-1) grid (1,1);
\point["$Ax$" {fill=none,below}] (Q) at (-.5,.5);
\node[coordinate,
pin={[pin edge={very thin,-},pin distance=3mm,anchor=north]-70:$\Col(A)$}]
at (0.1,1) {};
\end{scope}
\draw[->, very thin] (0,0,0) -- (2,0,0);
\draw[->, very thin] (0,0,0) -- (0,2,0);
\draw[->, very thin] (0,0,0) -- (0,0,2);
\draw[resetxy] (-3,-3) rectangle (3,3);
\end{scope}
\draw[|->, shorten >=.35mm, shorten <=.35mm]
(P.east) .. controls +(0:3cm) and +(190:3cm) .. (Q.west);
\end{tikzpicture}
</latex-code>
</p>
<example hide-type="true">
<title>Interactive: A <m>2\times 3</m> matrix</title>
<figure>
<caption>A picture of a <m>2\times 3</m> matrix, regarded as a function. The input vector is <m>x</m>, which is a vector in <m>\R^3</m>, and the output vector is <m>b=Ax</m>, which is a vector in <m>\R^2</m>. The violet line on the right is the column space; as you vary <m>x</m>, the output <m>b</m> is constrained to lie on this line.</caption>
<mathbox source="demos/Axequalsb.html?show=false" height="500px"/>
</figure>
</example>
<example hide-type="true">
<title>Interactive: A <m>3\times 2</m> matrix</title>
<figure>
<caption>A picture of a <m>3\times 2</m> matrix, regarded as a function. The input vector is <m>x</m>, which is a vector in <m>\R^2</m>, and the output vector is <m>b=Ax</m>, which is a vector in <m>\R^3</m>. The violet plane on the right is the column space; as you vary <m>x</m>, the output <m>b</m> is constrained to lie on this plane.</caption>
<mathbox source="demos/Axequalsb.html?mat=1,0:0,1:1,0&range2=5&closed=true&show=false" height="500px"/>
</figure>
</example>
<example xml:id="matrix-trans-eg-projection">
<title>Projection onto the <m>xy</m>-plane</title>
<idx><h>Projection</h><see>Orthogonal projection</see></idx>
<idx><h>Orthogonal projection</h><h>onto the <m>xy</m>-plane</h></idx>
<statement>
<p>Let <me>A = \mat{1 0 0; 0 1 0; 0 0 0}.</me> Describe the function <m>b=Ax</m> geometrically.</p>
</statement>
<solution>
<p>
In the equation <m>Ax=b</m>, the input vector <m>x</m> and the output vector <m>b</m> are both in <m>\R^3</m>.
First we multiply <m>A</m> by a vector to see what it does:
<me>A\vec{x y z} = \mat{1 0 0; 0 1 0; 0 0 0}\vec{x y z} = \vec{x y 0}.</me>
Multiplication by <m>A</m> simply sets the <m>z</m>-coordinate equal to zero: it <em>projects vertically onto the <m>xy</m>-plane</em>.
<latex-code>
\begin{tikzpicture}[myxyz]
\begin{scope}[arrows={|[width=4pt]->[width=4pt]}, shorten=4pt]
\draw (-1,-1,-2.5) node[point, seq2] {}
-- (-1,-1,0);
\draw (2,-2,-1) node[point, seq5] {}
-- (2,-2,0);
\end{scope}
\begin{scope}[transformxy]
\fill[white, nearly opaque] (-3, -3) rectangle (3, 3);
\draw[step=1cm, help lines] (-3, -3) grid (3, 3);
\end{scope}
\begin{scope}[arrows={|[width=4pt]->[width=4pt]}, shorten=4pt]
\draw (2,1,3) node[point,seq1] {}
-- (2,1,0) node[point,seq1] {};
\point[seq2] at (-1,-1,0);
\point[seq5] at (2,-2,0);
\draw (-1,2,2) node[point,seq3] {}
-- (-1,2,0) node[point,seq3] {};
\draw (-2,0,1) node[point,seq4] {}
-- (-2,0,0) node[point,seq4] {};
\end{scope}
\end{tikzpicture}
</latex-code>
</p>
<figure>
<caption>Multiplication by the matrix <m>A</m> projects a vector onto the <m>xy</m>-plane. Move the input vector <m>x</m> to see how the output vector <m>b</m> changes.</caption>
<mathbox source="demos/Axequalsb.html?mat=1,0,0:0,1,0:0,0,0&range2=5&closed=true" height="500px"/>
</figure>
</solution>
</example>
<example xml:id="matrix-trans-eg-reflection">
<title>Reflection</title>
<idx><h>Reflection</h><h>over the <m>y</m>-axis</h></idx>
<statement>
<p>Let <me>A = \mat{-1 0; 0 1}.</me> Describe the function <m>b=Ax</m> geometrically.</p>
</statement>
<solution>
<p>
In the equation <m>Ax=b</m>, the input vector <m>x</m> and the output vector <m>b</m> are both in <m>\R^2</m>.
First we multiply <m>A</m> by a vector to see what it does:
<me>A\vec{x y} = \mat{-1 0; 0 1}\vec{x y} = \vec{-x y}.</me>
Multiplication by <m>A</m> negates the <m>x</m>-coordinate: it <em>reflects over the <m>y</m>-axis</em>.
<latex-code>
\def\theo{\includegraphics[width=4cm]{theo2.jpg}}
\begin{tikzpicture}
\node (theo1) at (0,0,0) {\theo};
\draw[->,opacity=.3] (-1.8,0) -- (1.8,0);
\draw[->,opacity=.3] (0,-1.8) -- (0,1.8);
\begin{scope}[xshift=7cm]
\node[xscale=-1] (theo2) at (0,0,0) {\theo};
\draw[->,opacity=.3] (-1.8,0) -- (1.8,0);
\draw[->,opacity=.3] (0,-1.8) -- (0,1.8);
\end{scope}
\draw[->] (theo1.20)
to[out=20,in=160] node[midway,above] {$b=Ax$} (theo2.20);
\end{tikzpicture}
</latex-code>
</p>
<figure>
<caption>Multiplication by the matrix <m>A</m> reflects over the <m>y</m>-axis. Move the input vector <m>x</m> to see how the output vector <m>b</m> changes.</caption>
<mathbox source="demos/twobytwo.html?mat=-1,0,0,1&closed=true" height="500px"/>
</figure>
</solution>
</example>
<example xml:id="matrix-trans-eg-dilation">
<title>Dilation</title>
<idx><h>Dilation</h></idx>
<idx><h>Scale</h><see>Dilation</see></idx>
<idx><h>Scale</h><see>Row operations, scaling</see></idx>
<statement>
<p>Let <me>A = \mat{1.5 0; 0 1.5}.</me> Describe the function <m>b=Ax</m> geometrically.</p>
</statement>
<solution>
<p>
In the equation <m>Ax=b</m>, the input vector <m>x</m> and the output vector <m>b</m> are both in <m>\R^2</m>.
First we multiply <m>A</m> by a vector to see what it does:
<me>A\vec{x y} = \mat{1.5 0; 0 1.5}\vec{x y} = \vec{1.5x 1.5y}
= 1.5\vec{x y}.</me>
Multiplication by <m>A</m> is the same as scalar multiplication by <m>1.5</m>: it <em>scales</em> or <em>dilates</em> the plane by a factor of <m>1.5</m>.
<latex-code>
\def\theo{\includegraphics[width=3.5cm]{theo3.jpg}}
\begin{tikzpicture}
\node (theo1) at (0,0,0) {\theo};
\draw[->,opacity=.6] (-1.3,0) -- (1.3,0);
\draw[->,opacity=.6] (0,-1.3) -- (0,1.3);
\begin{scope}[xshift=7cm]
\node[scale=1.5] (theo2) at (0,0,0) {\theo};
\draw[->,opacity=.6] (-1.3,0) -- (1.3,0);
\draw[->,opacity=.6] (0,-1.3) -- (0,1.3);
\end{scope}
\draw[->] ($(theo1.east)+(0,.3)$)
to[bend left, "$b = Ax$"] ($(theo2.west)+(0,.3)$);
\end{tikzpicture}
</latex-code>
</p>
<figure>
<caption>Multiplication by the matrix <m>A</m> dilates the plane by a factor of <m>1.5</m>. Move the input vector <m>x</m> to see how the output vector <m>b</m> changes.</caption>
<mathbox source="demos/twobytwo.html?mat=1.5,0,0,1.5&closed=true&pic=theo3.jpg" height="500px"/>
</figure>
</solution>
</example>
<example xml:id="matrix-trans-eg-identity">
<title>Identity</title>
<idx><h>Identity matrix</h><h>as a function</h></idx>
<statement>
<p>Let <me>A = \mat{1 0; 0 1}.</me> Describe the function <m>b=Ax</m> geometrically.</p>
</statement>
<solution>
<p>
In the equation <m>Ax=b</m>, the input vector <m>x</m> and the output vector <m>b</m> are both in <m>\R^2</m>.
First we multiply <m>A</m> by a vector to see what it does:
<me>A\vec{x y} = \mat{1 0; 0 1}\vec{x y} = \vec{x y}.</me>
Multiplication by <m>A</m> does not change the input vector at all: it is the <em>identity transformation which does nothing</em>.
<latex-code>
\def\theo{\includegraphics[width=4cm]{theo11.jpg}}
\begin{tikzpicture}
\node (theo1) at (0,0,0) {\theo};
\draw[->,opacity=.6] (-1.3,0) -- (1.3,0);
\draw[->,opacity=.6] (0,-1.3) -- (0,1.3);
\begin{scope}[xshift=7cm]
\node (theo2) at (0,0,0) {\theo};
\draw[->,opacity=.6] (-1.3,0) -- (1.3,0);
\draw[->,opacity=.6] (0,-1.3) -- (0,1.3);
\end{scope}
\draw[->] ($(theo1.east)+(0,.3)$)
to[bend left, "$b = Ax$"] ($(theo2.west)+(0,.3)$);
\end{tikzpicture}
</latex-code>
</p>
<figure>
<caption>Multiplication by the matrix <m>A</m> does not move the vector <m>x</m>: that is, <m>b=Ax=x</m>. Move the input vector <m>x</m> to see how the output vector <m>b</m> changes.</caption>
<mathbox source="demos/twobytwo.html?mat=1,0,0,1&closed=true&pic=theo11.jpg" height="500px"/>
</figure>
</solution>
</example>
<example xml:id="matrix-trans-eg-rotation">
<title>Rotation</title>
<idx><h>Rotation</h><h>counterclockwise by <m>90^\circ</m></h></idx>
<statement>
<p>Let <me>A = \mat{0 -1; 1 0}.</me> Describe the function <m>b=Ax</m> geometrically.</p>
</statement>
<solution>
<p>
In the equation <m>Ax=b</m>, the input vector <m>x</m> and the output vector <m>b</m> are both in <m>\R^2</m>.
First we multiply <m>A</m> by a vector to see what it does:
<me>A\vec{x y} = \mat{0 -1; 1 0}\vec{x y} = \vec{-y x}.</me>
We substitute a few test points in order to understand the geometry of the transformation:
<latex-code>
\def\arcarrow#1;{
\pgfmathanglebetweenpoints{\pgfpoint{0cm}{0cm}}{\pgfpointanchor{#1}{center}}
\let\sangle=\pgfmathresult
\draw[|->, shorten=2mm]
let \p1 = (#1.center), \n1={veclen(\x1,\y1)} in
(#1) arc[radius=\n1, delta angle=90, start angle=\sangle];
}
\begin{minipage}{5cm}
\[\begin{split}
A\color{seq1}\vec{1 2} &= \color{seq1}\vec{-2 1} \\
A\color{seq2}\vec{-1 1} &= \color{seq2}\vec{-1 -1} \\
A\color{seq3}\vec{0 -2} &= \color{seq3}\vec{2 0} \\
\end{split}\]
\end{minipage}
\qquad
\begin{tikzpicture}[baseline=0]
\draw[help lines] (-3,-3) grid (3,3);
\draw[->] (-3,0) -- (3,0);
\draw[->] (0,-3) -- (0,3);
\point[seq1] (X1) at (1,2);
\point[seq1] (TX1) at (-2,1);
\arcarrow X1;
\point[seq2] (X2) at (-1,1);
\point[seq2] (TX2) at (-1,-1);
\arcarrow X2;
\point[seq3] (TX3) at (2,0);
\point[seq3] (X3) at (0,-2);
\arcarrow X3;
\end{tikzpicture}
</latex-code>
Multiplication by <m>A</m> is <em>counterclockwise rotation by <m>90^\circ</m></em>.
<latex-code>
\def\theo{\includegraphics[width=4cm]{theo8.jpg}}
\begin{tikzpicture}
\node (theo1) at (0,0,0) {\theo};
\draw[->,opacity=.6] (-1.3,0) -- (1.3,0);
\draw[->,opacity=.6] (0,-1.3) -- (0,1.3);
\begin{scope}[xshift=7cm]
\node[rotate=90] (theo2) at (0,0,0) {\theo};
\draw[->,opacity=.6] (-1.3,0) -- (1.3,0);
\draw[->,opacity=.6] (0,-1.3) -- (0,1.3);
\end{scope}
\draw[->] ($(theo1.east)+(0,.3)$)
to[bend left, "$b = Ax$"] ($(theo2.north)+(0,.3)$);
\end{tikzpicture}
</latex-code>
</p>
<figure>
<caption>Multiplication by the matrix <m>A</m> rotates the vector <m>x</m> counterclockwise by <m>90^\circ</m>. Move the input vector <m>x</m> to see how the output vector <m>b</m> changes.</caption>
<mathbox source="demos/twobytwo.html?mat=0,-1,1,0&closed=true&pic=theo8.jpg" height="500px"/>
</figure>
</solution>
</example>
<example xml:id="matrix-trans-shear">
<title>Shear</title>
<idx><h>Shear</h><h>in the <m>x</m>-direction</h></idx>
<statement>
<p>Let <me>A = \mat{1 1; 0 1}.</me> Describe the function <m>b=Ax</m> geometrically.</p>
</statement>
<solution>
<p>
In the equation <m>Ax=b</m>, the input vector <m>x</m> and the output vector <m>b</m> are both in <m>\R^2</m>.
First we multiply <m>A</m> by a vector to see what it does:
<me>A\vec{x y} = \mat{1 1; 0 1}\vec{x y} = \vec{x+y y}.</me>
Multiplication by <m>A</m> adds the <m>y</m>-coordinate to the <m>x</m>-coordinate; this is called a <em>shear in the <m>x</m>-direction</em>.
<latex-code>
\def\sheep{\includegraphics[width=4cm]{sheep.jpg}}
\begin{tikzpicture}
\node (sheep1) at (0,0,0) {\sheep};
\draw[->,opacity=.6] (-1.3,0) -- (1.3,0);
\draw[->,opacity=.6] (0,-1.3) -- (0,1.3);
\begin{scope}[xshift=7cm]
\node[cm={1,0,1,1,(0,0)}] (sheep2) at (0,0,0) {\sheep};
\draw[->,opacity=.6] (-1.3,0) -- (1.3,0);
\draw[->,opacity=.6] (0,-1.3) -- (0,1.3);
\end{scope}
\draw[->] ($(sheep1.east)+(0,.3)$)
to[bend left, "$b = Ax$"] ($(sheep2.west)+(0,.3)$);
\end{tikzpicture}
</latex-code>
</p>
<figure>
<caption>Multiplication by the matrix <m>A</m> adds the <m>y</m>-coordinate to the <m>x</m>-coordinate. Move the input vector <m>x</m> to see how the output vector <m>b</m> changes.</caption>
<mathbox source="demos/twobytwo.html?mat=1,1,0,1&closed=true&pic=sheep.jpg" height="500px"/>
</figure>
</solution>
</example>
</subsection>
<subsection xml:id="matrix-trans-transformations">
<title>Transformations</title>
<p>
At this point it is convenient to fix our ideas and terminology regarding functions, which we will call <em>transformations</em> in this book. This allows us to systematize our discussion of matrices as functions.
</p>
<definition>
<idx><h>Transformation</h><h>definition of</h></idx>
<idx><h>Transformation</h><h>domain of</h></idx>
<idx><h>Transformation</h><h>codomain of</h></idx>
<idx><h>Transformation</h><h>range of</h></idx>
<idx><h>Function</h><see>Transformation</see></idx>
<idx><h>Domain</h><see>Transformation</see></idx>
<idx><h>Codomain</h><see>Transformation</see></idx>
<idx><h>Range</h><see>Transformation</see></idx>
<notation><usage>T\colon\R^n\to\R^m</usage><description>transformation with domain <m>\R^n</m> and codomain <m>\R^m</m></description></notation>
<statement>
<p>
A <term>transformation</term> from <m>\R^n</m> to <m>\R^m</m> is a rule <m>T</m> that assigns to each vector <m>x</m> in <m>\R^n</m> a vector <m>T(x)</m> in <m>\R^m</m>.
<ul>
<li>
<m>\R^n</m> is called the <term>domain</term> of <m>T</m>.
</li>
<li>
<m>\R^m</m> is called the <term>codomain</term> of <m>T</m>.
</li>
<li>
For <m>x</m> in <m>\R^n</m>, the vector <m>T(x)</m> in <m>\R^m</m> is the <term>image</term> of <m>x</m> under <m>T</m>.
</li>
<li>
The set of all images <m>\{T(x)\mid x\text{ in }\R^n\}</m> is the <term>range</term> of <m>T</m>.
</li>
</ul>
The notation <m>T\colon\R^n\To\R^m</m>
means <q><m>T</m> is a transformation from <m>\R^n</m> to <m>\R^m</m>.</q>
</p>
</statement>
</definition>
<p>
<idx><h>Transformation</h><h>as a machine</h></idx>
It may help to think of <m>T</m> as a <q>machine</q> that takes <m>x</m> as an input, and gives you <m>T(x)</m> as the output.
<latex-code>
<![CDATA[
\tikzset{
pics/gear/.style args={#1/#2}{
code = { % #1 = number of gears, #2 = tooth length
\filldraw[fill=black!30] (1cm-#2/2,0)
let \n{angle} = {360/#1} in
\foreach \gear [evaluate=\gear as \startangle using \gear*\n{angle}]
in {1,...,#1}
{
arc[radius=1cm-#2/2, start angle=\startangle-\n{angle},
delta angle=\n{angle}/4]
-- (\startangle-3*\n{angle}/4+\n{angle}/10:1cm+#2/2)
arc[radius=1cm+#2/2,
start angle=\startangle-3*\n{angle}/4+\n{angle}/10,
end angle =\startangle- \n{angle}/4-\n{angle}/10]
-- (\startangle- \n{angle}/4:1cm-#2/2)
arc[radius=1cm-#2/2, start angle=\startangle-\n{angle}/4,
delta angle=\n{angle}/4]
};
\draw (0,0) circle[radius=.4cm];
}
},
% machine is an input/output machine for illustrating functions
machine/.pic = {
\filldraw[rounded corners=.3mm, fill=steel!30] (1.5, -1)
-- (1.5, -.5) -- (1.5-.2, -.5) -- (1.5-.2, .4) -- (1.5, .4)
-- (1.5, 1) -- (-1.5, 1) -- (-1.5, -1) -- cycle;
\filldraw[fill=steel!30] (-1.5, -.2)
-- (-1.5-.5, -.5) -- (-1.5-.5, .5) -- (-1.5, .2);
\coordinate (-input) at (-1.5-.5, 0);
%\fill (-1.5-.4, -.05) rectangle (-1.5+.5, .05);
%\fill (-1.5+.3, -.15) -- (-1.5+.7, 0) -- (-1.5+.3, .15);
\filldraw[yshift=-.1cm, fill=black!30] (1.5-.2, -.3)
-- (1.5+.4, -.3)
arc[radius=.15, start angle=-90, end angle=90]
-- (1.5-.2,0);
\draw[yshift=-.1cm] (1.5+.4, -.15) circle[radius=.1];
%\fill (1.5-.7, -.05) rectangle (1.5+.2, .05);
%\fill (1.5+.0, -.15) -- (1.5+.4, 0) -- (1.5+.0, .15);
\coordinate (-output) at (1.5+.5, 0);
\pic[transform shape, scale=.4] at (-.4, -.4) {gear={15/.2cm}};
\pic[transform shape, scale=.4] at ( .4, -.4) {gear={15/.2cm}};
% Need to expand \tikzpictextoptions *first* so as not to confuse \pgfkeys
\expandafter\node\expandafter[\tikzpictextoptions] at (0, .5) {\tikzpictext};
},
}
\begin{tikzpicture}[thin border nodes, scale=.9]
\draw[grid lines, light gray] (-3,-3) grid (3,3);
\node (A) at (0,-3.5) {$\R^n$};
\node (B) at (10,-3.5) {$\R^m$};
\node at (0,-4) {domain};
\node at (10,-4) {codomain};
\draw[->] (A.east) +(5mm,0) -- node[midway,above=1mm] {$T$}
($(B.west)-(5mm,0)$);
\point["$x$" left] (P) at (1,1,5);
\begin{scope}[myxyz, xshift=10cm]
\path[clip, resetxy] (-3,-3) rectangle (3,3);
\def\v{(-1,2,1)}
\def\w{(0,1,-1)}
\node[coordinate] (X) at \v {};
\node[coordinate] (Y) at \w {};
\draw[very thin] (-2,0,0) -- (0,0,0);
\draw[very thin] (0,-2,0) -- (0,0,0);
\draw[very thin] (0,0,-2) -- (0,0,0);
\begin{scope}[x=(X), y=(Y), transformxy]
\fill[seq4!10, nearly opaque] (-1,-1) rectangle (1,1);
\draw[step=.5cm, seq4!30, very thin] (-1,-1) grid (1,1);
\point["$T(x)$" {fill=none,below}] (Q) at (-.5,.5);
\node[coordinate,
pin={[pin edge={very thin,-},pin distance=3mm,anchor=north]-70:range}]
at (0.1,1) {};
\end{scope}
\draw[->, very thin] (0,0,0) -- (2,0,0);
\draw[->, very thin] (0,0,0) -- (0,2,0);
\draw[->, very thin] (0,0,0) -- (0,0,2);
\draw[resetxy] (-3,-3) rectangle (3,3);
\end{scope}
\pic[scale=.75, "$T$"] (machine) at (5,0) {machine};
\node[coordinate] (IN) at (5cm-1.7cm,0) {};
\node[coordinate] (OUT) at (5cm+1.7cm,0) {};
\draw[->, shorten >=.35mm, shorten <=.35mm] (P.east)
.. controls +(0:1cm) and +(180:1cm) .. (IN);
\draw[->, shorten >=.35mm, shorten <=.35mm] (OUT)
.. controls +(0:1cm) and +(190:2cm) .. (Q.west);
\end{tikzpicture}
]]>
</latex-code>
The points of the domain <m>\R^n</m> are the <em>inputs</em> of <m>T</m>: this simply means that it makes sense to evaluate <m>T</m> on vectors with <m>n</m> entries, i.e., lists of <m>n</m> numbers. Likewise, the points of the codomain <m>\R^m</m> are the <em>outputs</em> of <m>T</m>: this means that the result of evaluating <m>T</m> is always a vector with <m>m</m> entries.
</p>
<p>
The <em>range</em> of <m>T</m> is the set of all vectors in the codomain that actually arise as outputs of the function <m>T</m>, for some input. In other words, the range is all vectors <m>b</m> in the codomain such that <m>T(x)=b</m> has a solution <m>x</m> in the domain.
</p>
<example>
<title>A Function of one variable</title>
<idx><h>Transformation</h><h>of one variable</h></idx>
<p>
Most of the functions you may have seen previously have domain and codomain equal to <m>\R = \R^1</m>. For example,
<me>\sin\colon\R\To\R \qquad \sin(x) =
\left(\,\parbox{5cm}{
the length of the opposite edge over the hypotenuse of a right
triangle with angle $x$ in radians}\,\right).
</me>
Notice that we have defined <m>\sin</m> by a rule: a function is defined by specifying what the output of the function is for any possible input.
</p>
<p>
You may be used to thinking of such functions in terms of their graphs:
<latex-code>
\usetikzlibrary{datavisualization.formats.functions}
\begin{tikzpicture}
\datavisualization[school book axes,
all axes={ticks=none},
visualize as smooth line/.list={sin},
sin={style=seq1}]
data[format=function, set=sin] {
var x : interval[-2:2] ;
func y = sin(\value x r);
};
\point[minimum size=1.5mm, "$x$" below] at (1,0);
\point[minimum size=1.5mm, "${(x,\sin x)}$" {label distance=1.2mm, above}] at (1,{sin(1 r)});
\end{tikzpicture}
</latex-code>
In this case, the horizontal axis is the domain, and the vertical axis is the codomain. This is useful when the domain and codomain are <m>\R</m>, but it is hard to do when, for instance, the domain is <m>\R^2</m> and the codomain is <m>\R^3</m>. The graph of such a function is a subset of <m>\R^5</m>, which is difficult to visualize. For this reason, we will rarely graph a transformation.
</p>
<p>
Note that the <em>range</em> of <m>\sin</m> is the interval <m>[-1,1]</m>: this is the set of all possible outputs of the <m>\sin</m> function.
</p>
</example>
<example>
<title>Functions of several variables</title>
<idx><h>Transformation</h><h>of several variables</h></idx>
<p>
Here is an example of a function from <m>\R^2</m> to <m>\R^3</m>:
<me>f\vec{x y} = \vec{x+y \cos(y) y-x^2}.</me>
The inputs of <m>f</m> each have two entries, and the outputs have three entries. In this case, we have defined <m>f</m> by a formula, so we evaluate <m>f</m> by substituting values for the variables:
<me>f\vec{2 3} = \vec{2+3 \cos(3) 3-2^2} = \vec{5 \cos(3) -1}.</me>
</p>
<p>
Here is an example of a function from <m>\R^3</m> to <m>\R^3</m>:
<me>f(v) = \left(\,\parbox{5.5cm}{the counterclockwise rotation of $v$ by an angle of $42^\circ$ about the $z$-axis}\,\right).</me>
In other words, <m>f</m> takes a vector with three entries, then rotates it; hence the ouput of <m>f</m> also has three entries. In this case, we have defined <m>f</m> by a geometric rule.
</p>
</example>
<definition xml:id="matrix-trans-identity">
<idx><h>Identity transformation</h><h>definition of</h></idx>
<idx><h>Transformation</h><h>identity</h><see>Identity transformation</see></idx>
<notation><usage>\Id_{\R^n}</usage><description>Identity transformation</description></notation>
<statement>
<p>
The <term>identity transformation</term> <m>\Id_{\R^n}\colon\R^n\to\R^n</m> is the transformation defined by the rule
<me>\Id_{\R^n}(x) = x \qquad\text{for all $x$ in $\R^n$}.</me>
</p>
</statement>
</definition>
<p>
In other words, the identity transformation does not move its input vector: the output is the same as the input. Its domain and codomain are both <m>\R^n</m>, and its range is <m>\R^n</m> as well, since every vector in <m>\R^n</m> is the output of itself.
</p>
<example xml:id="matrix-trans-eg-robot">
<title>A real-word transformation: robotics</title>
<p>
The definition of <em>transformation</em> and its associated vocabulary may seem quite abstract, but transformations are extremely common in real life. Here is an example from the fields of robotics and computer graphics.
</p>
<p>
Suppose you are building a robot arm with three joints that can move its hand around a plane, as in the following picture.
<latex-code>
\usetikzlibrary{ipe}
\usetikzlibrary{angles}
\tikzstyle{ipe stylesheet} = [
ipe import,
even odd rule,
line join=round,
line cap=butt,
ipe pen normal/.style={line width=0.4},
ipe pen heavier/.style={line width=0.8},
ipe pen fat/.style={line width=1.2},
ipe pen ultrafat/.style={line width=2},
ipe pen normal,
ipe mark normal/.style={ipe mark scale=3},
ipe mark large/.style={ipe mark scale=5},
ipe mark small/.style={ipe mark scale=2},
ipe mark tiny/.style={ipe mark scale=1.1},
ipe mark normal,
/pgf/arrow keys/.cd,
ipe arrow normal/.style={scale=7},
ipe arrow large/.style={scale=10},
ipe arrow small/.style={scale=5},
ipe arrow tiny/.style={scale=3},
ipe arrow normal,
/tikz/.cd,
ipe arrows, % update arrows
<->/.tip = ipe normal,
ipe dash normal/.style={dash pattern=},
ipe dash dashed/.style={dash pattern=on 4bp off 4bp},
ipe dash dotted/.style={dash pattern=on 1bp off 3bp},
ipe dash dash dotted/.style={dash pattern=on 4bp off 2bp on 1bp off 2bp},
ipe dash dash dot dotted/.style={dash pattern=on 4bp off 2bp on 1bp off 2bp on 1bp off 2bp},
ipe dash normal,
ipe node/.append style={font=\normalsize},
ipe stretch normal/.style={ipe node stretch=1},
ipe stretch normal,
ipe opacity 10/.style={opacity=0.1},
ipe opacity 30/.style={opacity=0.3},
ipe opacity 50/.style={opacity=0.5},
ipe opacity 75/.style={opacity=0.75},
ipe opacity opaque/.style={opacity=1},
ipe opacity opaque,
]
\begin{tikzpicture}[ipe stylesheet, scale=.7]
\draw[fill=white!80!black]
(100, 528) -- (196, 656) -- (220, 656) -- (124, 528) -- cycle;
\draw[fill=white!80!black]
(208, 664) -- (320, 712) -- (320, 696) -- (208, 648) -- cycle;
\begin{scope}[shift={(321.91, 715.847)}, rotate=-9.1623]
\draw[fill=white!90!black]
(0, 0)
-- (48, 12)
-- (96, 0)
-- (96, -4)
-- (20, -4)
-- (20, -20)
-- (96, -20)
-- (96, -24)
-- (48, -36)
-- (0, -24) -- cycle;
\draw[fill=red] (96, -12) circle[radius=1mm]
node[right=2mm, red] {$\vec{x y} = f(\theta,\phi,\psi)$};
\end{scope}
\filldraw[fill=white]
(208, 656) circle[radius=16];
\filldraw[fill=white]
(320, 704) circle[radius=16];
\filldraw[fill=white]
(112, 528) circle[radius=24];
\filldraw[white!20!black]
(112, 528) circle[radius=4]
(208, 656) circle[radius=4]
(320, 704) circle[radius=4];
\coordinate (c1) at (112, 528);
\coordinate (c2) at (208, 656);
\coordinate (c3) at (320, 704);
\coordinate (x1) at ($(c1) + (2cm,0)$);
\coordinate (x3) at ($(c3) + (2cm,0)$);
\draw (c1) -- (x1);
\draw (c1) -- ($(c1)!2cm!(c2)$);
\pic[draw, "$\theta$", angle radius=1cm, angle eccentricity=.8] {angle=x1--c1--c2};
\draw (c2) -- ($(c2)!2cm!(c1)$);
\draw (c2) -- ($(c2)!2cm!(c3)$);
\pic[draw, "$\phi$", angle radius=1cm, angle eccentricity=.8] {angle=c1--c2--c3};
\coordinate (x3p) at ($(c3)!2cm!-9.1623:(x3)$);
\draw (c3) -- ($(c3)!2cm!(c2)$);
\draw (c3) -- (x3p);
\pic[draw, "$\psi$", angle radius=1cm, angle eccentricity=.8] {angle=c2--c3--x3p};
\end{tikzpicture}
</latex-code>
Define a transformation <m>f\colon\R^3\to\R^2</m> as follows: <m>f(\theta,\phi,\psi)</m> is the <m>(x,y)</m> position of the hand when the joints are rotated by angles <m>\theta, \phi, \psi</m>, respectively. Evaluating <m>f</m> tells you where the hand will be on the plane when the joints are set at the given angles.
</p>
<p>
It is relatively straightforward to find a formula for <m>f(\theta,\phi,\psi)</m> using some basic trigonometry. If you want the robot to fetch your coffee cup, however, you have to <em>find</em> the angles <m>\theta,\phi,\psi</m> that will put the hand at the position of your beverage. It is not at all obvious how to do this, and it is not even clear if the answer is unique! You can ask yourself: <q>which positions on the table can my robot arm reach?</q> or <q>what is the arm<rsq/>s range of motion?</q> This is the same as asking: <q>what is the range of <m>f</m>?</q>
</p>
<p>
Unfortunately, this kind of function does not come from a matrix, so one cannot use linear algebra to answer these kinds of questions. In fact, these functions are rather complicated; their study is the subject of <url href="https://en.wikipedia.org/wiki/Inverse_kinematics">inverse kinematics</url>.
</p>
</example>
</subsection>
<subsection>
<title>Matrix Transformations</title>
<p>
Now we specialize the general notions and vocabulary from the previous <xref ref="matrix-trans-transformations"/> to the functions defined by matrices that we considered in the first <xref ref="matrix-trans-matrices-functions"/>.
</p>
<definition xml:id="matrix-trans-defn-of">
<idx><h>Matrix transformation</h><h>definition of</h></idx>
<idx><h>Transformation</h><h>associated to a matrix</h><see>Matrix transformation</see></idx>
<statement>
<p>
Let <m>A</m> be an <m>m\times n</m> matrix. The <term>matrix transformation</term> associated to <m>A</m> is the transformation
<me>
T\colon \R^n\To\R^m \sptxt{defined by} T(x) = Ax.
</me>
This is the transformation that takes a vector <m>x</m> in <m>\R^n</m> to the vector <m>Ax</m> in <m>\R^m</m>.
</p>
</statement>
</definition>
<p>
If <m>A</m> has <m>n</m> columns, then it only makes sense to multiply <m>A</m> by vectors with <m>n</m> entries. This is why the domain of <m>T(x)=Ax</m> is <m>\R^n</m>. If <m>A</m> has <m>n</m> rows, then <m>Ax</m> has <m>m</m> entries for any vector <m>x</m> in <m>\R^n</m>; this is why the codomain of <m>T(x)=Ax</m> is <m>\R^m</m>.
</p>
<p>
The definition of a matrix transformation <m>T</m> tells us how to evaluate <m>T</m> on any given vector: we multiply the input vector by a matrix. For instance, let
<me>
A = \mat{1 2 3; 4 5 6}
</me>
and let <m>T(x)=Ax</m> be the associated matrix transformation. Then
<me>T\vec{-1 -2 -3} = A\vec{-1 -2 -3} = \mat{1 2 3; 4 5 6}\vec{-1 -2 -3}
= \vec{-14 -32}.
</me>
</p>
<p>
Suppose that <m>A</m> has columns <m>v_1,v_2,\ldots,v_n</m>. If we multiply <m>A</m> by a general vector <m>x</m>, we get
<me>
Ax = \mat{| | ,, |; v_1 v_2 \cdots, v_n; | | ,, |}\vec{x_1 x_2 \vdots, x_n}
= x_1v_1 + x_2v_2 + \cdots + x_nv_n.
</me>
This is just a general linear combination of <m>v_1,v_2,\ldots,v_n</m>. Therefore, the outputs of <m>T(x) = Ax</m> are exactly the linear combinations of the columns of <m>A</m>: the <em>range</em> of <m>T</m> is the column space of <m>A</m>. See this <xref ref="matrixeq-spans-consistency"/>.
</p>
<bluebox xml:id="matrix-trans-dictionary">
<idx><h>Matrix transformation</h><h>domain of</h></idx>
<idx><h>Matrix transformation</h><h>codomain of</h></idx>
<idx><h>Matrix transformation</h><h>range of</h></idx>
<idx><h>Column space</h><h>range of a transformation</h></idx>
<p>
Let <m>A</m> be an <m>m\times n</m> matrix, and let <m>T(x)=Ax</m> be the associated matrix transformation.
<ul>
<li>
The <em>domain</em> of <m>T</m> is <m>\R^n</m>, where <m>n</m> is the number of <em>columns</em> of <m>A</m>.
</li>
<li>
The <em>codomain</em> of <m>T</m> is <m>\R^m</m>, where <m>m</m> is the number of <em>rows</em> of <m>A</m>.
</li>
<li>
The <em>range</em> of <m>T</m> is the <em>column space</em> of <m>A</m>.
</li>
</ul>
</p>
</bluebox>
<example hide-type="true">
<title>Interactive: A <m>2\times 3</m> matrix: reprise</title>
<p>
Let
<me>
A = \mat{1 -1 2; -2 2 4},
</me>
and define <m>T(x) = Ax</m>. The domain of <m>T</m> is <m>\R^3</m>, and the codomain is <m>\R^2</m>. The range of <m>T</m> is the column space; since all three columns are collinear, the range is a line in <m>\R^2</m>.
</p>
<figure>
<caption>A picture of the matrix transformation <m>T</m>. The input vector is <m>x</m>, which is a vector in <m>\R^3</m>, and the output vector is <m>b=T(x)=Ax</m>, which is a vector in <m>\R^2</m>. The violet line on the right is the range of <m>T</m>; as you vary <m>x</m>, the output <m>b</m> is constrained to lie on this line.</caption>
<mathbox source="demos/Axequalsb.html?show=false" height="500px"/>
</figure>
</example>
<example hide-type="true">
<title>Interactive: A <m>3\times 2</m> matrix: reprise</title>
<p>
Let
<me>
A = \mat{1 0; 0 1; 1 0},
</me>
and define <m>T(x) = Ax</m>. The domain of <m>T</m> is <m>\R^2</m>, and the codomain is <m>\R^3</m>. The range of <m>T</m> is the column space; since <m>A</m> has two columns which are not collinear, the range is a plane in <m>\R^3</m>.
</p>
<figure>
<caption>A picture of the matrix transformation <m>T</m>. The input vector is <m>x</m>, which is a vector in <m>\R^2</m>, and the output vector is <m>b=T(x)=Ax</m>, which is a vector in <m>\R^3</m>. The violet plane on the right is the range of <m>T</m>; as you vary <m>x</m>, the output <m>b</m> is constrained to lie on this plane.</caption>
<mathbox source="demos/Axequalsb.html?mat=1,0:0,1:1,0&range2=5&closed=true&show=false" height="500px"/>
</figure>
</example>
<example>
<title>Projection onto the <m>xy</m>-plane: reprise</title>
<idx><h>Orthogonal projection</h><h>onto the <m>xy</m>-plane</h></idx>
<statement>
<p>
Let <me>A = \mat{1 0 0; 0 1 0; 0 0 0},</me> and let <m>T(x) = Ax</m>. What are the domain, the codomain, and the range of <m>T</m>?
</p>
</statement>
<solution>
<p>
Geometrically, the transformation <m>T</m> projects a vector directly <q>down</q> onto the <m>xy</m>-plane in <m>\R^3</m>.
<latex-code>
\begin{tikzpicture}[myxyz]
\begin{scope}[arrows={|[width=4pt]->[width=4pt]}, shorten=4pt]
\draw (-1,-1,-2.5) node[point, seq2] {}
-- (-1,-1,0);
\draw (2,-2,-1) node[point, seq5] {}
-- (2,-2,0);
\end{scope}
\begin{scope}[transformxy]
\fill[white, nearly opaque] (-3, -3) rectangle (3, 3);
\draw[step=1cm, help lines] (-3, -3) grid (3, 3);
\end{scope}
\begin{scope}[arrows={|[width=4pt]->[width=4pt]}, shorten=4pt]
\draw (2,1,3) node[point,seq1] {}
-- (2,1,0) node[point,seq1] {};
\point[seq2] at (-1,-1,0);
\point[seq5] at (2,-2,0);
\draw (-1,2,2) node[point,seq3] {}
-- (-1,2,0) node[point,seq3] {};
\draw (-2,0,1) node[point,seq4] {}
-- (-2,0,0) node[point,seq4] {};
\end{scope}
\end{tikzpicture}
</latex-code>
The inputs and outputs have three entries, so the domain and codomain are both <m>\R^3</m>. The possible outputs all lie on the <m>xy</m>-plane, and every point on the <m>xy</m>-plane is an output of <m>T</m> (with itself as the input), so the range of <m>T</m> is the <m>xy</m>-plane.
</p>
<p>
Be careful not to confuse the codomain with the range here. The range is a plane, but it is a plane <em>in <m>\R^3</m></em>, so the codomain is still <m>\R^3</m>. The outputs of <m>T</m> all have three entries; the last entry is simply always zero.
</p>
</solution>
</example>
<p>
In the case of an <m>n\times n</m> square matrix, the domain and codomain of <m>T(x) = Ax</m> are both <m>\R^n</m>. In this situation, one can regard <m>T</m> as <em>operating on</em> <m>\R^n</m>: it moves the vectors around in the same space.
</p>
<example>
<title>Matrix transformations of <m>\R^2</m></title>
<idx><h>Matrix transformation</h><h>of <m>\R^2</m></h></idx>
<idx><h>Reflection</h><h>over the <m>y</m>-axis</h></idx>
<idx><h>Dilation</h></idx>
<idx><h>Identity matrix</h><h>as a matrix transformation</h></idx>
<idx><h>Rotation</h><h>counterclockwise by <m>90^\circ</m></h></idx>
<idx><h>Shear</h><h>in the <m>x</m>-direction</h></idx>
<p>
In the first <xref ref="matrix-trans-matrices-functions"/> we discussed the transformations defined by several <m>2\times 2</m> matrices, namely:
<md>
<mrow>
\text{Reflection:} &\qquad A=\mat{-1 0; 0 1}
</mrow>
<mrow>
\text{Dilation:} &\qquad A=\mat{1.5 0; 0 1.5}
</mrow>
<mrow>
\text{Identity:} &\qquad A=\mat{1 0; 0 1}
</mrow>
<mrow>
\text{Rotation:} &\qquad A=\mat{0 -1; 1 0}
</mrow>
<mrow>
\text{Shear:} &\qquad A=\mat{1 1; 0 1}.
</mrow>
</md>
In each case, the associated matrix transformation <m>T(x)=Ax</m> has domain and codomain equal to <m>\R^2</m>. The range is also <m>\R^2</m>, as can be seen geometrically (what is the input for a given output?), or using the fact that the columns of <m>A</m> are not collinear (so they form a basis for <m>\R^2</m>).
</p>
</example>
<example xml:id="matrix-trans-questions">
<title>Questions about a [matrix] transformation</title>
<statement>
<p>
Let
<me>
A = \mat{1 1; 0 1; 1 1},
</me>
and let <m>T(x)=Ax</m>, so <m>T\colon\R^2\to\R^3</m> is a matrix transformation.
<ol>
<li>
Evaluate <m>T(u)</m> for <m>u=\vec{3 4}</m>.
</li>
<li>
Let
<me>
b = \vec{7 5 7}.
</me>
Find a vector <m>v</m> in <m>\R^2</m> such that <m>T(v)=b</m>. Is there more than one?
</li>
<li>
Does there exist a vector <m>w</m> in <m>\R^3</m> such that there is more than one <m>v</m> in <m>\R^2</m> with <m>T(v)=w</m>?
</li>
<li>
Find a vector <m>w</m> in <m>\R^3</m> which is not in the range of <m>T</m>.
</li>
</ol>
</p>
<p>
<em>Note:</em> all of the above questions are intrinsic to the transformation <m>T</m>: they make sense to ask whether or not <m>T</m> is a matrix transformation. See the next <xref ref="matrix-trans-questions-nonlinear"/>. As <m>T</m> is in fact a matrix transformation, all of these questions will translate into questions about the corresponding matrix <m>A</m>.
</p>
</statement>
<solution>
<p>
<ol>
<li>
We evaluate <m>T(u)</m> by substituting the definition of <m>T</m> in terms of matrix multiplication:
<me>
T\vec{3 4} = \mat{1 1; 0 1; 1 1}\vec{3 4} = \vec{7 4 7}.
</me>
</li>
<li>
We want to find a vector <m>v</m> such that <m>b = T(v) = Av</m>. In other words, we want to solve the matrix equation <m>Av = b</m>. We form an augmented matrix and row reduce:
<me>
\mat{1 1; 0 1; 1 1} v = \vec{7 5 7}
\;\xrightarrow{\parbox{\widthof{\small augmented}}
{\small\centering augmented matrix}}\;
\amat{1 1 7; 0 1 5; 1 1 7}
\;\xrightarrow{\parbox{\widthof{\small reduce}}
{\small\centering row reduce}}\;
\amat{1 0 2; 0 1 5; 0 0 0}.
</me>
This gives <m>x=2</m> and <m>y=5</m>, so that there is a unique vector
<me>v = \vec{2 5}</me>
such that <m>T(v) = b</m>.
</li>
<li>
<em>Translation:</em> is there any vector <m>w</m> in <m>\R^3</m> such that the solution set of <m>Av=w</m> has more than one vector in it? The solution set of <m>Ax=w</m>, if non-empty, is a translate of the solution set of <m>Av=b</m> above, which has one vector in it. See this <xref ref="solnsets-translate-span"/>. It follows that the solution set of <m>Av=w</m> can have at most one vector.
</li>
<li>
<em>Translation:</em> find a vector <m>w</m> such that the matrix equation <m>Av=w</m> is not consistent. Notice that if we take
<me>w = \vec{1 2 3}</me>,
then the matrix equation <m>Av=w</m> translates into the system of equations
<me>
\syseq{x + y = 1; \. \+ y = 2; x + y = 3\rlap{,}}
</me>
which is clearly inconsistent.
</li>
</ol>
</p>
</solution>
</example>
<example xml:id="matrix-trans-questions-nonlinear">
<title>Questions about a [non-matrix] transformation</title>
<statement>
<p>
Define a transformation <m>T\colon\R^2\to\R^3</m> by the formula
<me>
T\vec{x y} = \vec{\ln(x) \cos(y) \ln(x)}.
</me>
<ol>
<li>
Evaluate <m>T(u)</m> for <m>u=\vec{1 \pi}</m>.
</li>
<li>
Let
<me>
b = \vec{7 1 7}.
</me>
Find a vector <m>v</m> in <m>\R^2</m> such that <m>T(v)=b</m>. Is there more than one?
</li>
<li>