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
/
dimension.xml
504 lines (446 loc) · 24.5 KB
/
dimension.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
<?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="dimension">
<title>Basis and Dimension</title>
<objectives>
<ol>
<li>Understand the definition of a basis of a subspace.</li>
<li>Understand the basis theorem.</li>
<li><em>Recipes:</em> basis for a column space, basis for a null space, basis of a span.</li>
<li><em>Picture:</em> basis of a subspace of <m>\R^2</m> or <m>\R^3</m>.</li>
<li><em>Theorem:</em> basis theorem.</li>
<li><em>Essential vocabulary words:</em> <term>basis</term>, <term>dimension</term>.</li>
</ol>
</objectives>
<subsection>
<title>Basis of a Subspace</title>
<p>
As we discussed in <xref ref="subspaces"/>, a subspace is the same as a span, except we do not have a set of spanning vectors in mind. There are infinitely many choices of spanning sets for a nonzero subspace; to avoid reduncancy, usually it is most convenient to choose a spanning set with the <em>minimal</em> number of vectors in it. This is the idea behind the notion of a basis.
</p>
<essential xml:id="dimension-defn-basis">
<idx><h>Basis</h><h>definition of</h></idx>
<statement>
<p>Let <m>V</m> be a subspace of <m>\R^n</m>. A <term>basis</term> of <m>V</m> is a set of vectors <m>\{v_1,v_2,\ldots,v_m\}</m> in <m>V</m> such that:
<ol>
<li><m>V = \Span\{v_1,v_2,\ldots,v_m\}</m>, and</li>
<li>the set <m>\{v_1,v_2,\ldots,v_m\}</m> is linearly independent.</li>
</ol>
</p>
</statement>
</essential>
<p>
Recall that a set of vectors is <em>linearly independent</em> if and only if, when you remove any vector from the set, the span shrinks (<xref ref="linindep-criterion-inspan" text="type-global"/>). In other words, if <m>\{v_1,v_2,\ldots,v_m\}</m> is a basis of a subspace <m>V</m>, then no proper subset of <m>\{v_1,v_2,\ldots,v_m\}</m> will span <m>V</m>: it is a <em>minimal</em> spanning set. Any subspace admits a basis by this <xref ref="subspaces-spans-are-subspaces"/>.
</p>
<bluebox>
<idx><h>Basis</h><h>infinitely many</h></idx>
<p>A nonzero subspace has <em>infinitely many</em> different bases, but they all contain the same number of vectors.</p>
</bluebox>
<p>We leave it as an exercise to prove that any two bases have the same number of vectors; one might want to wait until after learning the invertible matrix theorem in <xref ref="matrix-inverses"/>.</p>
<essential xml:id="dimension-defn-dimension">
<idx><h>Dimension</h><h>definition of</h></idx>
<notation><usage>\dim V</usage><description>Dimension of a subspace</description></notation>
<statement>
<p>
Let <m>V</m> be a subspace of <m>\R^n</m>. The number of vectors in any basis of <m>V</m> is called the <term>dimension</term> of <m>V</m>, and is written <m>\dim V</m>.
</p>
</statement>
</essential>
<example xml:id="dimension-eg-R2">
<title>A basis of <m>\R^2</m></title>
<statement>
<p>Find a basis of <m>\R^2</m>.</p>
</statement>
<solution>
<p>
We need to find two vectors in <m>\R^2</m> that span <m>\R^2</m> and are linearly independent. One such basis is <m>\bigl\{{1\choose 0},{0\choose 1}\bigr\}</m>:
<ol>
<li>They span because any vector <m>a\choose b</m> can be written as a linear combination of <m>{1\choose 0},{0\choose 1}</m>:
<me>\vec{a b} = a\vec{1 0} + b\vec{0 1}.</me>
</li>
<li>They are linearly independent: if
<me>x\vec{1 0} + y\vec{0 1} = \vec{x y} = \vec{0 0}</me>
then <m>x=y=0</m>.
</li>
</ol>
This shows that the plane <m>\R^2</m> has dimension 2.
<latex-code>
\begin{tikzpicture}
\draw[grid lines] (-2,-2) grid (2,2);
\draw[thick vector] (0,0) -- (1,0) node[right,whitebg] {$1\choose 0$};
\draw[thick vector] (0,0) -- (0,1) node[above,whitebg] {$0\choose 1$};
\point at (0,0);
\end{tikzpicture}
</latex-code>
</p>
</solution>
</example>
<example>
<title>All bases of <m>\R^2</m></title>
<statement>
<p>Find all bases of <m>\R^2</m>.</p>
</statement>
<solution>
<p>
We know from the previous <xref ref="dimension-eg-R2"/> that <m>\R^2</m> has dimension 2, so any basis of <m>\R^2</m> has two vectors in it. Let <m>v_1,v_2</m> be vectors in <m>\R^2</m>, and let <m>A</m> be the matrix with columns <m>v_1,v_2</m>.
<ol>
<li>To say that <m>\{v_1,v_2\}</m> spans <m>\R^2</m> means that <m>A</m> has a pivot in every <em>row</em>: see this <xref ref="matrixeq-thm-full-span"/>.</li>
<li>To say that <m>\{v_1,v_2\}</m> is linearly independent means that <m>A</m> has a pivot in every <em>column</em>: see this <xref ref="linindep-matrix-cols"/>.
</li>
</ol>
Since <m>A</m> is a <m>2\times 2</m> matrix, it has a pivot in every row exactly when it has a pivot in every column. Hence any two noncollinear vectors form a basis of <m>\R^2</m>. For example,
<me>\left\{\vec{1 0},\;\vec{1 1}\right\}</me>
is a basis.
<latex-code>
\begin{tikzpicture}
\draw[grid lines] (-2,-2) grid (2,2);
\draw[thick vector] (0,0) -- (1,0) node[anchor=west,whitebg] {$1\choose 0$};
\draw[thick vector] (0,0) -- (1,1) node[anchor=south,whitebg] {$1\choose 1$};
\point at (0,0);
\end{tikzpicture}
</latex-code>
</p>
</solution>
</example>
<example xml:id="dimension-eg-Rn">
<title>The standard basis of <m>\R^n</m></title>
<idx><h>Basis</h><h>of <m>\R^n</m></h></idx>
<p>
One shows exactly as in the above <xref ref="dimension-eg-R2"/> that the standard coordinate vectors
<me>e_1=\vec{1 0 \vdots, 0 0},\quad e_2=\vec{0 1 \vdots, 0 0}, \quad\ldots,\quad
e_{n-1}=\vec{0 0 \vdots, 1 0},\quad e_n=\vec{0 0 \vdots, 0 1}
</me>
form a basis for <m>\R^n</m>. This is sometimes known as the <term>standard basis</term>.
</p>
<p>In particular, <m>\R^n</m> has dimension <m>n</m>.</p>
</example>
<specialcase xml:id="dimension-eg-Rn-any">
<idx><h>Basis</h><h>of <m>\R^n</m></h></idx>
<p>
The previous <xref ref="dimension-eg-Rn"/> implies that any basis for <m>\R^n</m> has <m>n</m> vectors in it. Let <m>v_1,v_2,\ldots,v_n</m> be vectors in <m>\R^n</m>, and let <m>A</m> be the <m>n\times n</m> matrix with columns <m>v_1,v_2,\ldots,v_n</m>.
<ol>
<li>To say that <m>\{v_1,v_2,\ldots,v_n\}</m> spans <m>\R^n</m> means that <m>A</m> has a <xref ref="defn-pivot-pos" text="title">pivot position</xref> in every <em>row</em>: see this <xref ref="matrixeq-thm-full-span"/>.</li>
<li>To say that <m>\{v_1,v_2,\ldots,v_n\}</m> is linearly independent means that <m>A</m> has a pivot position in every <em>column</em>: see this <xref ref="linindep-matrix-cols"/>.
</li>
</ol>
Since <m>A</m> is a square matrix, it has a pivot in every row if and only if it has a pivot in every column.
We will see in <xref ref="matrix-inverses"/> that the above two conditions are equivalent to the <em>invertibility</em> of the matrix <m>A</m>.
</p>
</specialcase>
<example>
<statement>
<p>Let
<me>V = \left\{ \vec{x y z} \text{ in } \R^3\bigm| x + 3y + z = 0 \right\} \qquad
\cB = \left\{ \vec{-3 1 0},\;\vec{0 1 -3} \right\}.</me>
Verify that <m>V</m> is a subspace, and show directly that <m>\cB</m> is a basis for <m>V</m>.
</p>
</statement>
<solution>
<p>
First we observe that <m>V</m> is the solution set of the homogeneous equation <m>x + 3y + z = 0</m>, so it is a subspace: see this <xref ref="subspace-is-col-or-nul"/>. To show that <m>\cB</m> is a basis, we really need to verify three things:
<ol start="0">
<li>Both vectors are in <m>V</m> because
<me>\spalignsysdelims..
\syseq{
(-3) + 3(1) + (0) = 0;
(0) + 3(1) + (-3) = 0\rlap.}
</me>
</li>
<li>
<em>Span:</em> suppose that <m>\vec{x y z}</m> is in <m>V</m>. Since <m>x + 3y + z = 0</m> we have <m>y = -\frac 13(x+z)</m>, so
<me>
\vec{x y z} = \vec{x -\frac 13(x+z) z}
= -\frac x3\vec{-3 1 0} - \frac z3\vec{0 1 -3}.
</me>
Hence <m>\cB</m> spans <m>V</m>.
</li>
<li>
<em>Linearly independent:</em>
<me>c_1\vec{-3 1 0} + c_2\vec{0 1 -3} = 0
\implies \vec{-3c_1 c_1+c_2 -3c_2} = \vec{0 0 0}
\implies c_1 = c_2 = 0.</me>
Alternatively, one can observe that the two vectors are not collinear.
</li>
</ol>
Since <m>V</m> has a basis with two vectors, it has dimension two: it is a <em>plane</em>.
</p>
<figure xml:id="dimension-figure-basis">
<caption>A picture of the plane <m>V</m> and its basis <m>\cB = \{v_1,v_2\}</m>. Note that <m>\cB</m> spans <m>V</m> and is linearly independent.</caption>
<mathbox source="demos/spans.html?v1=-3,1,0&v2=0,1,-3&range=5&captions=indep" height="500px"/>
</figure>
<p>
This example is somewhat contrived, in that we will learn systematic methods for verifying that a subset is a basis. The intention is to illustrate the defining properties of a basis.
</p>
</solution>
</example>
</subsection>
<subsection>
<title>Computing a Basis for a Subspace</title>
<p>
Now we show how to find bases for the column space of a matrix and the null space of a matrix. In order to find a basis for a given subspace, it is usually best to rewrite the subspace as a column space or a null space first: see this <xref ref="subspace-is-col-or-nul"/>.
</p>
<paragraphs>
<title>A basis for the column space</title>
<p>First we show how to compute a basis for the column space of a matrix.</p>
<theorem xml:id="dimension-basis-colspace">
<idx><h>Basis</h><h>of a column space</h></idx>
<idx><h>Column space</h><h>basis of</h><see>Basis</see></idx>
<statement>
<p>The pivot columns of a matrix <m>A</m> form a basis for <m>\Col(A)</m>.</p>
</statement>
<proof>
<p>This is a restatement of a <xref ref="linindep-pivot-cols"/>.</p>
</proof>
</theorem>
<bluebox>
<p>
The above theorem is referring to the pivot columns in the <em>original</em> matrix, not its reduced row echelon form. Indeed, a matrix and its reduced row echelon form generally have different column spaces. For example, in the matrix <m>A</m> below:
<latex-code>
<![CDATA[
\begin{tikzpicture}
\tikzset{
my matrix/.style={
matrix, math matrix,
column sep={2.2em,between origins},
every node/.append style={anchor=base east}},
}
\node (symb) {$A=\;\;\null$};
\path (symb.east) node[my matrix, right] (A) {
1 \& 2 \& 0 \& -1 \\
-2 \& -3 \& 4 \& 5 \\
2 \& 4 \& 0 \& -2 \\
} (A.east) ++(2cm,0) node {$\xrightarrow{\text{RREF}}$}
++(2cm, 0) node[my matrix, right] (B) {
1 \& 0 \& -8 \& -7 \\
0 \& 1 \& 4 \& 3 \\
0 \& 0 \& 0 \& 0 \\
};
\node[fit=(A-1-1) (A-3-1), draw=orange, rounded corners] (box1) {};
\node[fit=(A-1-2) (A-3-2), draw=orange, rounded corners] (box2) {};
\path ($(box1.south)!.5!(box2.south)$) ++(0,-1cm)
node[blue!50, font=\small,anchor=base] (orig) {pivot columns $=$ basis};
\draw[->,blue!50, shorten >=1pt] (orig.north) to[out=90,in=-90] (box1.south);
\draw[->,blue!50, shorten >=1pt] (orig.north) to[out=90,in=-90] (box2.south);
\path let \p1=($(B-3-1.south)!.5!(B-3-2.south)$) in (\p1 |- orig.base)
node[blue!50, font=\small,anchor=base] (rref) {pivot columns in RREF};
\draw[->,blue!50, shorten >=1pt] (rref.north) to[out=90,in=-90] (B-3-1.south);
\draw[->,blue!50, shorten >=1pt] (rref.north) to[out=90,in=-90] (B-3-2.south);
\ifpdfvers
\draw[->] (rref.west) -- (orig.east);
\else
\draw[->,
decoration={snake, amplitude=.4mm, segment length=1mm, post length=.5mm},
decorate] (rref.west) -- (orig.east);
\fi
\end{tikzpicture}
]]>
</latex-code>
the pivot columns are the first two columns, so a basis for <m>\Col(A)</m> is
<me>\left\{\vec{1 -2 2},\;\vec{2 -3 4}\right\}.</me>
The first two columns of the reduced row echelon form certainly span a different subspace, as
<me>\Span\left\{\vec{1 0 0},\;\vec{0 1 0}\right\}
= \left\{\vec{a b 0}\Bigm|a, b \text{ in } \R\right\}
= \text{($xy$-plane)},
</me>
but <m>\Col(A)</m> contains vectors whose last coordinate is nonzero.
</p>
</bluebox>
<corollary xml:id="dimension-basis-colspace-dim">
<statement>
<p>The dimension of <m>\Col(A)</m> is the number of pivots of <m>A</m>.</p>
</statement>
</corollary>
</paragraphs>
<paragraphs>
<title>A basis of a span</title>
<p>
<idx><h>Basis</h><h>of a span</h></idx>
<idx><h>Span</h><h>basis of</h><see>Basis</see></idx>
Computing a basis for a span is the same as computing a basis for a column space. Indeed, the span of finitely many vectors <m>v_1,v_2,\ldots,v_m</m> <em>is</em> the column space of a matrix, namely, the matrix <m>A</m> whose columns are <m>v_1,v_2,\ldots,v_m</m>:
<me>A = \mat{| | ,, |; v_1 v_2 \cdots, v_m; | | ,, |}.</me>
</p>
<example xml:id="dimension-eg-basis-span">
<title>A basis of a span</title>
<statement>
<p>
Find a basis of the subspace
<me>V = \Span\left\{\vec{1 -2 2},\;\vec{2 -3 4},\;\vec{0 4 0},\;\vec{-1 5 -2}\right\}.</me>
</p>
</statement>
<solution>
<p>
The subspace <m>V</m> is the column space of the matrix
<me>A = \mat[r]{1 2 0 -1; -2 -3 4 5; 2 4 0 -2}.</me>
The reduced row echelon form of this matrix is
<me>\mat[r]{1 0 -8 -7; 0 1 4 3; 0 0 0 0}.</me>
The first two columns are pivot columns, so a basis for <m>V</m> is
<me>\left\{\vec{1 -2 2},\;\vec{2 -3 4}\right\}.</me>
</p>
<figure xml:id="dimension-figure-basis-2">
<caption>A picture of the plane <m>V</m> and its basis <m>\cB = \{v_1,v_2\}</m>.</caption>
<mathbox source="demos/spans.html?v1=1,-2,2&v2=2,-3,4&range=6&captions=indep" height="500px"/>
</figure>
</solution>
</example>
<example xml:id="dimension-eg-basis-span2">
<title>Another basis of the same span</title>
<statement>
<p>
Find a basis of the subspace
<me>V = \Span\left\{\vec{1 -2 2},\;\vec{2 -3 4},\;\vec{0 4 0},\;\vec{-1 5 -2}\right\}</me>
which does not consist of the first two vectors, as in the previous <xref ref="dimension-eg-basis-span"/>.
</p>
</statement>
<solution>
<p>
The point of this example is that the above <xref ref="dimension-basis-colspace"/> gives <em>one</em> basis for <m>V</m>; as always, there are infinitely more.
</p>
<p>
Reordering the vectors, we can express <m>V</m> as the column space of
<me>A' = \mat[r]{0 -1 1 2; 4 5 -2 -3; 0 -2 2 4}.</me>
The reduced row echelon form of this matrix is
<me>\mat{1 0 3/4 7/4; 0 1 -1 -2; 0 0 0 0}.</me>
The first two columns are pivot columns, so a basis for <m>V</m> is
<me>\left\{\vec{0 4 0},\;\vec{-1 5 -2}\right\}.</me>
These are the <em>last</em> two vectors in the given spanning set.
</p>
<figure xml:id="dimension-figure-basis-3">
<caption>A picture of the plane <m>V</m> and its basis <m>\cB = \{v_1,v_2\}</m>.</caption>
<mathbox source="demos/spans.html?v1=0,4,0&v2=-1,5,-2&range=6&captions=indep" height="500px"/>
</figure>
</solution>
</example>
</paragraphs>
<paragraphs>
<title>A basis for the null space </title>
<p>In order to compute a basis for the null space of a matrix, one has to find the parametric vector form of the solutions of the homogeneous equation <m>Ax=0</m>.</p>
<theorem xml:id="dimension-basis-nulspace">
<idx><h>Basis</h><h>of a null space</h></idx>
<idx><h>Null space</h><h>basis of</h><see>Basis</see></idx>
<statement>
<p>The vectors attached to the free variables in the parametric vector form of the solution set of <m>Ax=0</m> form a basis of <m>\Nul(A)</m>.</p>
</statement>
</theorem>
<p>The proof of the theorem has two parts. The first part is that every solution lies in the span of the given vectors. This is automatic: the vectors are exactly chosen so that every solution is a linear combination of those vectors. The second part is that the vectors are linearly independent. This part was discussed in this <xref ref="param-vect-form-lin-ind"/>.</p>
</paragraphs>
<paragraphs>
<title>A basis for a general subspace</title>
<p>
As mentioned at the beginning of this subsection, when given a subspace written in a different form, in order to compute a basis it is usually best to rewrite it as a column space or null space of a matrix.
</p>
<example>
<title>A basis of a subspace</title>
<statement>
<p>
Let <m>V</m> be the subspace defined by
<me>
V = \left\{\vec{x y z}\bigm| x + 2y = z\right\}.
</me>
Find a basis for <m>V</m>. What is <m>\dim(V)</m>?
</p>
</statement>
<solution>
<p>
First we notice that <m>V</m> is exactly the solution set of the homogeneous linear equation <m>x + 2y - z = 0</m>. Hence <m>V = \Nul\mat{1 2 -1}.</m> This matrix is in reduced row echelon form; the parametric form of the general solution is <m>x = -2y + z</m>, so the parametric vector form is
<me>\vec{x y z} = y\vec{-2 1 0} + z\vec{1 0 1}.</me>
It follows that a basis is
<me>\left\{\vec{-2 1 0},\;\vec{1 0 1}\right\}.</me>
Since <m>V</m> has a basis with two vectors, its dimension is <m>2</m>: it is a plane.
</p>
</solution>
</example>
</paragraphs>
</subsection>
<subsection>
<title>The Basis Theorem</title>
<p>
Recall that <m>\{v_1,v_2,\ldots,v_n\}</m> forms a basis for <m>\R^n</m> if and only if the matrix <m>A</m> with columns <m>v_1,v_2,\ldots,v_n</m> has a pivot in every row and column (see this <xref ref="dimension-eg-Rn-any"/>). Since <m>A</m> is an <m>n\times n</m> matrix, these two conditions are equivalent: the vectors span if and only if they are linearly independent.
The basis theorem is an abstract version of the preceding statement, that applies to any subspace.
</p>
<theorem type-name="Basis Theorem" xml:id="basis-theorem">
<idx><h>Basis</h><h>basis theorem</h></idx>
<statement>
<p>
Let <m>V</m> be a subspace of dimension <m>m</m>. Then:
<ul>
<li>Any <m>m</m> linearly independent vectors in <m>V</m> form a basis for <m>V</m>.</li>
<li>Any <m>m</m> vectors that span <m>V</m> form a basis for <m>V</m>.</li>
</ul>
</p>
</statement>
<proof>
<p>
Suppose that <m>\cB = \{v_1,v_2,\ldots,v_m\}</m> is a set of linearly independent vectors in <m>V</m>. In order to show that <m>\cB</m> is a basis for <m>V</m>, we must prove that <m>V = \Span\{v_1,v_2,\ldots,v_m\}.</m> If not, then there exists some vector <m>v_{m+1}</m> in <m>V</m> that is not contained in <m>\Span\{v_1,v_2,\ldots,v_m\}.</m> By the <xref ref="linindep-increasing-span">increasing span criterion</xref>, the set <m>\{v_1,v_2,\ldots,v_m,v_{m+1}\}</m> is also linearly independent. Continuing in this way, we keep choosing vectors until we eventually do have a linearly independent spanning set: say <m>V = \Span\{v_1,v_2,\ldots,v_m,\ldots,v_{m+k}\}</m>. Then <m>\{v_1,v_2,\ldots,v_{m+k}\}</m> is a basis for <m>V</m>, which implies that <m>\dim(V) = m+k > m</m>. But we were assuming that <m>V</m> has dimension <m>m</m>, so <m>\cB</m> must have already been a basis.
</p>
<p>
Now suppose that <m>\cB = \{v_1,v_2,\ldots,v_m\}</m> spans <m>V</m>. If <m>\cB</m> is not linearly independent, then by this <xref ref="linindep-criterion-inspan"/>, we can remove some number of vectors from <m>\cB</m> without shrinking its span. After reordering, we can assume that we removed the last <m>k</m> vectors without shrinking the span, and that we cannot remove any more. Now <m>V = \Span\{v_1,v_2,\ldots,v_{m-k}\}</m>, and <m>\{v_1,v_2,\ldots,v_{m-k}\}</m> is a basis for <m>V</m> because it is linearly independent. This implies that <m>\dim V=m-k < m</m>. But we were assuming that <m>\dim V = m</m>, so <m>\cB</m> must have already been a basis.
</p>
</proof>
</theorem>
<p>
In other words, if you <em>already</em> know that <m>\dim V = m</m>, and if you have a set of <m>m</m> vectors <m>\cB = \{v_1,v_2,\ldots,v_m\}</m> in <m>V</m>, then you only have to check <em>one</em> of:
<ol>
<li><m>\cB</m> is linearly independent, <em>or</em></li>
<li><m>\cB</m> spans <m>V</m>,</li>
</ol>
in order for <m>\cB</m> to be a basis of <m>V</m>. If you did not already know that <m>\dim V = m</m>, then you would have to check <em>both</em> properties.
</p>
<p>
To put it yet another way, suppose we have a set of vectors <m>\cB = \{v_1,v_2,\ldots,v_m\}</m> in a subspace <m>V</m>. Then if any two of the following statements is true, the third must also be true:
<ol>
<li><m>\cB</m> is linearly independent,</li>
<li><m>\cB</m> spans <m>V</m>, and</li>
<li><m>\dim V = m.</m></li>
</ol>
</p>
<p>For example, if <m>V</m> is a plane, then any two noncollinear vectors in <m>V</m> form a basis.</p>
<example>
<title>Two noncollinear vectors form a basis of a plane</title>
<statement>
<p>
Find a basis of the subspace
<me>V = \Span\left\{\vec{1 -2 2},\;\vec{2 -3 4},\;\vec{0 4 0},\;\vec{-1 5 -2}\right\}</me>
which is different from the bases in this <xref ref="dimension-eg-basis-span"/> and this <xref ref="dimension-eg-basis-span2"/>.
</p>
</statement>
<solution>
<p>
We know from the previous examples that <m>\dim V = 2</m>. By the <xref ref="basis-theorem"/>, it suffices to find any two noncollinear vectors in <m>V</m>. We write two linear combinations of the four given spanning vectors, chosen at random:
<me>
w_1 = \vec{1 -2 2} + \vec{2 -3 4} = \vec{3 -5 6} \qquad
w_2 = -\vec{2 -3 4} + \frac 12\vec{0 4 0} = \vec{-2 5 -4}.
</me>
Since <m>w_1,w_2</m> are not collinear, <m>\cB = \{w_1,w_2\}</m> is a basis for <m>V</m>.
</p>
<figure xml:id="dimension-figure-basis-4">
<caption>A picture of the plane <m>V</m> and its basis <m>\cB = \{w_1,w_2\}</m>.</caption>
<mathbox source="demos/spans.html?v1=3,-5,6&v2=-2,5,-4&range=6&captions=indep&labels=w1,w2" height="500px"/>
</figure>
</solution>
</example>
<example>
<title>Finding a basis by inspection</title>
<statement>
<p>
Find a basis for the plane
<me>V = \left\{\vec{x_1 x_2 x_3}\bigm| x_1 + x_2 = x_3\right\}</me>
by inspection. (This plane is expressed in <xref ref="set-builder-notation" text="title">set builder notation</xref>.)
</p>
</statement>
<solution>
<p>
First note that <m>V</m> is the null space of the matrix <m>\mat{1 1 -1}</m>; this matrix is in reduced row echelon form and has two free variables, so <m>V</m> is indeed a plane. We write down two vectors satisfying <m>x_1 + x_2 = x_3</m>:
<me>
v_1 = \vec{1 0 1} \qquad v_2 = \vec{0 1 1}.
</me>
Since <m>v_1</m> and <m>v_2</m> are not collinear, they are linearly independent; since <m>\dim(V) = 2</m>, the basis theorem implies that <m>\{v_1,v_2\}</m> is a basis for <m>V</m>.
</p>
</solution>
</example>
</subsection>
</section>