This repository has been archived by the owner on Aug 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 172
/
Copy pathmatrixeq.xml
522 lines (447 loc) · 22.5 KB
/
matrixeq.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
<?xml version="1.0" encoding="UTF-8"?>
<!--********************************************************************
Copyright 2017 Georgia Institute of Technology
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation. A copy of
the license is included in gfdl.xml.
*********************************************************************-->
<section xml:id="matrix-equations">
<title>Matrix Equations</title>
<objectives>
<ol>
<li>Understand the equivalence between a system of linear equations, an augmented matrix, a vector equation, and a matrix equation.</li>
<li>Characterize the vectors <m>b</m> such that <m>Ax=b</m> is consistent, in terms of the span of the columns of <m>A</m>.</li>
<li>Characterize matrices <m>A</m> such that <m>Ax=b</m> is consistent for all vectors <m>b</m>.</li>
<li><em>Recipe:</em> multiply a vector by a matrix (two ways).</li>
<li><em>Picture:</em> the set of all vectors <m>b</m> such that <m>Ax=b</m> is consistent.</li>
<li><em>Vocabulary word:</em> <term>matrix equation</term>.</li>
</ol>
</objectives>
<subsection>
<title>The Matrix Equation <m>Ax=b</m>.</title>
<p>In this section we introduce a very concise way of writing a system of linear equations: <m>Ax=b</m>. Here <m>A</m> is a matrix and <m>x,b</m> are vectors (generally of different sizes), so first we must explain how to multiply a matrix by a vector.
</p>
<bluebox>
<p>When we say <q><m>A</m> is an <m>m\times n</m> matrix,</q> we mean that <m>A</m> has <m>m</m> rows and <m>n</m> columns.
<idx><h>Matrix</h><h>size of</h></idx>
<notation><usage>m\times n\text{ matrix}</usage><description>Size of a matrix</description></notation>
</p>
</bluebox>
<remark>
<p>In this book, we do <em>not</em> reserve the letters <m>m</m> and <m>n</m> for the numbers of rows and columns of a matrix. If we write <q><m>A</m> is an <m>n\times m</m> matrix</q>, then <m>n</m> is the number of rows of <m>A</m> and <m>m</m> is the number of columns.</p>
</remark>
<definition xml:id="matrixeq-defn-Ax1">
<idx><h>Matrix-vector product</h><h>definition of</h></idx>
<idx><h>Matrix</h><h>product with vector</h><see>Matrix-vector product</see></idx>
<idx><h>Vector</h><h>product with matrix</h><see>Matrix-vector product</see></idx>
<statement>
<p>Let <m>A</m> be an <m>m\times n</m> matrix with columns <m>v_1,v_2,\ldots,v_n</m>:
<me>A = \mat{| | ,{}, |; v_1 v_2 \cdots, v_n;| | ,{}, | }</me>
The <term>product</term> of <m>A</m> with a vector <m>x</m> in <m>\R^n</m> is the linear combination
<me>Ax = \mat{| | ,{}, |; v_1 v_2 \cdots, v_n;| | ,{}, | }
\vec{x_1 x_2 \vdots, x_n} = x_1v_1 + x_2v_2 + \cdots + x_nv_n.</me>
This is a vector in <m>\R^m</m>.
</p>
</statement>
</definition>
<example>
<p><me>
\mat{
4 5 6;
7 8 9}
\vec{1 2 3}
= 1\vec{4 7} + 2\vec{5 8} + 3\vec{6 9} = \vec{32 50}.
</me></p>
</example>
<p>In order for <m>Ax</m> to make sense, the number of entries of <m>x</m> has to be the same as the number of columns of <m>A</m>: we are using the entries of <m>x</m> as the coefficients of the columns of <m>A</m> in a linear combination. The resulting vector has the same number of entries as the number of <em>rows</em> of <m>A</m>, since each column of <m>A</m> has that number of entries.
</p>
<bluebox>
<p>If <m>A</m> is an <m>m\times n</m> matrix (<m>m</m> rows, <m>n</m> columns), then <m>Ax</m> makes sense when <m>x</m> has <m>n</m> entries. The product <m>Ax</m> has <m>m</m> entries.
</p>
</bluebox>
<proposition hide-type="true" xml:id="matrix-linearity">
<title>Properties of the Matrix-Vector Product</title>
<statement>
<p>
Let <m>A</m> be an <m>m\times n</m> matrix, let <m>u,v</m> be vectors in <m>\R^n</m>, and let <m>c</m> be a scalar. Then:
<ul>
<li><m>A(u+v) = Au + Av</m></li>
<li><m>A(cu) = cAu</m></li>
</ul>
</p>
</statement>
</proposition>
<definition>
<idx><h>Matrix equation</h><h>definition of</h></idx>
<statement>
<p>A <term>matrix equation</term> is an equation of the form <m>Ax=b</m>, where <m>A</m> is an <m>m\times n</m> matrix, <m>b</m> is a vector in <m>\R^m</m>, and <m>x</m> is a vector whose coefficients <m>x_1,x_2,\ldots,x_n</m> are unknown.</p>
</statement>
</definition>
<p>
In this book we will study two complementary questions about a matrix equation <m>Ax=b</m>:
<ol>
<li>Given a specific choice of <m>b</m>, what are all of the solutions to <m>Ax=b</m>?</li>
<li>What are all of the choices of <m>b</m> so that <m>Ax=b</m> is consistent?</li>
</ol>
The first question is more like the questions you might be used to from your earlier courses in algebra; you have a lot of practice solving equations like <m>x^2-1=0</m> for <m>x</m>. The second question is perhaps a new concept for you. The <xref ref="rank-theorem"/>, which is the culmination of this chapter, tells us that the two questions are intimately related.
</p>
<note hide-type="true">
<title>Matrix Equations and Vector Equations</title>
<idx><h>Matrix equation</h><h>equivalence with vector equation</h></idx>
<idx><h>Vector equation</h><h>equivalence with matrix equation</h></idx>
<p>Let <m>v_1,v_2,\ldots,v_n</m> and <m>b</m> be vectors in <m>\R^m</m>. Consider the vector equation
<me>x_1v_1 + x_2v_2 + \cdots + x_nv_n = b.</me>
This is equivalent to the matrix equation <m>Ax=b</m>, where
<me>A = \mat{ | | {} |; v_1 v_2 \cdots, v_n; | | {} |}
\sptxt{and}
x = \vec{x_1 x_2 \vdots, x_n}.
</me>
Conversely, if <m>A</m> is any <m>m\times n</m> matrix, then
<m>Ax=b</m> is equivalent to the vector equation
<me>x_1v_1 + x_2v_2 + \cdots + x_nv_n = b,</me>
where <m>v_1,v_2,\ldots,v_n</m> are the columns of <m>A</m>, and <m>x_1,x_2,\ldots,x_n</m> are the entries of <m>x</m>.
</p>
</note>
<example>
<statement>
<p>Write the vector equation
<me>2v_1 + 3v_2 - 4v_3 = \vec{7 2 1}</me>
as a matrix equation, where <m>v_1,v_2,v_3</m> are vectors in <m>\R^3</m>.
</p>
</statement>
<solution>
<p>Let <m>A</m> be the matrix with columns <m>v_1,v_2,v_3</m>, and let <m>x</m> be the vector with entries <m>2,3,-4</m>. Then
<me>Ax = \mat{ | | |; v_1 v_2 v_3; | | |}\vec{2 3 -4}
= 2v_1 + 3v_2 - 4v_3, </me>
so the vector equation is equivalent to the matrix equation
<m>Ax=\vec{7 2 1}.</m>
</p>
</solution>
</example>
<note hide-type="true">
<title>Four Ways of Writing a Linear System</title>
<p>We now have <em>four</em> equivalent ways of writing (and thinking about) a system of linear equations:
<idx><h>System of linear equations</h><h>four ways of writing</h></idx>
<ol>
<li>As a system of equations:
<me>\syseq{2x_1 + 3x_2 - 2x_3 = 7; x_1 - x_2 - 3x_3 = 5}
</me>
</li>
<li>As an augmented matrix:
<me>\amat{2 3 -2 7; 1 -1 -3 5}</me>
</li>
<li>As a vector equation (<m>x_1v_1 + x_2v_2 + \cdots + x_nv_n = b</m>):
<me>x_1\vec{2 1} + x_2\vec{3 -1} + x_3\vec{-2 -3} = \vec{7 5}</me>
</li>
<li>As a matrix equation (<m>Ax=b</m>):
<me>\mat{2 3 -2; 1 -1 -3}\vec{x_1 x_2 x_3} = \vec{7 5}.
</me>
</li>
</ol>
In particular, <em>all four have the same solution set</em>.
</p>
</note>
<bluebox>
<p>We will move back and forth freely between the four ways of writing a linear system, over and over again, for the rest of the book.</p>
</bluebox>
<paragraphs>
<title>Another Way to Compute <m>Ax</m></title>
<p>The above <xref ref="matrixeq-defn-Ax1"/> is a useful way of defining the product of a matrix with a vector when it comes to understanding the relationship between matrix equations and vector equations. Here we give a definition that is better-adapted to computations by hand.
</p>
<definition xml:id="matrixeq-row-column-prod">
<idx><h>Row vector</h><see>Vector</see></idx>
<idx><h>Vector</h><h>row vector</h></idx>
<idx><h>Vector</h><h>row vector</h><h>product with column vector</h></idx>
<statement>
<p>A <term>row vector</term> is a matrix with one row. The <term>product</term> of a row vector of length <m>n</m> and a (column) vector of length <m>n</m> is
<me>\mat{a_1 a_2 \cdots, a_n} \vec{x_1 x_2 \vdots, x_n}
= a_1x_1 + a_2x_2 + \cdots + a_nx_n.</me>
This is a scalar.
</p>
</statement>
</definition>
<bluebox xml:id="matrixeq-row-column">
<title>Recipe: The row-column rule for matrix-vector multiplication</title>
<idx><h>Matrix-vector product</h><h>row-column rule</h></idx>
<p>
If <m>A</m> is an <m>m\times n</m> matrix with rows <m>r_1,r_2,\ldots,r_m</m>, and <m>x</m> is a vector in <m>\R^n</m>, then
<me>Ax = \mat[c]{ \matrow{r_1};
\matrow{r_2};
\vdots ;
\matrow{r_m}}
x
= \vec{r_1x r_2x \vdots, r_mx}.
</me>
</p>
</bluebox>
<example>
<p><me>
\mat{
4 5 6;
7 8 9}
\vec{1 2 3} =
\mat{\mat{4, 5, 6}\vec{1 2 3};
\mat{7 8 9}\vec{1 2 3}}
= \vec{4\cdot1+5\cdot2+6\cdot3 7\cdot1+8\cdot2+9\cdot3}
= \vec{32 50}.
</me>
This is the same answer as before:
<me>
\mat{
4 5 6;
7 8 9}
\vec{1 2 3}
= 1\vec{4 7} + 2\vec{5 8} + 3\vec{6 9}
= \vec{1\cdot4+2\cdot5+3\cdot6 1\cdot7+2\cdot8+3\cdot9}
= \vec{32 50}.
</me>
</p>
</example>
</paragraphs>
</subsection>
<subsection>
<title>Spans and Consistency</title>
<p>Let <m>A</m> be a matrix with columns <m>v_1,v_2,\ldots,v_n</m>:
<me>A = \mat{ | | {} |; v_1 v_2 \cdots, v_n; | | {} |}.</me>
Then
<me>\begin{split}
Ax=b&\text{ has a solution} \\
&\iff \text{there exist $x_1,x_2,\ldots,x_n$ such that }
A\vec{x_1 x_2 \vdots, x_n} = b \\
&\iff \text{there exist $x_1,x_2,\ldots,x_n$ such that }
x_1v_1 + x_2v_2 + \cdots + x_nv_n = b \\
&\iff \text{$b$ is a linear combination of } v_1,v_2,\ldots,v_n \\
&\iff \text{$b$ is in the span of the columns of $A$}.
\end{split}
</me>
</p>
<bluebox xml:id="matrixeq-spans-consistency" type-name="Note">
<title>Spans and Consistency</title>
<idx><h>Matrix equation</h><h>spans and consistency</h></idx>
<idx><h>System of linear equations</h><h>consistent</h><h>span criterion</h></idx>
<idx><h>Column span</h><see>Column space</see></idx>
<p>The matrix equation <m>Ax=b</m> has a solution if and only if <m>b</m> is in the span of the columns of <m>A</m>.</p>
</bluebox>
<p>This gives an equivalence between an <em>algebraic</em> statement (<m>Ax=b</m> is consistent), and a <em>geometric</em> statement (<m>b</m> is in the span of the columns of <m>A</m>).
</p>
<example>
<title>An Inconsistent System</title>
<statement><p>
Let <m>A=\mat[r]{2 1; -1 0; 1 -1}</m>. Does the equation <m>Ax=\vec{0 2 2}</m> have a solution?
</p></statement>
<solution>
<p>First we answer the question geometrically. The columns of <m>A</m> are
<me>\textcolor{seq-red}{v_1 = \vec{2 -1 1}}
\sptxt{and}
\textcolor{seq-blue}{v_2 = \vec{1 0 -1}},</me>
and the target vector (on the right-hand side of the equation) is <m>\textcolor{seq-green}{w = \vec{0 2 2}}.</m> The equation <m>Ax=w</m> is consistent if and only if <m>w</m> is contained in the span of the columns of <m>A</m>. So we draw a picture:
<latex-code>
<![CDATA[
\begin{tikzpicture}[myxyz, z={(0,0,1.2)}, thin border nodes]
\path[clip, resetxy] (-4,-4) rectangle (4,4);
\def\v{(2,-1,1)}
\def\w{(1,0,-1)}
\def\b{(0,2,2)}
\node[coordinate] (X) at \v {};
\node[coordinate] (Y) at \w {};
\begin{scope}[x=(X), y=(Y), transformxy]
\path[clip] (-5, -5) -- (5, 5) -- (5, 10) -- (-5, 10) -- cycle;
\fill[seq4!30, nearly opaque] (-1.5,-1) rectangle (1.5,2);
\draw[step=.5cm, seq4, very thin] (-1.5,-1) grid (1.5,2);
\end{scope}
\begin{scope}[transformxy]
\fill[white, nearly opaque] (-2, -2) rectangle (3, 3);
\draw[grid lines] (-2, -2) grid (3, 3);
\end{scope}
\begin{scope}[x=(X), y=(Y), transformxy]
\path[clip] (-5, -5) -- (5, 5) -- (5, -10) -- (-5, -10) -- cycle;
\fill[seq4!30, nearly opaque] (-1.5,-1) rectangle (1.5,2);
\draw[step=.5cm, seq4, very thin] (-1.5,-1) grid (1.5,2);
\end{scope}
\draw[vector, seq-blue] (0,0,0) --
node [midway, above right] {$v_1$} \v;
\draw[thin, densely dotted] \v -- \projxy\v;
\begin{scope}
\path[clip, transformxy] (-2, -2) rectangle (3, 3);
\draw[vector, seq-green!50!white] (0,0,0) --
node [pos=1.0, below left] {$v_2$} \w;
\end{scope}
\begin{scope}
\path[clip, transformxy] (5, -2) rectangle (3, 3);
\draw[vector, seq-green] (0,0,0) --
node [pos=1.0, below left] {$v_2$} \w;
\end{scope}
\draw[thin, densely dotted, black!50!white] \w -- \projxy\w;
\draw[vector, black] (0,0,0) --
node [pos=0.8, above left] {$w$} \b;
\draw[thin, densely dotted] \b -- \projxy\b;
\node[seq4] at (-1.5cm, 2.3cm) {$\Span\{v_1,v_2\}$};
\point at (0,0,0);
\end{tikzpicture}
]]>
</latex-code>
It does not appear that <m>w</m> lies in <m>\Span\{v_1,v_2\},</m> so the equation is inconsistent.</p>
<figure>
<caption>The vector <m>w</m> is not contained in <m>\Span\{v_1,v_2\}</m>, so the equation <m>Ax=b</m> is inconsistent. (Try moving the sliders to solve the equation.)</caption>
<mathbox source="demos/spans.html?v1=2,-1,1&v2=1,0,-1&target=0,2,2&range=5" height="500px"/>
</figure>
<p>Let us check our geometric answer by solving the matrix equation using row reduction. We put the system into an augmented matrix and row reduce:
<me>\amat{2 1 0; -1 0 2; 1 -1 2}
\quad\xrightarrow{\text{RREF}}\quad
\amat{1 0 0; 0 1 0; 0 0 1}.
</me>
The last equation is <m>0=1</m>, so the system is indeed inconsistent, and the matrix equation
<me>\mat[r]{2 1; -1 0; 1 -1}x = \vec{0 2 2}</me>
has no solution.
</p>
</solution>
</example>
<example>
<title>A Consistent System</title>
<statement><p>
Let <m>A=\mat[r]{2 1; -1 0; 1 -1}</m>. Does the equation <m>Ax=\vec{1 -1 2}</m> have a solution?
</p></statement>
<solution>
<p>First we answer the question geometrically. The columns of <m>A</m> are
<me>\textcolor{seq-red}{v_1 = \vec{2 -1 1}}
\sptxt{and}
\textcolor{seq-blue}{v_2 = \vec{1 0 -1}},</me>
and the target vector (on the right-hand side of the equation) is <m>\textcolor{seq-green}{w = \vec{1 -1 2}}.</m> The equation <m>Ax=w</m> is consistent if and only if <m>w</m> is contained in the span of the columns of <m>A</m>. So we draw a picture:
<latex-code>
<![CDATA[
\begin{tikzpicture}[myxyz, z={(0,0,1.2)}, thin border nodes]
\path[clip, resetxy] (-4,-4) rectangle (4,4);
\def\v{(2,-1,1)}
\def\w{(1,0,-1)}
\def\b{(1,-1,2)}
\node[coordinate] (X) at \v {};
\node[coordinate] (Y) at \w {};
\begin{scope}[x=(X), y=(Y), transformxy]
\path[clip] (-5, -5) -- (5, 5) -- (5, 10) -- (-5, 10) -- cycle;
\fill[seq4!30, nearly opaque] (-1.5,-1.5) rectangle (1.5,2);
\draw[step=.5cm, seq4, very thin] (-1.5,-1.5) grid (1.5,2);
\end{scope}
\begin{scope}[transformxy]
\fill[white, nearly opaque] (-2, -2) rectangle (3, 3);
\draw[help lines] (-2, -2) grid (3, 3);
\end{scope}
\begin{scope}[x=(X), y=(Y), transformxy]
\path[clip] (-5, -5) -- (5, 5) -- (5, -10) -- (-5, -10) -- cycle;
\fill[seq4!30, nearly opaque] (-1.5,-1.5) rectangle (1.5,2);
\draw[step=.5cm, seq4, very thin] (-1.5,-1.5) grid (1.5,2);
\end{scope}
\draw[vector, seq-blue] (0,0,0) --
node [midway, above right] {$v_1$} \v;
\draw[thin, densely dotted] \v -- \projxy\v;
\begin{scope}
\path[clip, transformxy] (-2, -2) rectangle (3, 3);
\draw[vector, seq-green!50!white] (0,0,0) --
node [pos=1.0, below left] {$v_2$} \w;
\end{scope}
\begin{scope}
\path[clip, transformxy] (5, -2) rectangle (3, 3);
\draw[vector, seq-green] (0,0,0) --
node [pos=1.0, below left] {$v_2$} \w;
\end{scope}
\draw[thin, densely dotted, black!50!white] \w -- \projxy\w;
\draw[vector, black] (0,0,0) --
node [midway, above right] {$w$} \b;
\draw[thin, densely dotted] \b -- \projxy\b;
\node[seq4] at (1.75cm, 2.1cm) {$\Span\{v_1,v_2\}$};
\point at (0,0,0);
\end{tikzpicture}
]]>
</latex-code>
It appears that <m>w</m> is indeed contained in the span of the columns of <m>A</m>; in fact, we can see
<me>w = v_1 - v_2 \implies x = \vec{1 -1}.</me>
</p>
<figure>
<caption>The vector <m>w</m> is contained in <m>\Span\{v_1,v_2\}</m>, so the equation <m>Ax=b</m> is consistent. (Move the sliders to solve the equation.)</caption>
<mathbox source="demos/spans.html?v1=2,-1,1&v2=1,0,-1&target=1,-1,2&range=5" height="500px"/>
</figure>
<p>Let us check our geometric answer by solving the matrix equation using row reduction. We put the system into an augmented matrix and row reduce:
<me>\amat{2 1 1; -1 0 -1; 1 -1 2}
\quad\xrightarrow{\text{RREF}}\quad
\amat{1 0 1; 0 1 -1; 0 0 0}.
</me>
This gives us <m>x=1</m> and <m>y=-1</m>, which is consistent with the picture:
<me>1\vec{2 -1 1} -1\vec{1 0 -1} = \vec{1 -1 2}
\sptxt{or}
A\vec{1 -1} = \vec{1 -1 2}.</me>
</p>
</solution>
</example>
<paragraphs>
<title>When Solutions Always Exist</title>
<p>Building on this <xref ref="matrixeq-spans-consistency">note</xref>, we have the following criterion for when <m>Ax=b</m> is consistent for <em>every</em> choice of <m>b</m>.</p>
<theorem xml:id="matrixeq-thm-full-span">
<idx><h>Matrix equation</h><h>always consistent</h></idx>
<statement>
<p>Let <m>A</m> be an <m>m\times n</m> (non-augmented) matrix. The following are equivalent:
<ol>
<li><m>Ax=b</m> has a solution for all <m>b</m> in <m>\R^m</m>.</li>
<li>The span of the columns of <m>A</m> is all of <m>\R^m</m>.</li>
<li><m>A</m> has a <xref ref="defn-pivot-pos" text="title">pivot position</xref> in every row.</li>
</ol>
</p>
</statement>
<proof>
<p>The equivalence of 1 and 2 is established by this <xref ref="matrixeq-spans-consistency"/> as applied to every <m>b</m> in <m>\R^m</m>.
</p>
<p>Now we show that 1 and 3 are equivalent. (Since we know 1 and 2 are equivalent, this implies 2 and 3 are equivalent as well.) If <m>A</m> has a pivot in every row, then its reduced row echelon form looks like this:
<me>\mat{
1 0 \star, 0 \star ;
0 1 \star , 0 \star ;
0 0 0 1 \star
},</me>
and therefore <m>\amat{A b}</m> reduces to this:
<me>\amat[c]{
1 0 \star, 0 \star, \star ;
0 1 \star , 0 \star, \star ;
0 0 0 1 \star, \star
}.</me>
There is no <m>b</m> that makes it inconsistent, so there is always a solution. Conversely, if <m>A</m> does not have a pivot in each row, then its reduced row echelon form looks like this:
<me>\mat{
1 0 \star, 0 \star ;
0 1 \star , 0 \star ;
0 0 0 0 0
},</me>
which can give rise to an inconsistent system after augmenting with <m>b</m>:
<me>\amat{
1 0 \star, 0 \star, 0 ;
0 1 \star , 0 \star, 0 ;
0 0 0 0 0 16
}.
</me>
</p>
</proof>
</theorem>
<p>Recall that <term>equivalent</term> means that, for any given matrix <m>A</m>, either <em>all</em> of the conditions of the above <xref ref="matrixeq-thm-full-span"/> are true, or they are all false.
</p>
<bluebox>
<p>Be careful when reading the statement of the above <xref ref="matrixeq-thm-full-span"/>. The first two conditions look very much like this <xref ref="matrixeq-spans-consistency"/>, but they are logically quite different because of the quantifier <q><em>for all</em> <m>b</m></q>.
</p>
</bluebox>
<example hide-type="true">
<title>Interactive: The criteria of the theorem are satisfied</title>
<figure>
<caption>An example where the criteria of the above <xref ref="matrixeq-thm-full-span"/> are satisfied. The violet region is the span of the columns <m>v_1,v_2,v_3</m> of <m>A</m>, which is the same as the set of all <m>b</m> such that <m>Ax=b</m> has a solution. If you drag <m>b</m>, the demo will solve <m>Ax=b</m> for you and move <m>x</m>.</caption>
<mathbox source="demos/Axequalsb.html?mat=2,1,-1:1,0,2&range2=5&show=false&closed=true" height="600px"/>
</figure>
</example>
<example hide-type="true">
<title>Interactive: The critera of the theorem are not satisfied</title>
<figure>
<caption>An example where the criteria of the above <xref ref="matrixeq-thm-full-span"/> are <em>not</em> satisfied. The violet line is the span of the columns <m>v_1,v_2,v_3</m> of <m>A</m>, which is the same as the set of all <m>b</m> such that <m>Ax=b</m> has a solution. Try dragging <m>b</m> in and out of the column span.</caption>
<mathbox source="demos/Axequalsb.html?show=false&closed=true" height="600px"/>
</figure>
</example>
<remark>
<p>
We will see in this <xref ref="dimension-basis-colspace-dim"/> that the dimension of the span of the columns is equal to the number of pivots of <m>A</m>. That is, the columns of <m>A</m> span a line if <m>A</m> has one pivot, they span a plane if <m>A</m> has two pivots, etc. The whole space <m>\R^m</m> has dimension <m>m</m>, so this generalizes the fact that the columns of <m>A</m> span <m>\R^m</m> when <m>A</m> has <m>m</m> pivots.
</p>
</remark>
</paragraphs>
</subsection>
</section>