-
Notifications
You must be signed in to change notification settings - Fork 2
/
appendix-LinAlg.tex
294 lines (236 loc) · 5.91 KB
/
appendix-LinAlg.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
\subsection{Linear Algebra Review}
\label{LinAlg}
\begin{center}\textbf{\color{cyan}Algebra of Solving Systems of 2 Linear Equations}
\end{center}
We can write a linear system of equations
\begin{align*}
a_{11} x_1 + a_{12} x_2 &= b_1 \\
a_{21} x_1 + a_{22} x_2 &= b_2
\end{align*}
into matrix form
$$
{\bf A} \vec{x} = \vec{b},
$$
where
$$
{\bf A}
= \begin{pmatrix}
a_{11} & a_{12} \\
a_{21} & a_{22}
\end{pmatrix}
\quad \text{,} \quad
\vec{x}
= \begin{pmatrix}
x_{1} \\
x_{2}
\end{pmatrix}
\quad \text{ and } \quad
\vec{b}
= \begin{pmatrix}
b_{1} \\
b_{2}
\end{pmatrix} .
$$
We can solve a system like this one in several different ways.
\begin{example}
Solve the system
\begin{align*}
3x_1+2x_2 &= 7 \\
2x_1+3x_2 & = 8.
\end{align*}
\end{example}
\begin{definition}[Solution by substitution.]
We can write
$$
x_2 = \frac{7-3x_1}{2},
$$
and use this on the second equation
$$
2x_1 + 3\frac{7-3x_1}{2} = 8
\quad \Leftrightarrow \quad 4x_1 + 21-9x_1=16
\quad \Leftrightarrow \quad -5x_1 =-5
\quad \Leftrightarrow \quad x_1 =1
$$
Then re-use the first equation we obtained to get $x_2 = 2$.
\end{definition}
\begin{definition}[Solution by Cramer's rule]
Using the same method of substitution on the general system, we obtain
$$
a_{12} x_2 = b_1 - a_{11} x_1,
$$
and we use this into the second equation (after multiplying by $a_{12}$)
$$
a_{12} a_{21} x_1 = a_{22} b_1 - a_{11}a_{22} x_1 = a_{12} b_2
$$
This implies
$$
x_1
= \frac{b_1 a_{22} - a_{12} b_2}{a_{11}a_{22} - a_{12}a_{21}}
= \frac{
\begin{vmatrix}
b_1 & a_{12} \\
b_2 & a_{22}
\end{vmatrix}
}{
\begin{vmatrix}
a_{11} & a_{12} \\
a_{21} & a_{22}
\end{vmatrix}
}
$$
Then we use this to obtain
$$
x_2
= \frac{a_{11} b_2 - b_1 a_{21} }{a_{11}a_{22} - a_{12}a_{21}}
= \frac{
\begin{vmatrix}
a_{11} & b_1 \\
a_{21} & b_2
\end{vmatrix}
}{
\begin{vmatrix}
a_{11} & a_{12} \\
a_{21} & a_{22}
\end{vmatrix}
}
$$
\end{definition}
\begin{important}
This implies that there is a unique solution of the system if and only if
$$
\det ({\bf A}) = a_{11}a_{22} - a_{12}a_{21} \neq 0.
$$
\end{important}
\begin{definition}[Solution by inverse matrix]
A matrix is {\bf invertible} or {\bf nonsingular} \quad iff \quad ${\bf A}^{-1}$ exists \quad iff \quad $\det({\bf A}) \neq 0$.
If the matrix {\bf A} is invertible, then we can write
$$
{\bf A}^{-1}
= \frac{1}{\det({\bf A})} \begin{pmatrix}
a_{22} & -a_{12} \\
-a_{21} & a_{11}
\end{pmatrix}
$$
We can now use this to solve the system of equations:
\begin{align*}
{\bf A} \vec{x} & = \vec{b} \\
{\bf A}^{-1} {\bf A} \vec{x} & = {\bf A}^{-1} \vec{b} \\
{\bf I} \vec{x} & = {\bf A}^{-1} \vec{b} \\
\vec{x} & = {\bf A}^{-1} \vec{b}
\end{align*}
\end{definition}
\begin{definition}[Homogeneous Systems]
A system of equations is called \emph{homogeneous} if $\vec{x}=\vec{0}$ is a solution, which means that $\vec{b} = 0$:
$$
{\bf A} \vec{x} = \vec{0}.
$$
Otherwise, it is called \emph{nonhomogeneous}.
\end{definition}
\hfil
\begin{center}\textbf{\color{cyan}Eigenvalues and Eigenvectors}
\end{center}
We can think of the matrix multiplication $\vec{y}={\bf A}\vec{x}$ as a mapping or transformation: given a vector $\vec{x}$ it transforms it into a different vector $\vec{y}$.
In many applications, it is important to know which vectors $\vec{x}$ are transformed into multiples of themselves.
These vectors satisfy the property
$$
{\bf A}\vec{x} = \lambda \vec{x} \qquad \Leftrightarrow \qquad ({\bf A} - \lambda {\bf I} ) \vec{x} = \vec{0}.
$$
One such vector is $\vec{x}=\vec{0}$. But that's not very interesting. We want to look for nonzero vectors that satisfy this property.
These vectors are called {\bf eigenvectors} and the corresponding $\lambda$ is called an {\bf eigenvalue}.
\begin{important}
The second formulation above implies that the matrix $({\bf A} - \lambda {\bf I})$ is singular, otherwise the unique solution would be $\vec{x}=\vec{0}$.
So that implies that
\begin{equation}\tag{\bf characteristic equation}
\det({\bf A} - \lambda {\bf I}) = 0
\end{equation}
\end{important}
\begin{example}
Let us find the eigenvalues and eigenvectors for
$$
{\bf A} = \begin{pmatrix} 1 & 8 \\ 4 & 5 \end{pmatrix}.
$$
First we solve the characteristic equation:
$$
\det({\bf A} - \lambda {\bf I})
= \begin{vmatrix}
1 - \lambda & 8 \\
4 & 5 - \lambda
\end{vmatrix}
= (1-\lambda)(5-\lambda) - 32 = 0
\qquad \Leftrightarrow \qquad
\lambda^2 - 6 \lambda -27=0
$$
which implies that
$$
\lambda = 3 \pm \sqrt{9 + 27} = 3 \pm 6
$$
\subparagraph{Eigenvalue $\lambda_1 = -3$. } To find the eigenvector, we write its equation
$$
({\bf A} - \lambda_1 {\bf I} ) \vec{x} = \vec{0}
\qquad \Leftrightarrow \qquad
\begin{pmatrix}
4 & 8 \\
4 & 8
\end{pmatrix}
\begin{pmatrix}
x_1 \\ x_2
\end{pmatrix}
= \begin{pmatrix}
0 \\ 0
\end{pmatrix}
$$
which implies that
$$
4x_1 +8x_2 = 0
\qquad \Leftrightarrow \qquad
x_1 = -2 x_2.
$$
So one eigenvector for this eigenvalue is
$$
\vec{x}_1 = \begin{pmatrix}
-2 \\ 1
\end{pmatrix}
$$
\subparagraph{Eigenvalue $\lambda_2 = 9$. } To find the eigenvector, we write its equation
$$
\begin{pmatrix}
-8 & 8 \\
4 & -4
\end{pmatrix}
\begin{pmatrix}
x_1 \\ x_2
\end{pmatrix}
= \begin{pmatrix}
0 \\ 0
\end{pmatrix}
$$
which implies that
$$
-8x_1 +8x_2 = 0
\qquad \Leftrightarrow \qquad
x_1 = x_2.
$$
So one eigenvector for this eigenvalue is
$$
\vec{x}_2 = \begin{pmatrix}
1 \\ 1
\end{pmatrix}
$$
\end{example}
\begin{theorem}
Let {\bf A} have real or complex eigenvalues $\lambda_1$ and $\lambda_2$ such that $\lambda_1 \neq \lambda_2$ and let the corresponding eigenvectors be
$$
\vec{x}_1 = \begin{pmatrix} x_{11} \\ x_{21} \end{pmatrix}
\qquad \text{ and } \qquad
\vec{x}_2 = \begin{pmatrix} x_{12} \\ x_{22} \end{pmatrix}.
$$
If {\bf X} is the matrix with columns taken from the eigenvectors:
$$
{\bf X} = \begin{pmatrix}
x_{11} & x_{12} \\
x_{21} & x_{22}
\end{pmatrix},
$$
then
$$\det({\bf X}) \neq 0.$$
\end{theorem}