-
Notifications
You must be signed in to change notification settings - Fork 0
/
math1030.tex
3785 lines (2920 loc) · 119 KB
/
math1030.tex
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
% ------------------------------------------------------------ %
%
% CUHK Mathematics
% MATH1030: Linear Algebra I
%
% ------------------------------------------------------------ %
\documentclass[a4paper,12pt]{article}
\usepackage{standalone}
\input{sty/setup.sty}
\begin{document}
\title{MATH1030: Linear Algebra I}
\input{sty/cover.sty}
\remark{
\item Starting from academic year 2020-2021, a series of Honours courses (with coursecode ending with 8 instead of 0) are introduced. However, Honours courses are assumed to have equivalent contents to their corresponding courses in the past. Hence, current contents will not be modified unless significant difference is found. For more details to Honours courses, please visit \url{https://www.math.cuhk.edu.hk/undergraduates/honours-courses}.
}
\input{sty/header.sty}
\section{Systems of Linear Equations}
\subsection{Technique of Solving Linear Equations}
\subsubsection{System of Linear Equations with Two Unknowns}
There are two common methods of solving a system of linear equations with two unknowns, which is \textbf{substitution} and \textbf{elimination}.
\begin{alist}
\item \textbf{Substitution}\n
\begin{exm}
The following is a system of linear equations with two unknowns:
$$\begin{cases}
3x+4y=2\\
4x+5y=3
\end{cases}$$\s
First, solve the second equation for $y$ in terms of $x$:
$$y=\frac{3}{5}-\frac{4}{5}x$$\s
After that, substitute the above equation into the first equation, and the number of unknowns in the first equation will reduce to one:
$$\begin{aligned}[t]
3x+4\brr{\frac{3}{5}-\frac{4}{5}x}&=2\\
\frac{12}{5}-\frac{x}{5}&=2\\
x&=2
\end{aligned}$$\s
Hence the solution $x=2$ is obtained, and finally solve for $y$:
$$y=\frac{3}{5}-\frac{4}{5}\times 2=-1$$\s
Therefore the solution is $x=2,y=1$.
\end{exm}\n
There are four ways of substitution to obtain the solution effectively:
\begin{nlist}
\item Solve $x$ by the first equation in terms of $y$ and substitute it into the second equation.
\item Solve $y$ by the first equation in terms of $x$ and substitute it into the second equation.
\item Solve $x$ by the second equation in terms of $y$ and substitute it into the first equation.
\item Solve $y$ by the second equation in terms of $x$ and substitute it into the first equation.
\end{nlist}
However, the solution cannot be obtained if the substitution is performed at the same equation (for example, substituting the first equation back into the first equation).
\item \textbf{Elimination}\n
\begin{exm}
The following is the exact same system of linear equations with two unknowns as in the example above:
$$\begin{cases}
3x+4y=2\\
4x+5y=3
\end{cases}$$\s
This time the elimination is performed by combining both equations in order to eliminate the unknown $x$:
$$\begin{aligned}[t]
3x+4y&=2\\
3x+\frac{15}{4}y&=\frac{9}{4}
\end{aligned}$$\s
and by subtracting the first equation to the second equation,
$$\begin{aligned}[t]
\frac{1}{4}y&=-\frac{1}{4}\\
y&=-1
\end{aligned}$$\s
Hence the solution $y=-1$ is obtained, and finally solve for $x$:
$$\begin{aligned}[t]
3x+4(-1)&=2\\
x&=2
\end{aligned}$$\s
Therefore the solution is $x=2,y=1$.
\end{exm}
\end{alist}
\subsubsection{System of Linear Equations with Three Unknowns}
Solving a system of linear equations with three unknowns may seem to be different to that with two unknowns, however the problem can be reduced to a previously solved problem by performing substitution or elimination. In this way, the problem will be familiar again.\n
\begin{exm}
The following is a system of linear eqaution with three unknowns:
$$\begin{cases}
x+2y+2z=4\\
x+3y+3z=5\\
2x+6y+5z=6
\end{cases}$$\s
The system is solved by the following sequence of equation operations:
\begin{nlist}
\item $-1$ times equation 1, add to equation 2:
$$\begin{aligned}[t]
1x+2y+2z&=4\\
0x+1y+1z&=1\\
2x+6y+5z&=6
\end{aligned}$$
\item $-2$ times equation 1, add to equation 3:
$$\begin{aligned}[t]
1x+2y+2z&=4\\
0x+1y+1z&=1\\
0x+2y+1z&=-2
\end{aligned}$$
\item $-2$ times equation 2, add to eqaution 3:
$$\begin{aligned}[t]
1x+2y+2z&=4\\
0x+1y+1z&=1\\
0x+0y-1z&=-4
\end{aligned}$$
\item $-1$ times equation 3:
$$\begin{aligned}[t]
1x+2y+2z&=4\\
0x+1y+1z&=1\\
0x+0y+1z&=4
\end{aligned}$$
\end{nlist}
which can be rewritten as
$$\begin{cases}
x+2y+2z=4\\
y+z=1\\
z=4
\end{cases}$$\s
\end{exm}\n
In fact, there are three types of system of linear equations, which is listed as follows:
\begin{alist}
\item Some systems of linear equations have exactly one solution.
\item Some systems of linear equations have no solution.
\item Some systems of linear equations have infinitely many solutions which can be expressed in terms of variables.
\end{alist}
\subsection{Geometric Interpretations}
\subsubsection{Intersections of Lines}
It is not the only way to solve systems of linear eqautions (where in this case, two unknowns and three unknowns) algebraically, but also by geometric interpretations.\n
\begin{exm}
The following is a system of linear equations with two unknowns:
$$\begin{cases}
2x-3y=-5\\
x+y=5
\end{cases}$$\s
By plotting the two equations as two different straight lines on the same graph (see \rfig[\sctr{-1}]), where the green line is $2x-3y=5$ and the blue line is $x+y=5$, a unique intersection $(2,3)$ can be found, which is the solution.
\end{exm}\n
\begin{fig}
\centering
\begin{tikzpicture}
\begin{axis}[axis lines=middle, xlabel={$x$}, ylabel={$y$}, xtick={0,1,2,3,4}, ytick={-1,1,2,3,4}, extra y ticks={0}]
\addplot[domain=0:5, samples=100, color=blue]{(2*x-5)/3};
\addplot[domain=0:5, samples=100, color=red]{5-x};
\addlegendentry{$2x-3y=5$};
\addlegendentry{$x+y=5$};
\end{axis}
\end{tikzpicture}
\end{fig}\n
Below is another example where the equations have no solution:\n
\begin{exm}
The following is a system of linear equations with two unknowns:
$$\begin{cases}
2x-3y=-5\\
2x-3y=0
\end{cases}$$\s
By plotting the two equations as two different straight lines on the same graph (see \rfig[\sctr{-1}]), where the green line is $2x-3y=5$ and the blue line is $2x-3y=0$, no solution can be found since they are parallel lines.
\end{exm}\n
\propdisp
\begin{fig}
\centering
\begin{tikzpicture}
\begin{axis}[axis lines=middle, xlabel={$x$}, ylabel={$y$}, xtick={0,1,2,3,4}, ytick={-1,1,2,3}, extra y ticks={0}]
\addplot[domain=0:5, samples=100, color=blue]{(2*x-5)/3};
\addplot[domain=0:5, samples=100, color=red]{2*x/3};
\addlegendentry{$2x-3y=5$};
\addlegendentry{$2x-3y=0$};
\end{axis}
\end{tikzpicture}
\end{fig}\n
Below is the third example where the equations have infinitely many solutions:\n
\begin{exm}
The following is a system of linear equations with two unknowns:
$$\begin{cases}
2x-3y=-5\\
2x-3y=-5
\end{cases}$$\s
In this case, the system has infinite solutions: for any real number $t$, $(t, \frac{2t+5}{3})$ is a solution. In a geometrical perspective, since the two lines coincide, their intersection is the whole line $2x-3y=-5$.
\end{exm}
\subsubsection{Intersections of Planes}
Different to systems of linear variables of two unknowns which can be represented in 2-dimensional space, systems of linear variables of three unknowns have to be represented in 3-dimensional space, and each of the equations are represented by a plane.\n
\begin{exm}
The following is a system of linear equations with three unknowns:
$$\begin{cases}
2x+3y+3z=3\\
2x-y=0
\end{cases}$$\s
The intersection of the two planes is a straight line, which can be expressed as
$$\brc{\brr{\frac{3-3t}{8},\frac{3-3t}{4},t}\srm t\in\R}$$
\end{exm}\n
\begin{exm}
The following is a system of linear equations with three unknowns:
$$\begin{cases}
2x+3y+3z=3\\
2x+3y+3z=5\\
\end{cases}$$\s
Since the corresponding planes of the equations are parallel, the system has no solution.
\end{exm}\n
Suppose there are three equations with three variables that corresponds to three different planes. There are five types of solutions to this situation:
\begin{alist}
\item All three planes are parallel to each other. The system has no solution.
\item Two of the three planes are parallel to each other and the other plane does not. The system has solution of two straight lines.
\item Intersection of any two planes is a straight line. The three lines from the intersection of planes are parallel to each other. The system has solution of three straight lines.
\item The intersection of three planes is a straight line. The system has solution of one straight line.
\item The intersection of three planes is a point. The system has a unique solution.
\end{alist}
\subsubsection{Addition of Vectors}
Beside from intersections of lines and planes, solving systems of equations with vectors is also a considerable choice.\n
\begin{exm}
The following is a system of linear equations with two unknowns, written in a single vector form equation:
$$x\begin{rmatrix}
2\\
1
\end{rmatrix}+y\begin{rmatrix}
-3\\
1
\end{rmatrix}=\begin{rmatrix}
-5\\
5
\end{rmatrix}=b$$\s
The problem now becomes finding the combination of the column vectors on the left side that produces the vector $b$ on the right side.
\end{exm}\n
Here are the system of linear equations used in examples in previous section:\n
\begin{exm}
The following is a system of linear equations with two unknowns, written in a single vector form equation:
$$x\begin{rmatrix}
2\\
2
\end{rmatrix}+y\begin{rmatrix}
-3\\
-3
\end{rmatrix}=\begin{rmatrix}
-5\\
0
\end{rmatrix}$$\s
$$x\begin{rmatrix}
2\\
2
\end{rmatrix}+y\begin{rmatrix}
-3\\
-3
\end{rmatrix}=\begin{rmatrix}
-5\\
-5
\end{rmatrix}$$\s
In both of the examples, the two vectors on the left side are colinear. For the first example, since the target vector is not colinear with the two vectors, there are no solutions for the system. For the second example, since the target vector is colinear with the two vectors, there are infinite solutions for the system.
\end{exm}\n
In fact, this method can also be applied to 3-dimensional cases:\n
\begin{exm}
The following is a system of linear equations with three unknowns, written in a single vector form equation:
$$x\begin{rmatrix}
2\\
4\\
-2
\end{rmatrix}+y\begin{rmatrix}
1\\
-6\\
7
\end{rmatrix}+z\begin{rmatrix}
1\\
0\\
2
\end{rmatrix}=\begin{rmatrix}
5\\
-2\\
9
\end{rmatrix}$$\s
By finding the combination of column vectors on the left side, the solution set for the equation above is
$$\begin{cases}
x=1\\
y=1\\
z=2
\end{cases}$$
\end{exm}\n
\begin{exm}
In the following example, the three vectors are coplanar, which means they all lies on the same plane:
$$x\begin{rmatrix}
\frac{3}{2}\\
-1\\
0
\end{rmatrix}+y\begin{rmatrix}
0\\
1\\
-1
\end{rmatrix}+z\begin{rmatrix}
\frac{3}{2}\\
0\\
-1
\end{rmatrix}=b$$\s
Note that the three vectors lies on the plane $2x+3y+3z=0$. Similar to colinear cases in 2-dimensional space, the resulting vector $b$ determines number of solutions. For example, when
$$b=b_{0}=\begin{rmatrix}
0\\
1\\
1
\end{rmatrix}$$\s
the system has no solution, and when
$$b=b_{\infty}=\begin{rmatrix}
3\\
-1\\
-1
\end{rmatrix}$$\s
the system has infinite solutions.
\end{exm}
\propdisp
\subsection{Introduction to Systems of Linear Equations}
\subsubsection{Definition of Systems of Linear Equations}
\begin{dft}
A \textbf{system of linear equations} is a collection of $m$ equations in the variable quantities $x_{1},x_{2},x_{3},\cdots,x_{n}$ of the form
$$\begin{aligned}[t]
a_{11}x_{1}+a_{12}x_{2}+a_{13}x_{3}+\cdots+a_{1n}x_{n}&=b_{1}\\
a_{21}x_{1}+a_{22}x_{2}+a_{23}x_{3}+\cdots+a_{2n}x_{n}&=b_{2}\\
&\vdots\\
a_{m1}x_{1}+a_{m2}x_{2}+a_{m3}x_{3}+\cdots+a_{mn}x_{n}&=b_{m}
\end{aligned}$$\s
where the values of $a_{ij},b_{i}$ and $x_{j}$, $1<i<m,1<j<n$ are from the set of real numbers $\R$.
\end{dft}
\subsubsection{Possibilities of Solution Sets}
\begin{dft}
A set $(s_{1},s_{2},\cdots,s_{n})$ is said to be a \textbf{solution} of a system of linear equations in $n$ variables if every equation in the system is valid after substitution. The \textbf{solution set} of a linear equation is the combination of all solutions of the system of linear equations.
\end{dft}\n
\begin{exm}
The following is a system of linear equations:
$$\begin{aligned}[t]
x_{1}+2x_{2}+x_{4}&=7\\
x_{1}+x_{2}+x_{3}-x_{4}&=3\\
3x_{1}+x_{2}+5x_{3}-7x_{4}&=1
\end{aligned}$$\s
and it can be rewritten as
$$\begin{aligned}[t]
1x_{1}+2x_{2}+0x_{3}+1x_{4}&=7\\
1x_{1}+1x_{2}+1x_{3}-1x_{4}&=3\\
3x_{1}+1x_{2}+5x_{3}-7x_{4}&=1
\end{aligned}$$\s
Note that the system has infinitely many solutions, and the solution set is
$$\left\{ (-1-2a+3b,4+a-2b,a,b)\mid a,b\;\text{real numbers}\right\}$$
\end{exm}\n
Here the theorem about the possibilities of solution sets is introduced:\n
\begin{thm}
Any system of linear equations with real numbers as coefficients can have a unique solution, infinite solutions or no solution.
\end{thm}\n
Therefore it is impossible for a system of linear equations to have exactly two solutions, for example. Also note that the above theorem is only true when the coefficients are real numbers. In higher mathematics, coefficients can also be finite fields which will affect numbers of solutions.
\subsubsection{Equivalent Systems and Equation Operations}
\begin{dft}
Two systems of linear equations are said to be \textbf{equivalent} if their solution sets are equal, and the two systems are said to be \textbf{equivalent systems}.
\end{dft}\n
\begin{dft}
Given a system of linear equations, the following three operations will transform a system into another one:
\begin{alist}
\item Swap the position of any two equations in the list of equations.
\item Perform a non-zero scalar multiplication to an equation in the list of equations.
\item Perform a scalar multiplication to an equation, and then add to another equation on both sides of the equality.
\end{alist}
The above operations are all called \textbf{equation operations}.
\end{dft}\n
Note that the following theorem about equivalent systems and equation operations is true:\n
\begin{pst}
If the transformed system is created by applying any one of three equation operations to an original system of linear equations, then the original system and the transformed system are equivalent.
\end{pst}
\pagebreak
\section{Linear Algebra with Matrices}
\subsection{Introduction to Matrices}
\subsubsection{Matrix and Vector Notations}
In order to solve systems of linear equations systematically, a useful and powerful tool called matrix is used.\n
\begin{dft}
A $m\times n$ \textbf{matrix} is a rectangular layout of numbers having $m$ rows and $n$ columns. The matrix is bracketed with either parentheses or brackets. Rows are counted from top to bottom and columns are counted from left to right, and for a matrix $A$, the notation $[A]_{ij}$ refers to the number in row $i$ and column $j$ of the matrix $A$.
\end{dft}\n
\begin{exm}
The following is a matrix
$$B=\begin{rmatrix}
1 & 0 & 2 & 5\\
3 & -2 & -7 & 4\\
-1 & 4 & 6 & -3
\end{rmatrix}$$\s
with $m=3$ rows and $n=4$ columns. Note that $[B]_{2,3}=-7$ and $[B]_{3,4}=-3$.
\end{exm}\n
In fact, during the solving process of systems of linear equations, the names of the variables do not matter at all. On the other hand, using matrix notations can describe linear systems, solve the systems and describe the solution sets with much ease.\n
\begin{dft}
A \textbf{column vector} of size $m$ is an ordered list of $m$ numbers in a vertical order from top to bottom.
\end{dft}\n
At times, a column vector is also simply called a vector. Commonly, the notation of a vector is usually small letters in bold ($\mathbf{v}$) or with arrows on top of the symbol ($\vec{v}$). The entry of vector $\mathbf{v}$ in location $i$ is in notation $[\mathbf{v}]_{i}$.\n
\begin{dft}
The \textbf{zero vector} of size $m$ is the column vector of size $m$ with each entry is zero:
$$\mathbf{0}=\begin{rmatrix}
0\\
0\\
\vdots\\
0
\end{rmatrix}$$\s
or in entry notations, $[\mathbf{0}]_{i}=0$ for $1\leq i\leq m$.
\end{dft}
\propdisp
\subsubsection{Partitions of Matrices}
\begin{dft}
A \textbf{partition} of a matrix is a horizontal or vertical line dividing the matrix into different areas. A matrix is the same with or without partitions, but partitions can provide better reading if required.
\end{dft}\n
\begin{exm}
Suppose $A$ is a matrix and $\mathbf{u}$ is a column vector where
$$A=\begin{rmatrix}
1 & 2\\
3 & 4\\
\end{rmatrix},\mathbf{u}=\begin{rmatrix}
5\\
6
\end{rmatrix}$$
Then
$$[A\!\mid\!\mathbf{u}]=\left[ \begin{array}{@{}cc|c@{}}
1 & 2 & 5\\
3 & 4 & 6
\end{array}\right]$$
\end{exm}
\subsubsection{Matrix Representations of Linear Systems}
\begin{dft}
For a system of linear eqautions
$$\begin{aligned}[t]
a_{11}x_{1}+a_{12}x_{2}+a_{13}x_{3}+\cdots+a_{1n}x_{n}&=b_{1}\\
a_{21}x_{1}+a_{22}x_{2}+a_{23}x_{3}+\cdots+a_{2n}x_{n}&=b_{2}\\
&\vdots\\
a_{m1}x_{1}+a_{m2}x_{2}+a_{m3}x_{3}+\cdots+a_{mn}x_{n}&=b_{m}
\end{aligned}$$\s
the \textbf{coefficient matrix} is the $m\times n$ matrix
$$A=\begin{rmatrix}
a_{11} & a_{12} & a_{13} & \cdots & a_{1n}\\
a_{21} & a_{22} & a_{23} & \cdots & a_{2n}\\
\vdots & \vdots & \vdots & \ddots & \vdots\\
a_{m1} & a_{m2} & a_{m3} & \cdots & a_{mn}
\end{rmatrix}$$\s
the \textbf{vector of constants} is the column vector of size $m$
$$\mathbf{b}=\begin{rmatrix}
b_{1}\\
b_{2}\\
\vdots\\
b_{m}
\end{rmatrix}$$\s
and the \textbf{solution vector} is the column vector of size $n$
$$\mathbf{x}=\begin{rmatrix}
x_{1}\\
x_{2}\\
\vdots\\
x_{n}
\end{rmatrix}$$
\end{dft}\n
\begin{dft}
If $A$ is the coefficient matrix of a system of linear equations and $b$ is the vector of constants, then $\mathit{LS}(A,\mathbf{b})$ is the shorthand expression for the system of linear equations, which is referred as the \textbf{matrix representation} of the linear system. Also, the \textbf{augmented matrix} of the linear system $[A\!\mid\!\mathbf{b}]$ is the $m\times(n+1)$ matrix with matrix $A$ on the left and column vector $\mathbf{b}$ on the right.
\end{dft}
% edit here
\subsubsection{Row Operations}
An augmented matrix can represent the system of linear equations, which can also perform row operations as before. Recall the three equation operations:
\begin{alist}
\item Swap the position of any two equations in the list of equations.
\item Perform a non-zero scalar multiplication to an equation in the list of equations.
\item Perform a scalar multiplication to an equation, and then add to another equation on both sides of the equality.
\end{alist}
For augmented matrices, the following operations works similarly as the equation opertions above, but to transform matrices into another one with the same size:
\begin{alist}
\item Swap any two rows in a matrix.
\item Perform a non-zero scalar multiplication to every entry of a row in a matrix.
\item Perform a scalar multiplication to every entry of a row in a matrix, and then add to another row in the same columns. The first row will remain unchanged while the second row is replaced by new values.
\end{alist}
The three operations above are called \textbf{row operations}. There are symbolic shorthands to describe these row operations:
\begin{alist}
\item $R_{i}\leftrightarrow R_{j}$ : Swap row $i$ and row $j$.
\item $\alpha R_{i}$ : Multiply row $i$ by the non-zero scalar $\alpha$.
\item $\alpha R_{i}+R_{j}$ : Multiply row $i$ by the scalar $\alpha$ and add to row $j$.
\end{alist}
Suppose there are two matrices $A$ and $B$ of the same size. $A$ and $B$ are said to be \textbf{row-equivalent} if one can be obtained from the other by a sequence of row operations. Note that all row operations are reversible, so the distinction between $A$ is row-equivalent to $B$ and $B$ is row-equivalent to $A$ does not matter. With this definition, the following theorem applies:\n
\begin{pst}
Suppose $A$ and $B$ are row-equivalent augmented matrices, then the systems of linear equations that the two matrices represent are equivalent systems.
\end{pst}
\subsection{Matrix Operations}
\subsubsection{Matrix Equality, Addition and Scalar Multiplication}
\begin{dft}
Recall $M_{mn}$ is the set of $m\times n$ matrices with real entries. Suppose there are two matrices $A$ and $B$ with size $m\times n$. The following definitions can be applied:\n
\begin{alist}
\item The two matrices $A$ and $B$ are said to be \textbf{equal}, written as $A=B$ if
$$[A]_{ij}=[B]_{ij}\;\;\;\;\text{for all}1\leq i\leq m,1\leq j\leq n$$
\item The \textbf{sum} of two matrices $A$ and $B$, written as $A+B$, is a matrix with size $m\times n$ where
$$[A+B]_{ij}=[A]_{ij}+[B]_{ij}\;\;\;\;\text{for all}1\leq i\leq m,1\leq j\leq n$$
\item The \textbf{scalar multiple} of the matrix $A$ by $\alpha$, where $\alpha\in\R$, is a matrix with size $m\times n$, written as $\alpha A$ where
$$[\alpha A]_{ij}=\alpha[A]_{ij}\;\;\;\;\text{for all}1\leq i\leq m,1\leq j\leq n$$
\item The $m\times n$ \textbf{zero matrix} is written as $O=O_{m\times n}$ and defined by $[O]_{ij}=0$ for all $1\leq i\leq m,1\leq j\leq n$.
\item The \textbf{addictive inverse} of the matrix $A$, written as $-A$, is defined by $-A=(-1)A$.
\end{alist}
\end{dft}\n
\begin{pst}
Below are some properties satisfied by addition and scalar multiplication:
\begin{alist}
\item \textbf{Commutativity, Matrices}\\
If $A,B\in M_{mn}$, then $A+B=B+A$.
\item \textbf{Addictive Associativity, Matrices}\\
If $A,B,C\in M_{mn}$, then $A+(B+C)=(A+B)+C$.
\item \textbf{Zero Matrix, Matrices}\\
$A+O=A$ for all $A\in M_{mn}$.
\item \textbf{Addictive Inverse, Matrices}\\
$A+(-A)=O$ for all $A\in M_{mn}$.
\item \textbf{Scalar Multiplication Associativity, Matrices}\\
If $\alpha,\beta\in\R$ and $A\in M_{mn}$, then $\alpha(\beta A)=(\alpha\beta)A$.
\item \textbf{Distributivity across Matrix Addition, Matrices}\\
If $\alpha\in\R$ and $A,B\in M_{mn}$, then $\alpha(A+B)=\alpha A+\alpha B$.
\item \textbf{Distributivity across Scalar Addition, Matrices}\\
If $\alpha,\beta\in\R$ and $A\in M_{mn}$, then $(\alpha+\beta)A=\alpha A+\beta A$.
\item \textbf{One, Matrices}\\
If $A\in M_{mn}$, then $1A=A$.
\end{alist}
\end{pst}
\subsubsection{Transposes and Symmetric Matrices}
Suppose there is a matrix $A$ of size $m\times n$. The \textbf{transpose} of the matrix $A$ is the matrix $A^{t}$ of size $n\times m$ where
$$[A^{t}]_{ij}=[A]_{ji}\;\;\;\;\text{for all }1\leq i\leq n,1\leq j\leq m$$\s
With the definition of transposes of matrices, a matrix $A$ is said to be \textbf{symmetric} if $A=A^{t}$. Note that the following theorem is always applicable to symmetric matrices:\n
\begin{pst}
Suppose $A$ is a symmetric matrix, then $A$ is also a square matrix.\n
\prf Suppose $A$ is a $n\times m$ matrix. Then $A^{t}$ is a $m\times n$ matrix. In order for $A$ and $A^{t}$ to be equal, they must be in the same dimension. Hence $m=n$ and $A$ is a square matrix.
\end{pst}\n
The following are three theorems that are easy to prove matrix equalities with learnt notations and techniques:\n
\begin{pst}
Suppose $A$ and $B$ are $m\times n$ matrices, then $(A+B)^{t}=A^{t}+B^{t}$.\n
\prf For $1\leq i\leq n,1\leq j\leq m$,
$$\begin{aligned}[t]
[(A+B)^{t}]_{ij}&=[(A+B)]_{ji}\\
&=[A]_{ji}+[B]_{ji}\\
&=[A^{t}]_{ij}+[B^{t}]_{ij}\\
&=[A^{t}+B^{t}]_{ij}
\end{aligned}$$\s
Since every entry of the matrices $(A+B)^{t}$ and $A^{t}+B^{t}$ agrees, the matrices are equal.
\end{pst}\n
\begin{pst}
Suppose $\alpha\in\R$ and $A$ is an $m\times n$ matrix, then $(\alpha A)^{t}=\alpha A^{t}$.\n
\prf For $1\leq i\leq n,1\leq j\leq m$,
$$\begin{aligned}[t]
[(\alpha A)^{t}]_{ji}&=[\alpha A]_{ij}\\
&=\alpha[A]_{ij}\\
&=\alpha[A^{t}]_{ji}\\
&=[\alpha A^{t}]_{ji}
\end{aligned}$$\s
Since every entry of the matrices $(\alpha A)^{t}$ and $\alpha A^{t}$ agrees, the matrices are equal.
\end{pst}\n
\begin{pst}
Suppose $A$ is an $m\times n$ matrix, then $(A^{t})^{t}=A$.\n
\prf For $1\leq i\leq m,1\leq j\leq n$,
$$\begin{aligned}[t]
[(A^{t})^{t}]_{ij}&=[A^{t}]_{ji}\\
&=[A]_{ij}
\end{aligned}$$\s
Since every entry of the matrices $(A^{t})^{t}$ and $A$ agrees, the matrices are equal.
\end{pst}\n
\subsection{Matrix Multiplication}
\subsubsection{Matrix-Vector Product}
\begin{dft}
Suppose that $A$ is an $m\times n$ matrix with columns $A_{1},A_{2},\cdots,A_{n}$ and $\mathbf{u}$ is a vector of size $n$, then the \textbf{matrix-vector product} of $A$ with $\textbf{u}$ is the linear combination
$$A\mathbf{u}=[\mathbf{u}]_{1}A_{1}+[\mathbf{u}]_{2}A_{2}+\cdots+[\mathbf{u}]_{n}A_{n}$$
\end{dft}\n
As shown above, the matrix-vector product is yet another version of multiplication. Note that an $m\times n$ matrix multiplies with a vector of size $n$ will produce a vector of size $m$.\n
With the definition of matrix-vector product, systems of linear equations can be represented compactly with a matrix-vector product and column vector equality. This yields a very popular alternative to the unconventional $LS(A,\mathbf{b})$ notation.\n
\begin{pst}
The set of solutions to the linear system $LS(A,\mathbf{b})$ equals the set of solutions for $x$ in the vector equation $A\mathbf{x}=\mathbf{b}$.\n
\prf $$\begin{aligned}[t]
&\mathbf{x}\text{ is a solution to }LS(A,\mathbf{b})\\
&\Leftrightarrow[\mathbf{x}]_{1}A_{1}+[\mathbf{x}]_{2}A_{2}+[\mathbf{x}]_{n}A_{n}=b\\
&\Leftrightarrow\mathbf{x}\text{ is a solution to }A\mathbf{x}=\mathbf{b}
\end{aligned}$$
\end{pst}\n
\begin{pst}
Suppose $A$ and $B$ are $m\times n$ matrices such that $A\mathbf{x}=B\mathbf{x}$ for any $\mathbf{x}\in\R^{n}$, then $A=B$.
\end{pst}\n
\subsubsection{Introduction to Matrix Multiplication}
With the method of matrix-vector product, such method can also apply to multiplication of two matrices. Suppose $A$ is an $m\times n$ matrix and $B$ is an $n\times p$ matrix with columns $B_{1},B_{2},\cdots,B_{p}$, then the matrix product of $A$ and $B$ is the $m\times p$ matrix where
$$AB=A[B_{1}\!\mid\!B_{2}\!\mid\!\cdots\!\mid\!B_{p}]=[AB_{1}\!\mid\!AB_{2}\!\mid\!\cdots\!\mid\!AB_{p}]$$\s
Notice that the matrix product $BA$ does not exist due to inappropriate size of the two matrices. Even if the size allows the matrix product to exist, the matrix product will not be the same as the other matrix product. This is because many of the ideas about multiplication will not apply to matrix multiplication. In this case, matrix multiplication is not commutative, which means that the order matters.\n
\begin{pst}
Suppose $A$ is an $m\times n$ matrix and $B$ is an $n\times p$ matrix, then for $1\leq i\leq m, 1\leq j\leq p$, the individual entries of $AB$ is given by
$$\begin{aligned}[t]
[AB]_{ij}&=[A]_{i1}[B]_{1j}+[A]_{i2}[B]_{2j}+\cdots+[A]_{in}[B]_{nj}\\
&=\sum_{k=1}^{n}[A]_{ik}[B]_{kj}
\end{aligned}$$
\end{pst}\n
In fact, this is often used as the definition of the matrix product $AB$.
\subsubsection{Properties of Matrix Multiplication}
\begin{pst}
Suppose $A$ is an $m\times n$ matrix, then the following equalities apply:
\begin{alist}
\item $AO_{n\times p}=A_{m\times p}$
\item $O_{p\times m}A=O_{p\times n}$
\end{alist}
\end{pst}\n
\begin{pst}
Suppose $A$ is an $m\times n$ matrix, then the following equalities apply:
\begin{alist}
\item $AI_{n}=A$
\item $I_{m}A=A$
\end{alist}
\end{pst}\n
Note that the matrix $I$ is given the name of identity matrix since it behaves with matrix multiplication like the scalar $1$ does in scalar multiplication, as shown in the previous theorem. Multiplying by the identity matrix is to have no effect on the other matrix.\n
\begin{pst}
Suppose $A$ is an $m\times n$ matrix, $B$ and $C$ are $n\times p$ matrices, and $D$ is a $p\times s$ matrix, then the following equalities apply:
\begin{alist}
\item $A(B+C)=AB+AC$
\item $(B+C)D=BD+CD$
\end{alist}
\end{pst}\n
\begin{pst}
Suppose $A$ is an $m\times n$ matrix, $B$ is an $n\times p$ matrix and $\alpha$ is a scalar, then $\alpha(AB)=(\alpha A)B=A(\alpha B)$.
\end{pst}\n
\begin{pst}
Suppose $A$ is an $m\times n$ matrix, $B$ is an $n\times p$ matrix and $D$ is a $p\times s$ matrix, then $(AB)D=A(BD)$.
\end{pst}\n
\begin{pst}
Suppose $A$ is an $m\times n$ matrix and $B$ is an $n\times p$ matrix, then $(AB)^{t}=B^{t}A^{t}$.
\end{pst}
\subsubsection{Row Operations and Matrix Multiplication}
Recall the elementary row operations:
\begin{alist}
\item Swap any two rows in a matrix.
\item Perform a non-zero scalar multiplication to every entry of a row in a matrix.
\item Perform a scalar multiplication to every entry of a row in a matrix, and then add to another row in the same columns. The first row will remain unchanged while the second row is replaced by new values.
\end{alist}
\begin{pst}
Let matrix $A\in M_{mn}$, $B$ be a matrix obtained by applying one of the row operations on $A$, and $J$ be a matrix obtained by applying the exact same row operation on $I_{m}$, then $JA=B$.
\end{pst}
\subsection{Reduced Row Echelon Form}
\subsubsection{Introduction to Reduced Row Echelon Form}
Here are some terminology before introducing reduced row echelon form:\n
\begin{dft}
\begin{alist}
\item A \textbf{zero row} is a row consists of only $0$.
\item The \textbf{leftmost entry} of a row is the first nonzero entry of a row.
\item The \textbf{index} of the leftmost entry of a row is the index of the first nonzero entry, denoted by $l_{i}$ for row $i$.
\end{alist}
\end{dft}\n
\begin{exm}
The following is a matrix
$$A=\begin{rmatrix}
0 & 1 & 0 & 1 & 2\\
0 & 0 & 0 & 3 & 0\\
0 & 0 & 1 & 0 & 1\\
0 & 0 & 0 & 0 & 0
\end{rmatrix}$$\s
Note that the index of leftmost entry of row $1$ is $l_{1}=2$, that of row $2$ is $l_{2}=4$ and that of row $3$ is $l_{3}=3$. Row $4$ is a zero row.
\end{exm}\n
\begin{dft}
A matrix is said to be in \textbf{reduced row echelon form}, RREF in short, if it meets all of the conditions below:
\begin{alist}
\item If there is a row where every entry is zero, then this row lies below any other row with nonzero entries.
\item The leftmost nonzero entry of a row is equal to $1$.
\item The leftmost nonzero entry of a row is the only nonzero entry in its column.
\item If $i<j$ and both row $i$ and row $j$ are not zero rows, then $l_{i}<l_{j}$.
\end{alist}
\end{dft}\n
With the definition of reduced row echelon form above, there are more definition based on reduced row echelon form:\n
\begin{dft}
\begin{alist}
\item A row of only entries of $0$ is a zero row, and the leftmost nonzero entry of a nonzero row is a \textbf{leading 1}.
\item A column that contains a leading 1 is called a \textbf{pivot column}, denoted by $D=\left\{ d_{1},d_{2},\cdots,d_{r}\right\}$ where in ascending order.
\item Columns that are not pivot columns are denoted by $F=\left\{ f_{1},f_{2},\cdots,f_{n-r}\right\}$ where in ascending order.
\end{alist}
\end{dft}\n
Note that the number of nonzero rows is denoted by $r$ as above, and it should always equal to the number of leading 1's and number of pivot columns.
\subsubsection{Transforming Matrices to Reduced Row Echelon Form}
Below is a theorem that states that any matrix can be transformed to reduced row echelon form:\n
\begin{thm}
Suppose $A$ is a matrix, then there exists a matrix $B$ such that
\begin{alist}
\item $A$ and $B$ are row-equivalent.
\item $B$ is in reduced row echelon form.
\end{alist}
\end{thm}\n
With the theorem above, suppose $A$ has $m$ rows and $n$ columns. There is always a process to convert $A$ into $B$ via row operations. Such procedure is known as \textbf{Gaussian elimination} or \textbf{Gauss-Jordan elimination}. The following is an example of the procedure mentioned:\n
\begin{exm}
The following is a matrix
$$A=\begin{rmatrix}
0 & 0 & 1 & 1 & 4\\
0 & 0 & 1 & 1 & 3\\
1 & 1 & 2 & 4 & 8\\
2 & 2 & 5 & 9 & 19\\
\end{rmatrix}$$\s
Consider the first row, note that the first entry of the row is $0$, therefore consider the first column. If the first entry of the row is nonzero, this step can be skipped. The third entry of the column is a nonzero entry, hence perform $R_{1}\leftrightarrow R_{3}$:
$$\xrightarrow[ ]{R_{1}\leftrightarrow R_{3}}\begin{rmatrix}
1 & 1 & 2 & 4 & 8\\
0 & 0 & 1 & 1 & 3\\
0 & 0 & 1 & 1 & 4\\
2 & 2 & 5 & 9 & 19\\
\end{rmatrix}$$\s
Note that the fourth entry of the column is also a nonzero entry, but in this case choosing an entry that is equal to $1$ or $-1$ will make future steps easier. Now check the leftmost entry of the first row, and peform $\frac{1}{a}R_{1}$ where $a$ is the entry. This step is skipped in this example since the leftmost entry of the first row is already $1$.\n
Now eliminate the remaining nonzero entries within the same column. In this example, the fourth entry of the column is nonzero, thus perform $-2R_{1}+R_{4}$:
$$\xrightarrow[ ]{-2R_{1}+R_{4}}\begin{rmatrix}
1 & 1 & 2 & 4 & 8\\
0 & 0 & 1 & 1 & 3\\
0 & 0 & 1 & 1 & 4\\
0 & 0 & 1 & 1 & 3\\
\end{rmatrix}$$\s
The first row and first column is completed and can be ignored:
$$\begin{rmatrix}
* & * & * & * & *\\
* & 0 & 1 & 1 & 3\\
* & 0 & 1 & 1 & 4\\
* & 0 & 1 & 1 & 3\\
\end{rmatrix}$$\s
Note that the first leftmost entry of the row is at row $2$ and column $3$, so consider the third column and perform elimination, including the ignored row $1$:
$$\xrightarrow[ ]{-2R_{2}+R_{1},-R_{2}+R_{3},-R_{2}+R_{4}}\begin{rmatrix}
1 & 1 & 0 & 2 & 2\\
0 & 0 & 1 & 1 & 3\\
0 & 0 & 0 & 0 & 1\\
0 & 0 & 0 & 0 & 0\\
\end{rmatrix}$$\s
Repeat the process:
$$\begin{rmatrix}
* & * & * & * & *\\
* & * & * & * & *\\
* & * & * & 0 & 1\\
* & * & * & 0 & 0\\
\end{rmatrix}$$\s
$$\xrightarrow[ ]{-2R_{3}+R_{1},-3R_{3}+R_{2}}\begin{rmatrix}
1 & 1 & 0 & 2 & 0\\
0 & 0 & 1 & 1 & 0\\
0 & 0 & 0 & 0 & 1\\
0 & 0 & 0 & 0 & 0\\
\end{rmatrix}$$\s
until the matrix is in reduced row echelon form.
\end{exm}
\subsubsection{Uniqueness of Reduced Row Echelon Form}
\begin{thm}
Suppose $A$ is an $m\times n$ matrix, and $B$ and $C$ are$m\times n$ matrix that are row-equivalent to $A$ and in reduced row echelon form, then $B=C$.
\end{thm}\n
With the above theorem, we can solve systems of equations in matrix form by reduced row echelon form.
\subsection{Types of Solution Sets}
\subsubsection{Consistent Systems}
With the reduced row echelon form, augmented matrices of systems of linear equations can be analyzed more systematically and carefully. In this section, the fact that every system of linear equations has either zero, one or infinitely many solutions will be proven in detail, thus routinely solve any linear system.\n
\begin{dft}
A system is said to be \textbf{consistent} if it has at least one solution. A system with no solution is \textbf{inconsistent}.
\end{dft}\n
\subsubsection{Free and Dependent Variables}
Recall the following terms about reduced row echelon form:\n
\begin{dft}
Let $A$ be a matrix in reduced row echelon form.
\begin{alist}
\item The number of nonzero rows is called the \textbf{rank} of $A$ and is denoted by $r$.
\item The set of the column indexes for the pivot columns is denoted by
$$D=\left\{ (d_{1},d_{2},\cdots,d_{r})\mid d_{1}<d_{2}<\cdots<d_{r}\right\}$$
\item The set of the column indexes that are not pivot columns is denoted by
$$D=\left\{ (f_{1},f_{2},\cdots,f_{n-r})\mid f_{1}<f_{2}<\cdots<f_{n-r}\right\}$$
\end{alist}
\end{dft}\n
With the definition above, free and dependent variables can also be defined as follows:\n
\begin{dft}
Suppose $A$ is the augmented matrix of a consistent system of linear equations and $B$ is a row-equivalent matrix in reduced row echelon form. If $j$ is the index of a pivot column of $B$, then the variable $x_{j}$ is \textbf{dependent}. A variable that is not dependent is \textbf{independent} or \textbf{free}.
\end{dft}\n
\begin{thm}
Suppose the matrix $A$ is the augmented matrix of a system of linear equations with $n$ variables, and $B$ is a row-equivalent matrix in reduced row echelon form with $r$ nonzero rows, then the following is true:
\begin{alist}
\item The system of equations is inconsistent if and only if column $n+1$ (i.e. the last column) of $B$ is a pivot column.
\item The system of equations is also inconsistent if and only if the last nonzero row is $(0,0,\cdots,0,1)$.
\item Equivalently a system is consistent if and only if column $n+1$ is not a pivot column of $B$.
\end{alist}
\end{thm}
\subsubsection{Interpretations of Reduced Row Echelon Form}
\begin{thm}
Suppose $A$ is the augmented matrix of a consistent system of linear equations with $n$ variables, and $B$ is a row-equivalent matrix in reduced row echelon form with $r$ pivot columns. Then $r\leq n$. If $r=n$, then the system has unique solution, and if $r<n$, then the system has infinitely many solutions.\n
\prf Notice that $B$ has $n+1$ columns, so there can be at most $n+1$ pivot columns, i.e. $r\leq n+1$. If $r=n+1$, then every column in $B$ is pivot column, in particular, the last column is also a pivot column. However, the previous theorem tells us that the system is inconsistent, which is contrary to the hypothesis. Then $r\leq n$.\n