-
Notifications
You must be signed in to change notification settings - Fork 51
/
L08MatrixofLinearTranformation.html~
1045 lines (891 loc) · 65.4 KB
/
L08MatrixofLinearTranformation.html~
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
<!DOCTYPE html>
<html lang="en" data-content_root="" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<title>The Matrix of a Linear Transformation — Linear Algebra, Geometry, and Computation</title>
<script data-cfasync="false">
document.documentElement.dataset.mode = localStorage.getItem("mode") || "";
document.documentElement.dataset.theme = localStorage.getItem("theme") || "light";
</script>
<!-- Loaded before other Sphinx assets -->
<link href="_static/styles/theme.css?digest=5b4479735964841361fd" rel="stylesheet" />
<link href="_static/styles/bootstrap.css?digest=5b4479735964841361fd" rel="stylesheet" />
<link href="_static/styles/pydata-sphinx-theme.css?digest=5b4479735964841361fd" rel="stylesheet" />
<link href="_static/vendor/fontawesome/6.1.2/css/all.min.css?digest=5b4479735964841361fd" rel="stylesheet" />
<link rel="preload" as="font" type="font/woff2" crossorigin href="_static/vendor/fontawesome/6.1.2/webfonts/fa-solid-900.woff2" />
<link rel="preload" as="font" type="font/woff2" crossorigin href="_static/vendor/fontawesome/6.1.2/webfonts/fa-brands-400.woff2" />
<link rel="preload" as="font" type="font/woff2" crossorigin href="_static/vendor/fontawesome/6.1.2/webfonts/fa-regular-400.woff2" />
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" href="_static/styles/sphinx-book-theme.css?digest=14f4ca6b54d191a8c7657f6c759bf11a5fb86285" type="text/css" />
<link rel="stylesheet" type="text/css" href="_static/togglebutton.css" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
<link rel="stylesheet" type="text/css" href="_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css" />
<link rel="stylesheet" type="text/css" href="_static/sphinx-thebe.css" />
<link rel="stylesheet" type="text/css" href="_static/design-style.4045f2051d55cab465a707391d5b2007.min.css" />
<!-- Pre-loaded scripts that we'll load fully later -->
<link rel="preload" as="script" href="_static/scripts/bootstrap.js?digest=5b4479735964841361fd" />
<link rel="preload" as="script" href="_static/scripts/pydata-sphinx-theme.js?digest=5b4479735964841361fd" />
<script src="_static/vendor/fontawesome/6.1.2/js/all.min.js?digest=5b4479735964841361fd"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/clipboard.min.js"></script>
<script src="_static/copybutton.js"></script>
<script src="_static/scripts/sphinx-book-theme.js?digest=5a5c038af52cf7bc1a1ec88eea08e6366ee68824"></script>
<script>let toggleHintShow = 'Click to show';</script>
<script>let toggleHintHide = 'Click to hide';</script>
<script>let toggleOpenOnPrint = 'true';</script>
<script src="_static/togglebutton.js"></script>
<script>var togglebuttonSelector = '.toggle, .admonition.dropdown';</script>
<script src="_static/design-tabs.js"></script>
<script>const THEBE_JS_URL = "https://unpkg.com/thebe@0.8.2/lib/index.js"
const thebe_selector = ".thebe,.cell"
const thebe_selector_input = "pre"
const thebe_selector_output = ".output, .cell_output"
</script>
<script async="async" src="_static/sphinx-thebe.js"></script>
<script>window.MathJax = {"options": {"processHtmlClass": "tex2jax_process|mathjax_process|math|output_area"}}</script>
<script defer="defer" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<script>DOCUMENTATION_OPTIONS.pagename = 'L08MatrixofLinearTranformation';</script>
<link rel="shortcut icon" href="_static/DiagramAR-icon.png"/>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Matrix Algebra" href="L09MatrixOperations.html" />
<link rel="prev" title="Linear Transformations" href="L07LinearTransformations.html" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="docsearch:language" content="en"/>
</head>
<body data-bs-spy="scroll" data-bs-target=".bd-toc-nav" data-offset="180" data-bs-root-margin="0px 0px -60%" data-default-mode="">
<a class="skip-link" href="#main-content">Skip to main content</a>
<div id="pst-scroll-pixel-helper"></div>
<button type="button" class="btn rounded-pill" id="pst-back-to-top">
<i class="fa-solid fa-arrow-up"></i>
Back to top
</button>
<input type="checkbox"
class="sidebar-toggle"
name="__primary"
id="__primary"/>
<label class="overlay overlay-primary" for="__primary"></label>
<input type="checkbox"
class="sidebar-toggle"
name="__secondary"
id="__secondary"/>
<label class="overlay overlay-secondary" for="__secondary"></label>
<div class="search-button__wrapper">
<div class="search-button__overlay"></div>
<div class="search-button__search-container">
<form class="bd-search d-flex align-items-center"
action="search.html"
method="get">
<i class="fa-solid fa-magnifying-glass"></i>
<input type="search"
class="form-control"
name="q"
id="search-input"
placeholder="Search this book..."
aria-label="Search this book..."
autocomplete="off"
autocorrect="off"
autocapitalize="off"
spellcheck="false"/>
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd>K</kbd></span>
</form></div>
</div>
<nav class="bd-header navbar navbar-expand-lg bd-navbar">
</nav>
<div class="bd-container">
<div class="bd-container__inner bd-page-width">
<div class="bd-sidebar-primary bd-sidebar">
<div class="sidebar-header-items sidebar-primary__section">
</div>
<div class="sidebar-primary-items__start sidebar-primary__section">
<div class="sidebar-primary-item">
<a class="navbar-brand logo" href="landing-page.html">
<img src="_static/DiagramAR-icon.png" class="logo__image only-light" alt="Linear Algebra, Geometry, and Computation - Home"/>
<script>document.write(`<img src="_static/DiagramAR-icon.png" class="logo__image only-dark" alt="Linear Algebra, Geometry, and Computation - Home"/>`);</script>
</a></div>
<div class="sidebar-primary-item"><nav class="bd-links" id="bd-docs-nav" aria-label="Main">
<div class="bd-toc-item navbar-nav active">
<ul class="nav bd-sidenav bd-sidenav__home-link">
<li class="toctree-l1">
<a class="reference internal" href="landing-page.html">
Preface
</a>
</li>
</ul>
<ul class="current nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="L01LinearEquations.html">Linear Equations</a></li>
<li class="toctree-l1"><a class="reference internal" href="L02Numerics.html">(Getting Serious About) Numbers</a></li>
<li class="toctree-l1"><a class="reference internal" href="L03RowReductions.html">Gaussian Elimination</a></li>
<li class="toctree-l1"><a class="reference internal" href="L04VectorEquations.html">Vector Equations</a></li>
<li class="toctree-l1"><a class="reference internal" href="L05Axb.html"><span class="math notranslate nohighlight">\(A{\bf x} = {\bf b}\)</span></a></li>
<li class="toctree-l1"><a class="reference internal" href="L06LinearIndependence.html">Linear Independence</a></li>
<li class="toctree-l1"><a class="reference internal" href="L07LinearTransformations.html">Linear Transformations</a></li>
<li class="toctree-l1 current active"><a class="current reference internal" href="#">The Matrix of a Linear Transformation</a></li>
<li class="toctree-l1"><a class="reference internal" href="L09MatrixOperations.html">Matrix Algebra</a></li>
<li class="toctree-l1"><a class="reference internal" href="L10MatrixInverse.html">The Inverse of a Matrix</a></li>
<li class="toctree-l1"><a class="reference internal" href="L11MarkovChains.html">Markov Chains</a></li>
<li class="toctree-l1"><a class="reference internal" href="L12MatrixFactorizations.html">Matrix Factorizations</a></li>
<li class="toctree-l1"><a class="reference internal" href="L13ComputerGraphics.html">Computer Graphics</a></li>
<li class="toctree-l1"><a class="reference internal" href="L14Subspaces.html">Subspaces</a></li>
<li class="toctree-l1"><a class="reference internal" href="L15DimensionRank.html">Dimension and Rank</a></li>
<li class="toctree-l1"><a class="reference internal" href="L16Eigenvectors.html">Eigenvectors and Eigenvalues</a></li>
<li class="toctree-l1"><a class="reference internal" href="L17CharacteristicEqn.html">The Characteristic Equation</a></li>
<li class="toctree-l1"><a class="reference internal" href="L18Diagonalization.html">Diagonalization</a></li>
<li class="toctree-l1"><a class="reference internal" href="L19PageRank.html">PageRank</a></li>
<li class="toctree-l1"><a class="reference internal" href="L20Orthogonality.html">Analytic Geometry in <span class="math notranslate nohighlight">\(\mathbb{R}^n\)</span></a></li>
<li class="toctree-l1"><a class="reference internal" href="L21OrthogonalSets.html">Orthogonal Sets and Projection</a></li>
<li class="toctree-l1"><a class="reference internal" href="L22LeastSquares.html">Least Squares</a></li>
<li class="toctree-l1"><a class="reference internal" href="L23LinearModels.html">Linear Models</a></li>
<li class="toctree-l1"><a class="reference internal" href="L24SymmetricMatrices.html">Symmetric Matrices</a></li>
<li class="toctree-l1"><a class="reference internal" href="L25SVD.html">The Singular Value Decomposition</a></li>
<li class="toctree-l1"><a class="reference internal" href="L26ApplicationsOfSVD.html">Applications of the SVD</a></li>
</ul>
</div>
</nav></div>
</div>
<div class="sidebar-primary-items__end sidebar-primary__section">
</div>
<div id="rtd-footer-container"></div>
</div>
<main id="main-content" class="bd-main">
<div class="sbt-scroll-pixel-helper"></div>
<div class="bd-content">
<div class="bd-article-container">
<div class="bd-header-article">
<div class="header-article-items header-article__inner">
<div class="header-article-items__start">
<div class="header-article-item"><label class="sidebar-toggle primary-toggle btn btn-sm" for="__primary" title="Toggle primary sidebar" data-bs-placement="bottom" data-bs-toggle="tooltip">
<span class="fa-solid fa-bars"></span>
</label></div>
</div>
<div class="header-article-items__end">
<div class="header-article-item">
<div class="article-header-buttons">
<a href="https://github.com/mcrovella/CS132-Geometric-Algorithms" target="_blank"
class="btn btn-sm btn-source-repository-button"
title="Source repository"
data-bs-placement="bottom" data-bs-toggle="tooltip"
>
<span class="btn__icon-container">
<i class="fab fa-github"></i>
</span>
</a>
<div class="dropdown dropdown-download-buttons">
<button class="btn dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false" aria-label="Download this page">
<i class="fas fa-download"></i>
</button>
<ul class="dropdown-menu">
<li><a href="_sources/L08MatrixofLinearTranformation.ipynb" target="_blank"
class="btn btn-sm btn-download-source-button dropdown-item"
title="Download source file"
data-bs-placement="left" data-bs-toggle="tooltip"
>
<span class="btn__icon-container">
<i class="fas fa-file"></i>
</span>
<span class="btn__text-container">.ipynb</span>
</a>
</li>
<li>
<button onclick="window.print()"
class="btn btn-sm btn-download-pdf-button dropdown-item"
title="Print to PDF"
data-bs-placement="left" data-bs-toggle="tooltip"
>
<span class="btn__icon-container">
<i class="fas fa-file-pdf"></i>
</span>
<span class="btn__text-container">.pdf</span>
</button>
</li>
</ul>
</div>
<button onclick="toggleFullScreen()"
class="btn btn-sm btn-fullscreen-button"
title="Fullscreen mode"
data-bs-placement="bottom" data-bs-toggle="tooltip"
>
<span class="btn__icon-container">
<i class="fas fa-expand"></i>
</span>
</button>
<script>
document.write(`
<button class="btn btn-sm navbar-btn theme-switch-button" title="light/dark" aria-label="light/dark" data-bs-placement="bottom" data-bs-toggle="tooltip">
<span class="theme-switch nav-link" data-mode="light"><i class="fa-solid fa-sun fa-lg"></i></span>
<span class="theme-switch nav-link" data-mode="dark"><i class="fa-solid fa-moon fa-lg"></i></span>
<span class="theme-switch nav-link" data-mode="auto"><i class="fa-solid fa-circle-half-stroke fa-lg"></i></span>
</button>
`);
</script>
<script>
document.write(`
<button class="btn btn-sm navbar-btn search-button search-button__button" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
<i class="fa-solid fa-magnifying-glass fa-lg"></i>
</button>
`);
</script>
<label class="sidebar-toggle secondary-toggle btn btn-sm" for="__secondary"title="Toggle secondary sidebar" data-bs-placement="bottom" data-bs-toggle="tooltip">
<span class="fa-solid fa-list"></span>
</label>
</div></div>
</div>
</div>
</div>
<div id="jb-print-docs-body" class="onlyprint">
<h1>The Matrix of a Linear Transformation</h1>
<!-- Table of contents -->
<div id="print-main-content">
<div id="jb-print-toc">
<div>
<h2> Contents </h2>
</div>
<nav aria-label="Page">
<ul class="visible nav section-nav flex-column">
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#geometric-linear-transformations-of-mathbb-r-2">Geometric Linear Transformations of <span class="math notranslate nohighlight">\(\mathbb{R}^2\)</span></a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#area-is-scaled-by-the-determinant">Area is Scaled by the Determinant</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#existence-and-uniqueness">Existence and Uniqueness</a></li>
</ul>
</nav>
</div>
</div>
</div>
<div id="searchbox"></div>
<article class="bd-article" role="main">
<section class="tex2jax_ignore mathjax_ignore" id="the-matrix-of-a-linear-transformation">
<h1>The Matrix of a Linear Transformation<a class="headerlink" href="#the-matrix-of-a-linear-transformation" title="Permalink to this heading">#</a></h1>
<p>In the last lecture we introduced the idea of a <strong>linear transformation</strong>:</p>
<div class="cell tag_remove-input docutils container">
<div class="cell_output docutils container">
<img alt="_images/6cc84d7076ff2ad84485b62de3da2a4016f1743faf03d7219e5a91c109682608.jpg" src="_images/6cc84d7076ff2ad84485b62de3da2a4016f1743faf03d7219e5a91c109682608.jpg" />
</div>
</div>
<p>We have seen that every matrix multiplication is a linear transformation from vectors to vectors.</p>
<p>But, are there any other possible linear transformations from vectors to vectors?</p>
<p>No.</p>
<p>In other words, the reverse statement is also true:</p>
<blockquote>
<div><p><font color = "blue"> every linear transformation from vectors to vectors is a matrix multiplication. </font></p>
</div></blockquote>
<p>We’ll now prove this fact.</p>
<p>We’ll do it <strong>constructively</strong>, meaning we’ll actually show how to find the matrix corresponding to any given linear transformation <span class="math notranslate nohighlight">\(T\)</span>.</p>
<p><strong>Theorem.</strong> Let <span class="math notranslate nohighlight">\(T: \mathbb{R}^n \rightarrow \mathbb{R}^m\)</span> be a linear transformation. Then there is (always) a unique matrix <span class="math notranslate nohighlight">\(A\)</span> such that:</p>
<div class="math notranslate nohighlight">
\[ T({\bf x}) = A{\bf x} \;\;\; \mbox{for all}\; {\bf x} \in \mathbb{R}^n.\]</div>
<p>In fact, <span class="math notranslate nohighlight">\(A\)</span> is the <span class="math notranslate nohighlight">\(m \times n\)</span> matrix whose <span class="math notranslate nohighlight">\(j\)</span>th column is the vector <span class="math notranslate nohighlight">\(T({\bf e_j})\)</span>, where <span class="math notranslate nohighlight">\({\bf e_j}\)</span> is the <span class="math notranslate nohighlight">\(j\)</span>th column of the identity matrix in <span class="math notranslate nohighlight">\(\mathbb{R}^n\)</span>:</p>
<div class="math notranslate nohighlight">
\[A = \left[T({\bf e_1}) \dots T({\bf e_n})\right].\]</div>
<p><span class="math notranslate nohighlight">\(A\)</span> is called the <em>standard matrix</em> of <span class="math notranslate nohighlight">\(T\)</span>.</p>
<p><strong>Proof.</strong> Write</p>
<div class="math notranslate nohighlight">
\[{\bf x} = I{\bf x} = \left[{\bf e_1} \dots {\bf e_n}\right]\bf x\]</div>
<div class="math notranslate nohighlight">
\[ = x_1{\bf e_1} + \dots + x_n{\bf e_n}.\]</div>
<p>In other words, for any <span class="math notranslate nohighlight">\(\mathbf{x}\)</span>, we can always expand it as:</p>
<div class="math notranslate nohighlight">
\[\begin{split} \mathbf{x}
\;= \;\;\;\;\;
\begin{bmatrix}
1 & 0 & \dots & 0 \\
0 & 1 & \dots & 0\\
\vdots & \vdots & \ddots & \vdots\\
0 & 0 & \dots & 1
\end{bmatrix} \; \begin{bmatrix}x_1\\x_2\\ \vdots \\ x_n\end{bmatrix}
\;\;\;\;\;= \;\;\;\;\;
\begin{bmatrix} x_1 \\ 0 \\ \vdots \\ 0 \end{bmatrix} +
\begin{bmatrix} 0 \\ x_2 \\ \vdots \\ 0 \end{bmatrix} +
\dots +
\begin{bmatrix} 0 \\ 0 \\ \vdots \\ x_n \end{bmatrix} \end{split}\]</div>
<p>Because <span class="math notranslate nohighlight">\(T\)</span> is linear, we have:</p>
<div class="math notranslate nohighlight">
\[ T({\bf x}) = T(x_1{\bf e_1} + \dots + x_n{\bf e_n})\]</div>
<div class="math notranslate nohighlight">
\[ = x_1T({\bf e_1}) + \dots + x_nT({\bf e_n})\]</div>
<div class="math notranslate nohighlight">
\[\begin{split} = \left[T({\bf e_1}) \dots T({\bf e_n})\right] \, \left[\begin{array}{r}x_1\\\vdots\\x_n\end{array}\right] = A{\bf x}.\end{split}\]</div>
<p>So … we see that the ideas of <strong>matrix multiplication</strong> and <strong>linear transformation</strong> are essentially equivalent when applied to vectors.</p>
<p>Every matrix multiplication is a linear transformation, and every linear transformation from vectors to vectors is a matrix multiplication.</p>
<p><strong>However</strong>, term <em>linear transformation</em> focuses on a <strong>property</strong> of the mapping, while the term <em>matrix multiplication</em> focuses on how such a mapping is <strong>implemented.</strong></p>
<p>This proof shows us an important idea:</p>
<p><font color='blue'> To find the standard matrix of a linear transformation, ask what the transformation does to the columns of <span class="math notranslate nohighlight">\(I\)</span>.</font></p>
<p>In other words, if <span class="math notranslate nohighlight">\( T(\mathbf{x}) = A\mathbf{x} \)</span>, then:</p>
<div class="math notranslate nohighlight">
\[A = \left[T({\bf e_1}) \dots T({\bf e_n})\right].\]</div>
<p>This gives us a way to compute the standard matrix of a transformation.</p>
<p>Now, in <span class="math notranslate nohighlight">\(\mathbb{R}^2\)</span>, <span class="math notranslate nohighlight">\(I = \left[\begin{array}{cc}1&0\\0&1\end{array}\right]\)</span>. So:</p>
<div class="math notranslate nohighlight">
\[\begin{split}\mathbf{e_1} = \left[\begin{array}{c}1\\0\end{array}\right]\;\;\mbox{and}\;\;\mathbf{e_2} = \left[\begin{array}{c}0\\1\end{array}\right].\end{split}\]</div>
<p>So to find the matrix of any given linear transformation of vectors in <span class="math notranslate nohighlight">\(\mathbb{R}^2\)</span>, we only have to know what that transformation does to these two points:</p>
<div class="cell tag_remove-input docutils container">
<div class="cell_output docutils container">
<img alt="_images/3fd49a4c73bda8df6ccde3282e58e6914f700b9aca1d8b4bd43ba29adfeff9f3.png" src="_images/3fd49a4c73bda8df6ccde3282e58e6914f700b9aca1d8b4bd43ba29adfeff9f3.png" />
</div>
</div>
<p>This is a <strong>hugely</strong> powerful tool.</p>
<p>Let’s say we start from some given linear transformation; we can use this idea to find the matrix that implements that linear transformation.</p>
<p>For example, let’s consider rotation about the origin as a kind of transformation.</p>
<div class="cell tag_remove-input docutils container">
<div class="cell_output docutils container">
<img alt="_images/75a0ee7be2f0ccdbe19779ac6f2a1dc1ee784d9c9ecf229a9f89e8cb31d4aed7.png" src="_images/75a0ee7be2f0ccdbe19779ac6f2a1dc1ee784d9c9ecf229a9f89e8cb31d4aed7.png" />
</div>
</div>
<p>First things first: Is rotation a <strong>linear</strong> transformation?</p>
<p>Recall that a for a transformation to be linear, it must be true that <span class="math notranslate nohighlight">\(T(\mathbf{u} + \mathbf{v}) = T(\mathbf{u}) + T(\mathbf{v}).\)</span></p>
<p>I’m going to show you a “geometric proof.”</p>
<p>This figure shows that “the rotation of <span class="math notranslate nohighlight">\(\mathbf{u+v}\)</span> is the sum of the rotation of <span class="math notranslate nohighlight">\(\mathbf{u}\)</span> and the rotation of <span class="math notranslate nohighlight">\(\mathbf{v}\)</span>”.</p>
<div class="cell tag_remove-input docutils container">
<div class="cell_output docutils container">
<img alt="_images/dcbec68944ae8e3e0fbcdea38be342a480fe47b8f801a28cd7e392035df4284b.png" src="_images/dcbec68944ae8e3e0fbcdea38be342a480fe47b8f801a28cd7e392035df4284b.png" />
</div>
</div>
<p>OK, so rotation is a linear transformation.</p>
<p>Let’s see how to <strong>compute</strong> the linear transformation that is a rotation.</p>
<p><strong>Specifically:</strong> Let <span class="math notranslate nohighlight">\(T: \mathbb{R}^2 \rightarrow \mathbb{R}^2\)</span> be the transformation that rotates each point in <span class="math notranslate nohighlight">\(\mathbb{R}^2\)</span> about the origin through an angle <span class="math notranslate nohighlight">\(\theta\)</span>, with counterclockwise rotation for a positive angle.</p>
<p>Let’s find the standard matrix <span class="math notranslate nohighlight">\(A\)</span> of this transformation.</p>
<p><strong>Solution.</strong> The columns of <span class="math notranslate nohighlight">\(I\)</span> are <span class="math notranslate nohighlight">\({\bf e_1} = \left[\begin{array}{r}1\\0\end{array}\right]\)</span> and <span class="math notranslate nohighlight">\({\bf e_2} = \left[\begin{array}{r}0\\1\end{array}\right].\)</span></p>
<p>Referring to the diagram below, we can see that <span class="math notranslate nohighlight">\(\left[\begin{array}{r}1\\0\end{array}\right]\)</span> rotates into <span class="math notranslate nohighlight">\(\left[\begin{array}{r}\cos\theta\\\sin\theta\end{array}\right],\)</span> and <span class="math notranslate nohighlight">\(\left[\begin{array}{r}0\\1\end{array}\right]\)</span> rotates into <span class="math notranslate nohighlight">\(\left[\begin{array}{r}-\sin\theta\\\cos\theta\end{array}\right].\)</span></p>
<div class="cell tag_remove-input docutils container">
<div class="cell_output docutils container">
<img alt="_images/2050fd20a2388de3d088ae1bacb981c8503a13436d62bd06901bd2948e28974f.png" src="_images/2050fd20a2388de3d088ae1bacb981c8503a13436d62bd06901bd2948e28974f.png" />
</div>
</div>
<p>So by the Theorem above,</p>
<div class="math notranslate nohighlight">
\[\begin{split} A = \left[\begin{array}{rr}\cos\theta&-\sin\theta\\\sin\theta&\cos\theta\end{array}\right].\end{split}\]</div>
<p>To demonstrate the use of a rotation matrix, let’s rotate the following shape:</p>
<div class="cell docutils container">
<div class="cell_input docutils container">
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">dm</span><span class="o">.</span><span class="n">plotSetup</span><span class="p">()</span>
<span class="n">note</span> <span class="o">=</span> <span class="n">dm</span><span class="o">.</span><span class="n">mnote</span><span class="p">()</span>
<span class="n">dm</span><span class="o">.</span><span class="n">plotShape</span><span class="p">(</span><span class="n">note</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="cell_output docutils container">
<img alt="_images/b271037992491a7553bff2326ddb7375f46cdc3d5dc3fa869ea3f7b23e618c3a.png" src="_images/b271037992491a7553bff2326ddb7375f46cdc3d5dc3fa869ea3f7b23e618c3a.png" />
</div>
</div>
<p>The variable <code class="docutils literal notranslate"><span class="pre">note</span></code> is a array of 26 vectors in <span class="math notranslate nohighlight">\(\mathbb{R}^2\)</span> that define its shape.</p>
<p>In other words, it is a 2 <span class="math notranslate nohighlight">\(\times\)</span> 26 matrix.</p>
<p>To rotate <code class="docutils literal notranslate"><span class="pre">note</span></code> we need to multiply each column of <code class="docutils literal notranslate"><span class="pre">note</span></code> by the rotation matrix <span class="math notranslate nohighlight">\(A\)</span>.</p>
<p>In Python this can be performed using the <code class="docutils literal notranslate"><span class="pre">@</span></code> operator.</p>
<p>That is, if <code class="docutils literal notranslate"><span class="pre">A</span></code> and <code class="docutils literal notranslate"><span class="pre">B</span></code> are matrices,</p>
<p><code class="docutils literal notranslate"><span class="pre">A</span> <span class="pre">@</span> <span class="pre">B</span></code></p>
<p>will multiply <code class="docutils literal notranslate"><span class="pre">A</span></code> by every column of <code class="docutils literal notranslate"><span class="pre">B,</span></code> and the resulting vectors will be formed
into a matrix.</p>
<div class="cell docutils container">
<div class="cell_input docutils container">
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">dm</span><span class="o">.</span><span class="n">plotSetup</span><span class="p">()</span>
<span class="n">angle</span> <span class="o">=</span> <span class="mi">90</span>
<span class="n">theta</span> <span class="o">=</span> <span class="p">(</span><span class="n">angle</span><span class="o">/</span><span class="mi">180</span><span class="p">)</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">pi</span>
<span class="n">A</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span>
<span class="p">[[</span><span class="n">np</span><span class="o">.</span><span class="n">cos</span><span class="p">(</span><span class="n">theta</span><span class="p">),</span> <span class="o">-</span><span class="n">np</span><span class="o">.</span><span class="n">sin</span><span class="p">(</span><span class="n">theta</span><span class="p">)],</span>
<span class="p">[</span><span class="n">np</span><span class="o">.</span><span class="n">sin</span><span class="p">(</span><span class="n">theta</span><span class="p">),</span> <span class="n">np</span><span class="o">.</span><span class="n">cos</span><span class="p">(</span><span class="n">theta</span><span class="p">)]])</span>
<span class="n">rnote</span> <span class="o">=</span> <span class="n">A</span> <span class="o">@</span> <span class="n">note</span>
<span class="n">dm</span><span class="o">.</span><span class="n">plotShape</span><span class="p">(</span><span class="n">rnote</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="cell_output docutils container">
<img alt="_images/1d30853b5a998d89539344ae8475c0ba5b099336f0f3dd2f7ffeeb746fa6849f.png" src="_images/1d30853b5a998d89539344ae8475c0ba5b099336f0f3dd2f7ffeeb746fa6849f.png" />
</div>
</div>
<section id="geometric-linear-transformations-of-mathbb-r-2">
<h2>Geometric Linear Transformations of <span class="math notranslate nohighlight">\(\mathbb{R}^2\)</span><a class="headerlink" href="#geometric-linear-transformations-of-mathbb-r-2" title="Permalink to this heading">#</a></h2>
<p>Let’s use our understanding of how to construct linear transformations to look at some specific linear transformations of <span class="math notranslate nohighlight">\(\mathbb{R}^2\)</span> to <span class="math notranslate nohighlight">\(\mathbb{R}^2\)</span>.</p>
<p>First, let’s recall the linear transformation</p>
<div class="math notranslate nohighlight">
\[T(\mathbf{x}) = r\mathbf{x}.\]</div>
<p>With <span class="math notranslate nohighlight">\(r > 1\)</span>, this is a dilation. It moves every vector further from the origin.</p>
<p>Let’s say the dilation is by a factor of 2.5.</p>
<p>To construct the matrix <span class="math notranslate nohighlight">\(A\)</span> that implements this transformation, we ask: where do <span class="math notranslate nohighlight">\({\bf e_1}\)</span> and <span class="math notranslate nohighlight">\({\bf e_2}\)</span> go?</p>
<div class="cell tag_remove-input docutils container">
<div class="cell_output docutils container">
<img alt="_images/3fd49a4c73bda8df6ccde3282e58e6914f700b9aca1d8b4bd43ba29adfeff9f3.png" src="_images/3fd49a4c73bda8df6ccde3282e58e6914f700b9aca1d8b4bd43ba29adfeff9f3.png" />
</div>
</div>
<p>Under the action of <span class="math notranslate nohighlight">\(A\)</span>, <span class="math notranslate nohighlight">\(\mathbf{e_1}\)</span> goes to <span class="math notranslate nohighlight">\(\left[\begin{array}{c}2.5\\0\end{array}\right]\)</span> and <span class="math notranslate nohighlight">\(\mathbf{e_2}\)</span> goes to <span class="math notranslate nohighlight">\(\left[\begin{array}{c}0\\2.5\end{array}\right]\)</span>.</p>
<p>So the matrix <span class="math notranslate nohighlight">\(A\)</span> must be <span class="math notranslate nohighlight">\(\left[\begin{array}{cc}2.5&0\\0&2.5\end{array}\right]\)</span>.</p>
<p>Let’s test this out:</p>
<div class="cell docutils container">
<div class="cell_input docutils container">
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">square</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span>
<span class="p">[[</span><span class="mi">0</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">0</span><span class="p">],</span>
<span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">]])</span>
<span class="n">A</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span>
<span class="p">[[</span><span class="mf">2.5</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span>
<span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mf">2.5</span><span class="p">]])</span>
<span class="n">display</span><span class="p">(</span><span class="n">Latex</span><span class="p">(</span><span class="sa">rf</span><span class="s2">"$A = </span><span class="si">{</span><span class="n">ltx_array_fmt</span><span class="p">(</span><span class="n">A</span><span class="p">,</span><span class="w"> </span><span class="s1">'</span><span class="si">{:1.1f}</span><span class="s1">'</span><span class="p">)</span><span class="si">}</span><span class="s2">$"</span><span class="p">))</span>
<span class="n">dm</span><span class="o">.</span><span class="n">plotSetup</span><span class="p">()</span>
<span class="n">dm</span><span class="o">.</span><span class="n">plotSquare</span><span class="p">(</span><span class="n">square</span><span class="p">)</span>
<span class="n">dm</span><span class="o">.</span><span class="n">plotSquare</span><span class="p">(</span><span class="n">A</span> <span class="o">@</span> <span class="n">square</span><span class="p">,</span><span class="s1">'r'</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="cell_output docutils container">
<div class="output text_latex math notranslate nohighlight">
\[\begin{split}A = \begin{bmatrix}
2.5 & 0.0\\
0.0 & 2.5
\end{bmatrix}\end{split}\]</div>
<img alt="_images/424c86d187e8d41231ebf823eb485ccbcf9aa93e11aa72d6e8987e380bb0bb38.png" src="_images/424c86d187e8d41231ebf823eb485ccbcf9aa93e11aa72d6e8987e380bb0bb38.png" />
</div>
</div>
<div class="cell docutils container">
<div class="cell_input docutils container">
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">dm</span><span class="o">.</span><span class="n">plotSetup</span><span class="p">(</span><span class="o">-</span><span class="mi">7</span><span class="p">,</span><span class="mi">7</span><span class="p">,</span><span class="o">-</span><span class="mi">7</span><span class="p">,</span> <span class="mi">7</span><span class="p">)</span>
<span class="n">dm</span><span class="o">.</span><span class="n">plotShape</span><span class="p">(</span><span class="n">note</span><span class="p">)</span>
<span class="n">dm</span><span class="o">.</span><span class="n">plotShape</span><span class="p">(</span><span class="n">A</span> <span class="o">@</span> <span class="n">note</span><span class="p">,</span><span class="s1">'r'</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="cell_output docutils container">
<img alt="_images/25e01f127e433fe6b9d4f903953457a56a4ea5eebb5046c57d46aec29c0cd1ec.png" src="_images/25e01f127e433fe6b9d4f903953457a56a4ea5eebb5046c57d46aec29c0cd1ec.png" />
</div>
</div>
<p>OK, now let’s reflect through the <span class="math notranslate nohighlight">\(x_1\)</span> axis. Where do <span class="math notranslate nohighlight">\({\bf e_1}\)</span> and <span class="math notranslate nohighlight">\({\bf e_2}\)</span> go?</p>
<div class="cell tag_remove-input docutils container">
<div class="cell_output docutils container">
<img alt="_images/3fd49a4c73bda8df6ccde3282e58e6914f700b9aca1d8b4bd43ba29adfeff9f3.png" src="_images/3fd49a4c73bda8df6ccde3282e58e6914f700b9aca1d8b4bd43ba29adfeff9f3.png" />
</div>
</div>
<div class="cell docutils container">
<div class="cell_input docutils container">
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">A</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span>
<span class="p">[[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span>
<span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">]])</span>
<span class="n">display</span><span class="p">(</span><span class="n">Latex</span><span class="p">(</span><span class="sa">rf</span><span class="s2">"$A = </span><span class="si">{</span><span class="n">ltx_array_fmt</span><span class="p">(</span><span class="n">A</span><span class="p">,</span><span class="w"> </span><span class="s1">'</span><span class="si">{:d}</span><span class="s1">'</span><span class="p">)</span><span class="si">}</span><span class="s2">$"</span><span class="p">))</span>
<span class="n">dm</span><span class="o">.</span><span class="n">plotSetup</span><span class="p">()</span>
<span class="n">dm</span><span class="o">.</span><span class="n">plotSquare</span><span class="p">(</span><span class="n">square</span><span class="p">)</span>
<span class="n">dm</span><span class="o">.</span><span class="n">plotSquare</span><span class="p">(</span><span class="n">A</span> <span class="o">@</span> <span class="n">square</span><span class="p">,</span><span class="s1">'r'</span><span class="p">)</span>
<span class="n">plt</span><span class="o">.</span><span class="n">title</span><span class="p">(</span><span class="sa">r</span><span class="s1">'Reflection through the $x_1$ axis'</span><span class="p">,</span> <span class="n">size</span> <span class="o">=</span> <span class="mi">20</span><span class="p">);</span>
</pre></div>
</div>
</div>
<div class="cell_output docutils container">
<div class="output text_latex math notranslate nohighlight">
\[\begin{split}A = \begin{bmatrix}
1 & 0 \\
0 & -1
\end{bmatrix}\end{split}\]</div>
<img alt="_images/a16495e2b943b2cf22d5ee385fa85ad236436a4ce483a9f737a77ee5126d2147.png" src="_images/a16495e2b943b2cf22d5ee385fa85ad236436a4ce483a9f737a77ee5126d2147.png" />
</div>
</div>
<div class="cell docutils container">
<div class="cell_input docutils container">
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">dm</span><span class="o">.</span><span class="n">plotSetup</span><span class="p">()</span>
<span class="n">dm</span><span class="o">.</span><span class="n">plotShape</span><span class="p">(</span><span class="n">note</span><span class="p">)</span>
<span class="n">dm</span><span class="o">.</span><span class="n">plotShape</span><span class="p">(</span><span class="n">A</span> <span class="o">@</span> <span class="n">note</span><span class="p">,</span><span class="s1">'r'</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="cell_output docutils container">
<img alt="_images/0ec6657d266118a881cb50025d546b815b892c5d4dd413730200522683251eac.png" src="_images/0ec6657d266118a881cb50025d546b815b892c5d4dd413730200522683251eac.png" />
</div>
</div>
<p>What about reflection through the <span class="math notranslate nohighlight">\(x_2\)</span> axis?</p>
<div class="cell docutils container">
<div class="cell_input docutils container">
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">A</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span>
<span class="p">[[</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span><span class="mi">0</span><span class="p">],</span>
<span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">]])</span>
<span class="n">display</span><span class="p">(</span><span class="n">Latex</span><span class="p">(</span><span class="sa">rf</span><span class="s2">"$A = </span><span class="si">{</span><span class="n">ltx_array_fmt</span><span class="p">(</span><span class="n">A</span><span class="p">,</span><span class="w"> </span><span class="s1">'</span><span class="si">{:2d}</span><span class="s1">'</span><span class="p">)</span><span class="si">}</span><span class="s2">$"</span><span class="p">))</span>
<span class="n">dm</span><span class="o">.</span><span class="n">plotSetup</span><span class="p">()</span>
<span class="n">dm</span><span class="o">.</span><span class="n">plotSquare</span><span class="p">(</span><span class="n">square</span><span class="p">)</span>
<span class="n">dm</span><span class="o">.</span><span class="n">plotSquare</span><span class="p">(</span><span class="n">A</span> <span class="o">@</span> <span class="n">square</span><span class="p">,</span><span class="s1">'r'</span><span class="p">)</span>
<span class="n">plt</span><span class="o">.</span><span class="n">title</span><span class="p">(</span><span class="sa">r</span><span class="s1">'Reflection through the $x_2$ axis'</span><span class="p">,</span> <span class="n">size</span> <span class="o">=</span> <span class="mi">20</span><span class="p">);</span>
</pre></div>
</div>
</div>
<div class="cell_output docutils container">
<div class="output text_latex math notranslate nohighlight">
\[\begin{split}A = \begin{bmatrix}
-1 & 0 \\
0 & 1
\end{bmatrix}\end{split}\]</div>
<img alt="_images/b7cb88d3ffd620a35dca5f7e87d3c3b56064c0b1e289729a20368752a86d647f.png" src="_images/b7cb88d3ffd620a35dca5f7e87d3c3b56064c0b1e289729a20368752a86d647f.png" />
</div>
</div>
<div class="cell docutils container">
<div class="cell_input docutils container">
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">dm</span><span class="o">.</span><span class="n">plotSetup</span><span class="p">()</span>
<span class="n">dm</span><span class="o">.</span><span class="n">plotShape</span><span class="p">(</span><span class="n">note</span><span class="p">)</span>
<span class="n">dm</span><span class="o">.</span><span class="n">plotShape</span><span class="p">(</span><span class="n">A</span> <span class="o">@</span> <span class="n">note</span><span class="p">,</span><span class="s1">'r'</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="cell_output docutils container">
<img alt="_images/ea3083e8a9b5ec05b2d8eeff534c651826bf73aa0e488d61741d3fb0951bf9fd.png" src="_images/ea3083e8a9b5ec05b2d8eeff534c651826bf73aa0e488d61741d3fb0951bf9fd.png" />
</div>
</div>
<p>What about reflection through the line <span class="math notranslate nohighlight">\(x_1 = x_2\)</span>?</p>
<div class="cell tag_remove-input docutils container">
<div class="cell_output docutils container">
<div class="output text_latex math notranslate nohighlight">
\[\begin{split}A = \begin{bmatrix}
0 & 1 \\
1 & 0
\end{bmatrix}\end{split}\]</div>
<img alt="_images/529f7f28931bfa043a21c7871bb1d4e1ba3e3dbbb299f175d4a0b25596ef6583.png" src="_images/529f7f28931bfa043a21c7871bb1d4e1ba3e3dbbb299f175d4a0b25596ef6583.png" />
</div>
</div>
<div class="cell tag_remove-input docutils container">
<div class="cell_output docutils container">
<img alt="_images/db981e21289a28ddd6ca00a0033342e59730d28804580c1431d571bfaed7708c.png" src="_images/db981e21289a28ddd6ca00a0033342e59730d28804580c1431d571bfaed7708c.png" />
</div>
</div>
<p>What about reflection through the line <span class="math notranslate nohighlight">\(x_1 = -x_2\)</span>?</p>
<div class="cell tag_remove-input docutils container">
<div class="cell_output docutils container">
<div class="output text_latex math notranslate nohighlight">
\[\begin{split}A = \begin{bmatrix}
0 & -1 \\
-1 & 0
\end{bmatrix}\end{split}\]</div>
<img alt="_images/07b08ed0ecc3af8b530ef383bd96bd151bfe283df0bb2dbe94f480ef7c5d2e30.png" src="_images/07b08ed0ecc3af8b530ef383bd96bd151bfe283df0bb2dbe94f480ef7c5d2e30.png" />
</div>
</div>
<div class="cell tag_remove-input docutils container">
<div class="cell_output docutils container">
<img alt="_images/011013b27f197e33f726d222fca48672e3a089de8bc715ba2f3e70eefc004731.png" src="_images/011013b27f197e33f726d222fca48672e3a089de8bc715ba2f3e70eefc004731.png" />
</div>
</div>
<p>What about reflection through the origin?</p>
<div class="cell tag_remove-input docutils container">
<div class="cell_output docutils container">
<div class="output text_latex math notranslate nohighlight">
\[\begin{split}A = \begin{bmatrix}
-1 & 0 \\
0 & -1
\end{bmatrix}\end{split}\]</div>
<img alt="_images/87d9ce11b89482fbd6fbbec3145cc6e4d4ea62a29e6c4a5cdf1607300dd37e22.png" src="_images/87d9ce11b89482fbd6fbbec3145cc6e4d4ea62a29e6c4a5cdf1607300dd37e22.png" />
</div>
</div>
<div class="cell tag_remove-input docutils container">
<div class="cell_output docutils container">
<img alt="_images/590ea8aa02006158bddfc0369426348d84b8b8dfcbd2c1c608ee39e37579930f.png" src="_images/590ea8aa02006158bddfc0369426348d84b8b8dfcbd2c1c608ee39e37579930f.png" />
</div>
</div>
<div class="cell tag_remove-input docutils container">
<div class="cell_output docutils container">
<div class="output text_latex math notranslate nohighlight">
\[\begin{split}A = \begin{bmatrix}
0.45 & 0.00\\
0.00 & 1.00
\end{bmatrix}\end{split}\]</div>
<img alt="_images/1e843e1262ae7f59960f257cbb4ca4988791d2044d959b07edd7841a07eacc7d.png" src="_images/1e843e1262ae7f59960f257cbb4ca4988791d2044d959b07edd7841a07eacc7d.png" />
</div>
</div>
<div class="cell tag_remove-input docutils container">
<div class="cell_output docutils container">
<img alt="_images/d037a6a5c6668cc85a6536756e234fbf520fc3c722d4d25515ad43a427a24e2f.png" src="_images/d037a6a5c6668cc85a6536756e234fbf520fc3c722d4d25515ad43a427a24e2f.png" />
</div>
</div>
<div class="cell tag_remove-input docutils container">
<div class="cell_output docutils container">
<div class="output text_latex math notranslate nohighlight">
\[\begin{split}A = \begin{bmatrix}
2.5 & 0.0\\
0.0 & 1.0
\end{bmatrix}\end{split}\]</div>
<img alt="_images/26433b1ee0b58b772386457e13cf6d072c4026e6de29ab76cd3b19637df00fa2.png" src="_images/26433b1ee0b58b772386457e13cf6d072c4026e6de29ab76cd3b19637df00fa2.png" />
</div>
</div>
<div class="cell tag_remove-input docutils container">
<div class="cell_output docutils container">
<div class="output text_latex math notranslate nohighlight">
\[\begin{split}A = \begin{bmatrix}
1.0 & 0.0\\
-1.5 & 1.0
\end{bmatrix}\end{split}\]</div>
<img alt="_images/ac531ab366540b8690f9d499c612f0ddbc962ae7121140d3d2befc39d8899f5d.png" src="_images/ac531ab366540b8690f9d499c612f0ddbc962ae7121140d3d2befc39d8899f5d.png" />
</div>
</div>
<div class="cell tag_remove-input docutils container">
<div class="cell_output docutils container">
<img alt="_images/8a01f6e7240757bfab25b9ca4f0eee763fe3008f17f596b9f5da04d199e4f79e.png" src="_images/8a01f6e7240757bfab25b9ca4f0eee763fe3008f17f596b9f5da04d199e4f79e.png" />
</div>
</div>
<p>Now let’s look at a particular kind of transformation called a <strong>projection</strong>.</p>
<p>Imagine we took any given point and ‘dropped’ it onto the <span class="math notranslate nohighlight">\(x_1\)</span>-axis.</p>
<div class="cell tag_remove-input docutils container">
<div class="cell_output docutils container">
<div class="output text_latex math notranslate nohighlight">
\[\begin{split}A = \begin{bmatrix}
1 & 0 \\
0 & 0
\end{bmatrix}\end{split}\]</div>
<img alt="_images/4ba9d4fc56a086125631446d7920f61efea13288c514ad88a49cef89d75f3f61.png" src="_images/4ba9d4fc56a086125631446d7920f61efea13288c514ad88a49cef89d75f3f61.png" />
</div>
</div>
<p>What happens to the <strong>shape</strong> of the point set?</p>
<div class="cell tag_remove-input docutils container">
<div class="cell_output docutils container">
<img alt="_images/34f2bbf111de20aa749d02e3fb64a5e9d61592ae4631ead817a4d4f7d74da80c.png" src="_images/34f2bbf111de20aa749d02e3fb64a5e9d61592ae4631ead817a4d4f7d74da80c.png" />
</div>
</div>
<div class="cell tag_remove-input docutils container">
<div class="cell_output docutils container">
<div class="output text_latex math notranslate nohighlight">
\[\begin{split}A = \begin{bmatrix}
0 & 0 \\
0 & 1
\end{bmatrix}\end{split}\]</div>
<img alt="_images/f1eabbe8b54a65981a170bcfee60a8e88c6182a8cfaf4fefa3dfe62ff98037c7.png" src="_images/f1eabbe8b54a65981a170bcfee60a8e88c6182a8cfaf4fefa3dfe62ff98037c7.png" />
</div>
</div>
<div class="cell tag_remove-input docutils container">
<div class="cell_output docutils container">
<img alt="_images/aeb13fbea7e209822c2e7c2016e0f5c4119538f367d664d2475b38e73455612c.png" src="_images/aeb13fbea7e209822c2e7c2016e0f5c4119538f367d664d2475b38e73455612c.png" />
</div>
</div>
</section>
<section id="area-is-scaled-by-the-determinant">
<h2>Area is Scaled by the Determinant<a class="headerlink" href="#area-is-scaled-by-the-determinant" title="Permalink to this heading">#</a></h2>
<p>Notice that in some of the transformations above, the “size” of a shape grows or shrinks.</p>
<p>Let’s look at how area (or volume) of a shape is affected by a linear transformation.</p>
<div class="cell tag_remove-input docutils container">
<div class="cell_output docutils container">
<div class="output text_latex math notranslate nohighlight">
\[\begin{split}A = \begin{bmatrix}
0.45 & 0.00\\
0.00 & 1.00
\end{bmatrix}\end{split}\]</div>
<img alt="_images/8f7cd1ba90961d6ec300516c1d8cd93fd34ef28437ca1afc81f231dda6bd597d.png" src="_images/8f7cd1ba90961d6ec300516c1d8cd93fd34ef28437ca1afc81f231dda6bd597d.png" />
</div>
</div>
<p>In this transformation, each unit of area in the blue shape is transformed to a smaller region in the red shape.</p>
<p>So to understand how area changes, it suffices to ask what happens to the unit square (or hypercube):</p>
<div class="cell tag_remove-input docutils container">
<div class="cell_output docutils container">
<img alt="_images/105844a7600bb77c27470f8135be5a3c74aaa9117a735ec2ae9f22ebee10198f.png" src="_images/105844a7600bb77c27470f8135be5a3c74aaa9117a735ec2ae9f22ebee10198f.png" />
</div>
</div>
<p>Let’s denote the matrix of our linear transformation as:</p>
<div class="math notranslate nohighlight">
\[\begin{split} A = \begin{bmatrix} a & b \\ c & d \end{bmatrix} \end{split}\]</div>
<p>Then, here is what happens to the unit square:</p>
<div class="cell tag_remove-input docutils container">
<div class="cell_output docutils container">
<img alt="_images/279462702ffc0ceb15a9016a59484634a32a0d2bcfd02d18a0eed0f4d39a8566.png" src="_images/279462702ffc0ceb15a9016a59484634a32a0d2bcfd02d18a0eed0f4d39a8566.png" />
</div>
</div>
<p>Now, let’s determine the area of the blue diamond in terms of <span class="math notranslate nohighlight">\(a, b, c\)</span>, and <span class="math notranslate nohighlight">\(d\)</span>.</p>
<p>To do that, we’ll use this diagram:</p>
<div class="cell tag_remove-input docutils container">
<div class="cell_output docutils container">
<img alt="_images/f92b43da0587a09f416dbae14d14e2dfebccacebc1cd91dd4ac4525a2a971fa5.png" src="_images/f92b43da0587a09f416dbae14d14e2dfebccacebc1cd91dd4ac4525a2a971fa5.png" />
</div>
</div>
<p>Each of the triangles and rectangles has an area we can determine in terms of <span class="math notranslate nohighlight">\(a, b, c\)</span> and <span class="math notranslate nohighlight">\(d\)</span>.</p>
<p>The large rectangle has sides <span class="math notranslate nohighlight">\((a+b)\)</span> and <span class="math notranslate nohighlight">\((c+d)\)</span>, so its area is:</p>
<div class="math notranslate nohighlight">
\[ (a+b)(c+d) = ac + ad + bc + bd. \]</div>
<p>From this large rectangle we need to subtract:</p>
<ul class="simple">
<li><p><span class="math notranslate nohighlight">\(bd\)</span> (red triangles),</p></li>
<li><p><span class="math notranslate nohighlight">\(ac\)</span> (gray triangles), and</p></li>
<li><p><span class="math notranslate nohighlight">\(2bc\)</span> (green rectangles).</p></li>
</ul>
<p>So the area of the blue diamond is:</p>
<div class="math notranslate nohighlight">
\[ (ac + ad + bc + bd) - (bd + ac + 2bc) \]</div>
<div class="math notranslate nohighlight">
\[ = ad - bc \]</div>
<p>So we conclude that when we use a linear transformation</p>
<div class="math notranslate nohighlight">
\[\begin{split} A = \begin{bmatrix} a & b \\ c & d \end{bmatrix} \end{split}\]</div>
<p>the <strong>area of a unit square</strong> (or any shape) <strong>is scaled by a factor of <span class="math notranslate nohighlight">\(ad - bc\)</span>.</strong></p>
<p>This quantity is a fundamental property of the matrix <span class="math notranslate nohighlight">\(A\)</span>.</p>
<p>So, we give it a name: it is the <strong>determinant</strong> of <span class="math notranslate nohighlight">\(A\)</span>.</p>
<p>We denote it as</p>
<div class="math notranslate nohighlight">
\[\det(A)\]</div>
<p>So, for a <span class="math notranslate nohighlight">\(2\times 2\)</span> matrix <span class="math notranslate nohighlight">\( A = \begin{bmatrix} a & b \\ c & d \end{bmatrix} \)</span>,</p>
<div class="math notranslate nohighlight">
\[\det(A) = ad-bc.\]</div>
<p>However, the determinant can be defined for <strong>any</strong> <span class="math notranslate nohighlight">\(n\times n\)</span> (square) matrix.</p>
<p>For a square matrix <span class="math notranslate nohighlight">\(A\)</span> larger than <span class="math notranslate nohighlight">\(2\times 2\)</span>, the determinant tells us how the <strong>volume</strong> of a unit (hyper)cube is scaled when it is linearly transformed by <span class="math notranslate nohighlight">\(A\)</span>.</p>
<p>We will learn how to compute determinants for larger matrices in a later lecture.</p>
<p>There are important cases in which the determinant of a matrix is <strong>zero.</strong></p>
<p>When does it happen that <span class="math notranslate nohighlight">\(\det(A) = 0\)</span>?</p>
<p>Consider when <span class="math notranslate nohighlight">\(A\)</span> is the matrix of a projection:</p>
<div class="cell tag_remove-input docutils container">
<div class="cell_output docutils container">
<div class="output text_latex math notranslate nohighlight">
\[\begin{split}A = \begin{bmatrix}
1 & 0 \\
0 & 0
\end{bmatrix}\end{split}\]</div>
<img alt="_images/4ba9d4fc56a086125631446d7920f61efea13288c514ad88a49cef89d75f3f61.png" src="_images/4ba9d4fc56a086125631446d7920f61efea13288c514ad88a49cef89d75f3f61.png" />
</div>
</div>
<p>The unit square has been collapsed onto the <span class="math notranslate nohighlight">\(x\)</span>-axis, resulting in a shape with area of zero.</p>
<p>This is confirmed by the determinant, which is</p>
<div class="math notranslate nohighlight">
\[\begin{split} \det\left(\begin{bmatrix}1 & 0 \\ 0 & 0\end{bmatrix}\right) = (1 \cdot 0) - (0 \cdot 0) = 0.\end{split}\]</div>
</section>
<section id="existence-and-uniqueness">
<h2>Existence and Uniqueness<a class="headerlink" href="#existence-and-uniqueness" title="Permalink to this heading">#</a></h2>
<p>Notice that some of these transformations map multiple inputs to the same output, and some are incapable of generating certain outputs.</p>
<p>For example, the <strong>projections</strong> above can send multiple different points to the same point.</p>
<p>We need some terminology to understand these properties of linear transformations.</p>
<p><strong>Definition.</strong> A mapping <span class="math notranslate nohighlight">\(T: \mathbb{R}^n \rightarrow \mathbb{R}^m\)</span> is said to be <strong>onto</strong> <span class="math notranslate nohighlight">\(\mathbb{R}^m\)</span> if each <span class="math notranslate nohighlight">\(\mathbf{b}\)</span> in <span class="math notranslate nohighlight">\(\mathbb{R}^m\)</span> is the image of <em>at least one</em> <span class="math notranslate nohighlight">\(\mathbf{x}\)</span> in <span class="math notranslate nohighlight">\(\mathbb{R}^n\)</span>.</p>
<p>Informally, <span class="math notranslate nohighlight">\(T\)</span> is onto if every element of its codomain is in its range.</p>
<p>Another (important) way of thinking about this is that <span class="math notranslate nohighlight">\(T\)</span> is onto if there is a solution <span class="math notranslate nohighlight">\(\mathbf{x}\)</span> of</p>
<div class="math notranslate nohighlight">
\[T(\mathbf{x}) = \mathbf{b}\]</div>
<p>for all possible <span class="math notranslate nohighlight">\(\mathbf{b}.\)</span></p>
<p>This is asking an <strong>existence</strong> question about a solution of the equation <span class="math notranslate nohighlight">\(T(\mathbf{x}) = \mathbf{b}\)</span> for all <span class="math notranslate nohighlight">\(\mathbf{b}.\)</span></p>
<div class="cell tag_remove-input docutils container">
<div class="cell_output docutils container">
<img alt="_images/6cc84d7076ff2ad84485b62de3da2a4016f1743faf03d7219e5a91c109682608.jpg" src="_images/6cc84d7076ff2ad84485b62de3da2a4016f1743faf03d7219e5a91c109682608.jpg" />
</div>
</div>
<p>Here, we see that <span class="math notranslate nohighlight">\(T\)</span> maps points in <span class="math notranslate nohighlight">\(\mathbb{R}^2\)</span> to a plane lying <strong>within</strong> <span class="math notranslate nohighlight">\(\mathbb{R}^3\)</span>.</p>
<p>That is, the range of <span class="math notranslate nohighlight">\(T\)</span> is a strict subset of the codomain of <span class="math notranslate nohighlight">\(T\)</span>.</p>
<p>So <span class="math notranslate nohighlight">\(T\)</span> is <strong>not onto</strong> <span class="math notranslate nohighlight">\(\mathbb{R}^3\)</span>.</p>
<div class="cell tag_remove-input docutils container">
<div class="cell_output docutils container">
<img alt="_images/d9503ef508361d8a203f9d0f5b3cbad26bb9c8ed5c64cabf52a89e9b33b60705.png" src="_images/d9503ef508361d8a203f9d0f5b3cbad26bb9c8ed5c64cabf52a89e9b33b60705.png" />
</div>
</div>
<p>In this case, for every point in <span class="math notranslate nohighlight">\(\mathbb{R}^2\)</span>, there is an <span class="math notranslate nohighlight">\(\mathbf{x}\)</span> that maps to that point.</p>
<p>So, the range of <span class="math notranslate nohighlight">\(T\)</span> is equal to the codomain of <span class="math notranslate nohighlight">\(T\)</span>.</p>
<p>So <span class="math notranslate nohighlight">\(T\)</span> is <strong>onto</strong> <span class="math notranslate nohighlight">\(\mathbb{R}^2\)</span>.</p>
<p>Here is an example of the reflection transformation. The red points are the images of the blue points.</p>
<p>What about this transformation? Is it onto <span class="math notranslate nohighlight">\(\mathbb{R}^2\)</span>?</p>
<div class="cell tag_remove-input docutils container">
<div class="cell_output docutils container">
<img alt="_images/011013b27f197e33f726d222fca48672e3a089de8bc715ba2f3e70eefc004731.png" src="_images/011013b27f197e33f726d222fca48672e3a089de8bc715ba2f3e70eefc004731.png" />
</div>
</div>
<p>Here is an example of the projection transformation. The red points (which all lie on the <span class="math notranslate nohighlight">\(x\)</span>-axis) are the images of the blue points.</p>
<p>What about this transformation? Is it onto <span class="math notranslate nohighlight">\(\mathbb{R}^2\)</span>?</p>
<div class="cell tag_remove-input docutils container">
<div class="cell_output docutils container">
<img alt="_images/34f2bbf111de20aa749d02e3fb64a5e9d61592ae4631ead817a4d4f7d74da80c.png" src="_images/34f2bbf111de20aa749d02e3fb64a5e9d61592ae4631ead817a4d4f7d74da80c.png" />
</div>
</div>
<p><strong>Definition.</strong> A mapping <span class="math notranslate nohighlight">\(T: \mathbb{R}^n \rightarrow \mathbb{R}^m\)</span> is said to be <strong>one-to-one</strong> if each <span class="math notranslate nohighlight">\(\mathbf{b}\)</span> in <span class="math notranslate nohighlight">\(\mathbb{R}^m\)</span> is the image of <em>at most one</em> <span class="math notranslate nohighlight">\(\mathbf{x}\)</span> in <span class="math notranslate nohighlight">\(\mathbb{R}^n\)</span>.</p>
<p>If <span class="math notranslate nohighlight">\(T\)</span> is one-to-one, then for each <span class="math notranslate nohighlight">\(\mathbf{b},\)</span> the equation <span class="math notranslate nohighlight">\(T(\mathbf{x}) = \mathbf{b}\)</span> has either a unique solution, or none at all.</p>
<p>This is asking a <strong>uniqueness</strong> question about a solution of the equation <span class="math notranslate nohighlight">\(T(\mathbf{x}) = \mathbf{b}\)</span> for all <span class="math notranslate nohighlight">\(\mathbf{b}\)</span>.</p>
<div class="cell tag_remove-input docutils container">
<div class="cell_output docutils container">
<img alt="_images/6ed345688ae0abc244e0d2ad69e23fe34311c05d6d3cd56cd8a8d3e5c2e1cbbe.jpg" src="_images/6ed345688ae0abc244e0d2ad69e23fe34311c05d6d3cd56cd8a8d3e5c2e1cbbe.jpg" />
</div>
</div>
<p>Let’s examine the relationship between these ideas and some previous definitions.</p>
<p>If for all <span class="math notranslate nohighlight">\(\mathbf{b}\)</span>, <span class="math notranslate nohighlight">\(A\mathbf{x} = \mathbf{b}\)</span> is consistent, is <span class="math notranslate nohighlight">\(T(\mathbf{x}) = A\mathbf{x}\)</span> onto? one-to-one?</p>
<ul class="simple">
<li><p><span class="math notranslate nohighlight">\(T(\mathbf{x})\)</span> is onto. <span class="math notranslate nohighlight">\(T(\mathbf{x})\)</span> may or may not be one-to-one. If the system has multiple solutions for some <span class="math notranslate nohighlight">\(\mathbf{b}\)</span>, <span class="math notranslate nohighlight">\(T(\mathbf{x})\)</span> is not one-to-one.</p></li>
</ul>
<p>If for all <span class="math notranslate nohighlight">\(\mathbf{b}\)</span>, <span class="math notranslate nohighlight">\(A\mathbf{x} = \mathbf{b}\)</span> is consistent and has a unique solution, is <span class="math notranslate nohighlight">\(T(\mathbf{x}) = A\mathbf{x}\)</span> onto? one-to-one?</p>
<ul class="simple">
<li><p>Yes to both.</p></li>
</ul>
<p>If it is not the case that for all <span class="math notranslate nohighlight">\(\mathbf{b}\)</span>, <span class="math notranslate nohighlight">\(A\mathbf{x} = \mathbf{b}\)</span> is consistent, is <span class="math notranslate nohighlight">\(T(\mathbf{x}) = A\mathbf{x}\)</span> onto? one-to-one?</p>
<ul class="simple">
<li><p><span class="math notranslate nohighlight">\(T(\mathbf{x})\)</span> is <strong>not</strong> onto. <span class="math notranslate nohighlight">\(T(\mathbf{x})\)</span> may or may not be one-to-one.</p></li>
</ul>
<p>If <span class="math notranslate nohighlight">\(T(\mathbf{x}) = A\mathbf{x}\)</span> is onto, is <span class="math notranslate nohighlight">\(A\mathbf{x} = \mathbf{b}\)</span> consistent for all <span class="math notranslate nohighlight">\(\mathbf{b}\)</span>? is the solution unique for all <span class="math notranslate nohighlight">\(\mathbf{b}\)</span>?</p>
<ul class="simple">
<li><p><span class="math notranslate nohighlight">\(A\mathbf{x} = \mathbf{b}\)</span> is consistent for all <span class="math notranslate nohighlight">\(\mathbf{b}\)</span>. The solution may not be unique for any <span class="math notranslate nohighlight">\(\mathbf{b}\)</span>.</p></li>
</ul>
<p>If <span class="math notranslate nohighlight">\(T(\mathbf{x}) = A\mathbf{x}\)</span> is one-to-one, is <span class="math notranslate nohighlight">\(A\mathbf{x} = \mathbf{b}\)</span> consistent for all <span class="math notranslate nohighlight">\(\mathbf{b}\)</span>? is the solution unique for all <span class="math notranslate nohighlight">\(\mathbf{b}\)</span>?</p>
<ul class="simple">
<li><p><span class="math notranslate nohighlight">\(A\mathbf{x} = \mathbf{b}\)</span> may or may not be consistent for all <span class="math notranslate nohighlight">\(\mathbf{b}\)</span>. For any <span class="math notranslate nohighlight">\(\mathbf{b}\)</span>, if there is a solution, it is unique.</p></li>
</ul>
</section>
</section>
<script type="text/x-thebe-config">
{
requestKernel: true,
binderOptions: {
repo: "binder-examples/jupyter-stacks-datascience",
ref: "master",
},
codeMirrorConfig: {
theme: "abcdef",
mode: "python"
},
kernelOptions: {
name: "python3",
path: "./."
},
predefinedOutput: true
}
</script>
<script>kernelName = 'python3'</script>
</article>
<footer class="prev-next-footer">
<div class="prev-next-area">
<a class="left-prev"
href="L07LinearTransformations.html"
title="previous page">
<i class="fa-solid fa-angle-left"></i>
<div class="prev-next-info">
<p class="prev-next-subtitle">previous</p>
<p class="prev-next-title">Linear Transformations</p>
</div>
</a>
<a class="right-next"
href="L09MatrixOperations.html"
title="next page">
<div class="prev-next-info">
<p class="prev-next-subtitle">next</p>
<p class="prev-next-title">Matrix Algebra</p>
</div>
<i class="fa-solid fa-angle-right"></i>
</a>
</div>
</footer>
</div>
<div class="bd-sidebar-secondary bd-toc"><div class="sidebar-secondary-items sidebar-secondary__inner">
<div class="sidebar-secondary-item">
<div class="page-toc tocsection onthispage">
<i class="fa-solid fa-list"></i> Contents
</div>
<nav class="bd-toc-nav page-toc">
<ul class="visible nav section-nav flex-column">
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#geometric-linear-transformations-of-mathbb-r-2">Geometric Linear Transformations of <span class="math notranslate nohighlight">\(\mathbb{R}^2\)</span></a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#area-is-scaled-by-the-determinant">Area is Scaled by the Determinant</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#existence-and-uniqueness">Existence and Uniqueness</a></li>
</ul>
</nav></div>
</div></div>
</div>
<footer class="bd-footer-content">
<div class="bd-footer-content__inner container">