-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathA2.1-SystemsOfLE.rmd
More file actions
386 lines (277 loc) · 7.27 KB
/
A2.1-SystemsOfLE.rmd
File metadata and controls
386 lines (277 loc) · 7.27 KB
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
## Systems of Linear Equations
Systems of linear equations are fundamental in linear algebra, as many problems can be formulated in this way. Linear algebra provides the tools to solve these systems efficiently.
<div class="example">
A company produces products \( N_1, \ldots, N_n \) using resources \( R_1, \ldots, R_m \). Each product \( N_j \) requires \( a_{ij} \) units of resource \( R_i \). If \( b_i \) units of each resource \( R_i \) are available, then the total resources used must satisfy
\[
a_{i1}x_1 + a_{i2}x_2 + \cdots + a_{in}x_n = b_i, \quad i = 1, \ldots, m
\]
or, in general matrix form,
\[
A\mathbf{x} = \mathbf{b},
\]
where \( A = [a_{ij}] \in \mathbb{R}^{m \times n} \), \( \mathbf{x} \in \mathbb{R}^n \), and \( \mathbf{b} \in \mathbb{R}^m \).
</div>
<div class="example">
Suppose a factory produces two products: **P1** and **P2**.
Let:
- \(x_1\) = units of P1 produced
- \(x_2\) = units of P2 produced
**Constraints:**
1. Labor: Each unit of P1 requires 2 hours, P2 requires 3 hours, and total available labor is 120 hours:
\[
2x_1 + 3x_2 \leq 120
\]
2. Material: Each unit of P1 uses 1 kg of material, P2 uses 2 kg, and total available material is 100 kg:
\[
1x_1 + 2x_2 \leq 100
\]
3. Non-negativity:
\[
x_1 \geq 0, \quad x_2 \geq 0
\]
We can rewrite the inequalities as a matrix inequality:
\[
\underbrace{
\begin{pmatrix}
2 & 3 \\
1 & 2
\end{pmatrix}}_{A}
\begin{pmatrix}
x_1 \\ x_2
\end{pmatrix}
\leq
\underbrace{
\begin{pmatrix}
120 \\ 100
\end{pmatrix}}_{b}
\]
Here:
- \(A\) is the **constraint matrix**.
- \(x = \begin{pmatrix}x_1 \\ x_2\end{pmatrix}\) is the **decision variable vector**.
- \(b\) is the **resource vector**.
</div>
---
### Solutions to Systems of Linear Equations
In general, a system of linear equations can have:
- no solution,
- exactly one solution, or
- infinitely many solutions.
<div class="example">
The system
\[
\begin{aligned}
x_1 + x_2 + x_3 &= 3 \\
x_1 - x_2 + 2x_3 &= 2 \\
2x_1 + 3x_3 &= 1
\end{aligned}
\]
has **no solution**, since combining the first two equations gives \( 2x_1 + 3x_3 = 5 \), which contradicts the third equation.
</div>
Systems of equations with no solutions are called *inconsistent*.
<div class="definition">
A system of linear equations is said to be **inconsistent** if no set of values for the unknown variables satisfies all equations simultaneously.
</div>
In other words, the equations contradict each other, and there is no common solution.
<div class="example">
The system
\[
\begin{aligned}
x_1 + x_2 + x_3 &= 3 \\
x_1 - x_2 + 2x_3 &= 2 \\
x_2 + x_3 &= 2
\end{aligned}
\]
has **a unique solution** \( (x_1, x_2, x_3) = (1, 1, 1) \).
</div>
<div class="example">
The system
\[
\begin{aligned}
x_1 + x_2 + x_3 &= 3 \\
x_1 - x_2 + 2x_3 &= 2 \\
2x_1 + 3x_3 &= 5
\end{aligned}
\]
has **infinitely many solutions**, since the third equation is a linear combination of the first two.
If we set \( x_3 = a \in \mathbb{R} \), then
\[
(x_1, x_2, x_3) =
\left( \tfrac{5}{2} - \tfrac{3}{2}a,\,
\tfrac{1}{2} + \tfrac{1}{2}a,\,
a \right),
\quad a \in \mathbb{R}.
\]
Hence, the solution set forms a line in \(\mathbb{R}^3\).
</div>
<div class="definition">
A system of linear equations is called **consistent** if there exists at least one set of values for the unknown variables that satisfies all equations simultaneously.
- If there is exactly one solution, the system is **uniquely consistent**.
- If there are infinitely many solutions, the system is **dependent** (still consistent).
</div>
<div class="example">
The system of equations\[
\begin{cases}
x + y = 5 \\
2x - y = 1
\end{cases}
\]
is a consistent system with a unique solution: \(x = 2\), \(y = 3\).
</div>
<div class="example">
The system of equations
\[
\begin{cases}
x + y = 4 \\
2x + 2y = 10
\end{cases}
\]
is inconsistent since the second equation is equivalent to \(x + y = 5\), which contradicts the first equation (\(x + y = 4\)). Thus, the system has no solution.
</div>
---
### Geometric Interpretation
In two dimensions, each linear equation represents a **line** on the \( x_1x_2 \)-plane. The **solution set** is the intersection of these lines, which can be:
- a **point** (unique solution),
- a **line** (infinitely many solutions), or
- **empty** (no solution).
For three variables, each equation defines a **plane** in \( \mathbb{R}^3 \). Their intersection can be a plane, line, point, or empty set.
<div class="example">
\[
\begin{aligned}
4x_1 + 4x_2 &= 5 \\
2x_1 - 4x_2 &= 1
\end{aligned}
\]
has the unique solution \( (x_1, x_2) = (1, \tfrac{1}{4}) \).
</div>
<div class="example">
Consider the system:
\[
\begin{cases}
x + y + z = 3 \\
2x + 2y + 2z = 6 \\
x - y + z = 1
\end{cases}
\]
The second equation is just \(2 \times\) the first equation, so it doesn't add a new constraint. The first and third equations define a plane intersection. This leaves one free variable, so there are infinitely many solutions.
Let \(z = t\) (free parameter), then:
\[
\begin{aligned}
x + y + t &= 3 \implies x = 3 - y - t \\
x - y + t &= 1 \implies (3 - y - t) - y + t = 1 \implies 2y = 2 \implies y = 1 \\
x &= 3 - 1 - t = 2 - t
\end{aligned}
\]
Thus, the general solution is:
\[
(x, y, z) = (2 - t, 1, t), \quad t \in \mathbb{R}.
\]
</div>
---
### Matrix Formulation
A system of linear equations can be written compactly as:
\[
\begin{bmatrix}
a_{11} & a_{12} & \cdots & a_{1n} \\
\vdots & \vdots & \ddots & \vdots \\
a_{m1} & a_{m2} & \cdots & a_{mn}
\end{bmatrix}
\begin{bmatrix}
x_1 \\ \vdots \\ x_n
\end{bmatrix}
=
\begin{bmatrix}
b_1 \\ \vdots \\ b_m
\end{bmatrix}
\]
This matrix representation \( A\mathbf{x} = \mathbf{b} \) provides a compact and powerful way to describe and solve systems of linear equations.
<div class="example">
Write the system of equations as a matrix: \[
\begin{cases}
x + y = 5 \\
2x - y = 1
\end{cases}
\]
The matrix version of this system is:
\[
\begin{bmatrix}
1 & 1 \\
2 & -1
\end{bmatrix}
\begin{bmatrix}
x \\ y
\end{bmatrix}
=
\begin{bmatrix}
5 \\ 1
\end{bmatrix}
\]
</div>
<div class="example">
Write the system of equations as a matrix: \[\begin{cases}
x + y = 4 \\
2x + 2y = 10
\end{cases}
\]
The matrix version of this system is:
\[
\begin{bmatrix}
1 & 1 \\
2 & 2
\end{bmatrix}
\begin{bmatrix}
x \\ y
\end{bmatrix}
=
\begin{bmatrix}
4 \\ 10
\end{bmatrix}
\]
</div>
---
### Exercises {.unnumbered .unlisted}
<div class="exercise">
Write a system of equations with a unique solution.
</div>
<div class="exercise">
Write a system of equations with infinitely many solutions.
</div>
<div class="exercise">
Write a system of equations with no solutions.
</div>
<div class="exercise">
Solve example 2.11
<div style="text-align: right;">
[Solution]( )
</div>
</div>
<div class="exercise">
Write 2.15 and 2.16 as a matrix equations
<div style="text-align: right;">
[Solution]( )
</div>
</div>
<div class="exercise">
Solve a system of equations
<div style="text-align: right;">
[Solution]( )
</div>
</div>
<div class="exercise">
Solve a system of equations
<div style="text-align: right;">
[Solution]( )
</div>
</div>
<div class="exercise">
Turn into a matrix form
<div style="text-align: right;">
[Solution]( )
</div>
</div>
<div class="exercise">
Change from matrix to equations
<div style="text-align: right;">
[Solution]( )
</div>
</div>
---