Linear AlgebraVector Spaces and Subspaces5 of 9
Vector Spaces and Subspaces · 5

Basis and Dimension

We want a minimal toolkit of vectors that can build an entire space without any redundancy, and a way to measure how many independent directions that space actually has.

1

What a basis is

A basis is a set of building-block vectors that lets us reach every point in a space by scaling and adding them together, while giving each point a single, unique address.

What a basis is
00
(3,2)\htmlClass{lc-blue}{(3, 2)}
e1=[10]\htmlClass{lc-green}{e_1} = \htmlClass{lc-green}{\begin{bmatrix} 1 \\ 0 \end{bmatrix}}
e2=[01]\htmlClass{lc-pink}{e_2} = \htmlClass{lc-pink}{\begin{bmatrix} 0 \\ 1 \end{bmatrix}}

In the 2D plane, we usually reach the point (3,2)\target{(3, 2)} using the standard steps e1=[10]\first{e_1} = \first{\begin{bmatrix} 1 \\ 0 \end{bmatrix}} and e2=[01]\second{e_2} = \second{\begin{bmatrix} 0 \\ 1 \end{bmatrix}}:

3[10]+2[01]=[32]\displaystyle \first{3}\first{\begin{bmatrix} 1 \\ 0 \end{bmatrix}} + \second{2}\second{\begin{bmatrix} 0 \\ 1 \end{bmatrix}} = \target{\begin{bmatrix} 3 \\ 2 \end{bmatrix}}

Any other set of vectors works as a basis for a space as long as it avoids the two ways building blocks can fail: having too few directions to cover the whole space, or having a redundant vector like v3=2v1+1v2\third{v_3} = \first{2v_1} + \second{1v_2} that creates multiple addresses for the same spot.

Basis\displaystyle \text{Basis} =spans the space⏟reaches every point+linearly independent⏟no redundant vectors (unique address)\displaystyle = \underbrace{\text{spans the space}}_{\text{reaches every point}} + \underbrace{\text{linearly independent}}_{\text{no redundant vectors (unique address)}}

As long as v2\second{v_2} points off the line of v1\first{v_1}, the two vectors span the entire 2D plane and give each point a unique address, whereas lining v2\second{v_2} up with v1\first{v_1} collapses their span to a single line and leaves points off that line unreachable.

Pointing the second vector anywhere off the first vector's line spans the whole plane and gives the dot a single address, while lining the two up collapses the span to one line.
2

What dimension means

The dimension of a space is the number of vectors in its basis: how many genuinely independent directions you can move inside that space.

What dimension means
x\htmlClass{lc-mute}{x}
y\htmlClass{lc-mute}{y}
z\htmlClass{lc-mute}{z}
v1\htmlClass{lc-green}{v_1}
v2\htmlClass{lc-pink}{v_2}
v1=[100]\htmlClass{lc-green}{v_1} = \htmlClass{lc-green}{\begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix}}
v2=[010]\htmlClass{lc-pink}{v_2} = \htmlClass{lc-pink}{\begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix}}
dimension=  ?\text{dimension} = \;?

Every basis for a given space has the exact same number of vectors, so counting the vectors in a basis measures the space itself rather than how many numbers are in each vector:

Basis for the x-y plane in R3={[100],[010]}  ⟹  dimension=2\displaystyle \text{Basis for the } x\text{-}y \text{ plane in }\mathbb{R}^3 = \left\{ \first{\begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix}}, \second{\begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix}} \right\} \implies \text{dimension} = 2

Every point on this flat plane in R3\mathbb{R}^3 has three coordinates (x,y,z)\target{(x, y, z)}, yet moving anywhere on the plane only uses two independent basis directions, making the subspace 2-dimensional rather than 3-dimensional.

Every point on a tilted plane takes three coordinates in 3D space, but only two basis vectors on the plane itself.
3

Finding a basis for a span of vectors

When we are given a set of vectors that may contain redundant directions, we want to drop the redundant vectors to find a basis for the space they span and state its dimension:

v1=[121],v2=[242],v3=[012],v4=[133]\displaystyle \first{v_1} = \first{\begin{bmatrix} 1 \\ 2 \\ 1 \end{bmatrix}}, \quad \second{v_2} = \second{\begin{bmatrix} 2 \\ 4 \\ 2 \end{bmatrix}}, \quad \third{v_3} = \third{\begin{bmatrix} 0 \\ 1 \\ 2 \end{bmatrix}}, \quad v_4 = \begin{bmatrix} 1 \\ 3 \\ 3 \end{bmatrix}
Finding a basis for a span of vectors
v1=[121]\htmlClass{lc-green}{v_1} = \htmlClass{lc-green}{\begin{bmatrix} 1 \\ 2 \\ 1 \end{bmatrix}}
v2=[242]\htmlClass{lc-pink}{v_2} = \htmlClass{lc-pink}{\begin{bmatrix} 2 \\ 4 \\ 2 \end{bmatrix}}
v3=[012]\htmlClass{lc-violet}{v_3} = \htmlClass{lc-violet}{\begin{bmatrix} 0 \\ 1 \\ 2 \end{bmatrix}}
v4=[133]v_4 = \begin{bmatrix} 1 \\ 3 \\ 3 \end{bmatrix}
keep?\htmlClass{lc-mute}{\text{keep?}}
keep?\htmlClass{lc-mute}{\text{keep?}}
keep?\htmlClass{lc-mute}{\text{keep?}}
keep?\htmlClass{lc-mute}{\text{keep?}}
basis=  ?dimension=  ?\begin{aligned} \text{basis} &= \;\htmlClass{lc-mute}{?} \\ \text{dimension} &= \;\htmlClass{lc-mute}{?} \end{aligned}

Here v2=2v1\second{v_2} = \first{2v_1} and v4=v1+v3v_4 = \first{v_1} + \third{v_3} are simple enough to spot by eye, so you can drop them right away, though often combinations stay hidden until you row reduce.

Text solution
Put the vectors into columns and clear below the first pivot Writing the four vectors as the columns of a matrix and clearing the entries below the top-left 1\first{1} turns column 2 into [200]\second{\begin{bmatrix} 2 \\ 0 \\ 0 \end{bmatrix}} with no pivot of its own, showing that v2=2v1\second{v_2} = \first{2v_1}:
[120124131223]→R2←R2−2R1R3←R3−R1[120100110022]\displaystyle \begin{bmatrix} \first{1} & \second{2} & \third{0} & 1 \\ \first{2} & \second{4} & \third{1} & 3 \\ \first{1} & \second{2} & \third{2} & 3 \end{bmatrix} \xrightarrow{\substack{R_2 \leftarrow R_2 - 2R_1 \\ R_3 \leftarrow R_3 - R_1}} \begin{bmatrix} \first{\mathbf{1}} & \second{2} & \third{0} & 1 \\ \first{0} & \second{0} & \third{1} & 1 \\ \first{0} & \second{0} & \third{2} & 2 \end{bmatrix}
Clear below the second pivot to find all pivot columns Using the 1\third{1} in row 2, column 3 to clear the entry below it leaves pivots in columns 1 and 3, while column 4 loses its bottom entry because v4=1v1+1v3v_4 = \first{1v_1} + \third{1v_3}:
[120100110022]→R3←R3−2R2[120100110000]\displaystyle \begin{bmatrix} \first{\mathbf{1}} & \second{2} & \third{0} & 1 \\ \first{0} & \second{0} & \third{1} & 1 \\ \first{0} & \second{0} & \third{2} & 2 \end{bmatrix} \xrightarrow{R_3 \leftarrow R_3 - 2R_2} \begin{bmatrix} \first{\mathbf{1}} & \second{2} & \third{0} & 1 \\ \first{0} & \second{0} & \third{\mathbf{1}} & 1 \\ \first{0} & \second{0} & \third{0} & 0 \end{bmatrix}
Take the matching pivot columns from the original matrix Taking columns 1 and 3 from the original matrix gives the basis, and counting the 22 pivots (the rank) gives the dimension:
Basis={[121],[012]},dimension=2\displaystyle \text{Basis} = \left\{ \first{\begin{bmatrix} 1 \\ 2 \\ 1 \end{bmatrix}}, \third{\begin{bmatrix} 0 \\ 1 \\ 2 \end{bmatrix}} \right\}, \quad \text{dimension} = 2

Whenever v4v_4 points off the plane of v1\first{v_1} and v3\third{v_3}, it adds a third dimension and gets a pivot in the third row; when v4v_4 lies in the plane of v1\first{v_1} and v3\third{v_3}, it is built from them and the bottom row clears to zero without a pivot.

A third vector gets a pivot in the third row when it points off the plane of the first two, and its bottom row becomes all zeros when it lies in their plane.
4

Finding a basis from an equation

Instead of giving us a list of vectors to trim, we can also define a subspace by an equation its vectors must satisfy. We want to find a basis and the dimension for the subspace of all vectors [xyz]\target{\begin{bmatrix} x \\ y \\ z \end{bmatrix}} in R3\mathbb{R}^3 that satisfy

x+2y−3z\displaystyle x + \first{2y} - \second{3z} =0\displaystyle = 0

Just as when we found the null space, we solve for the pivot variable in terms of the free variables and split the general vector into one piece per free variable.

Finding a basis from an equation
x\htmlClass{lc-mute}{x}
y\htmlClass{lc-mute}{y}
z\htmlClass{lc-mute}{z}
(x,y,z)\htmlClass{lc-blue}{(x, y, z)}
x+2y−3z=0x + \htmlClass{lc-green}{2y} - \htmlClass{lc-pink}{3z} = 0
basis=  ?dimension=  ?\begin{aligned} \text{basis} &= \;? \\ \text{dimension} &= \;? \end{aligned}
Text solution
Solve the equation for the pivot variable Expressing the first variable xx in terms of the free variables y\first{y} and z\second{z} shows that once y\first{y} and z\second{z} are chosen freely, xx is fixed:
x\displaystyle x =−2y+3z\displaystyle = \first{-2y} + \second{3z}
Substitute for the pivot variable and split by the free variables Replacing xx inside [xyz]\target{\begin{bmatrix} x \\ y \\ z \end{bmatrix}} and separating the y\first{y} and z\second{z} pieces writes every solution vector as a combination of two fixed vectors:
[xyz]=[−2y+3zyz]=y[−210]+z[301]\displaystyle \begin{aligned} \target{\begin{bmatrix} x \\ y \\ z \end{bmatrix}} &= \begin{bmatrix} \first{-2y} + \second{3z} \\ \first{y} \\ \second{z} \end{bmatrix} \\ &= \first{y}\first{\begin{bmatrix} -2 \\ 1 \\ 0 \end{bmatrix}} + \second{z}\second{\begin{bmatrix} 3 \\ 0 \\ 1 \end{bmatrix}} \end{aligned}
Read off the basis vectors and count the free variables for the dimension Because their y\first{y} and z\second{z} entries are [10]\first{\begin{bmatrix} 1 \\ 0 \end{bmatrix}} and [01]\second{\begin{bmatrix} 0 \\ 1 \end{bmatrix}}, neither vector can build the other, so the two vectors form a basis and the 22 free variables give dimension 22:
Basis={[−210],[301]},dimension=2\displaystyle \text{Basis} = \left\{ \first{\begin{bmatrix} -2 \\ 1 \\ 0 \end{bmatrix}}, \second{\begin{bmatrix} 3 \\ 0 \\ 1 \end{bmatrix}} \right\}, \quad \text{dimension} = 2
5

Testing if a set is a basis using dimension

Now we flip the question around: instead of trimming a set down to build a basis, we are given a fixed set and asked whether that entire set is a basis for R3\mathbb{R}^3:

Set A={[123],[01−1]},Set B={[101],[012],[114]}\displaystyle \begin{aligned} \text{Set A} &= \left\{ \first{\begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix}}, \second{\begin{bmatrix} 0 \\ 1 \\ -1 \end{bmatrix}} \right\}, \\ \text{Set B} &= \left\{ \first{\begin{bmatrix} 1 \\ 0 \\ 1 \end{bmatrix}}, \second{\begin{bmatrix} 0 \\ 1 \\ 2 \end{bmatrix}}, \third{\begin{bmatrix} 1 \\ 1 \\ 4 \end{bmatrix}} \right\} \end{aligned}
Testing if a set is a basis using dimension
in a space of dimension n\displaystyle \text{in a space of dimension } n
vectorsbasis?fewer than n?more than n?exactly n?\displaystyle \begin{array}{l|c} \text{vectors} & \text{basis?} \\ \hline \text{fewer than } n & ? \\ \text{more than } n & ? \\ \text{exactly } n & ? \end{array}

When we know the target space has dimension nn, counting the vectors in the set tells us right away whether the set fails or only needs a single check:

In an n-dimensional space:{fewer than n vectorscannot span   ⟹  not a basismore than n vectorscannot be independent   ⟹  not a basisexactly n vectorscheck independence or span(one gives the other)\displaystyle \begin{aligned} &\text{In an } n\text{-dimensional space:} \\ &\begin{cases} \text{fewer than } n \text{ vectors} \\ \quad \fails{\text{cannot span }} \implies \text{not a basis} \\[6pt] \text{more than } n \text{ vectors} \\ \quad \fails{\text{cannot be independent }} \\ \qquad \implies \text{not a basis} \\[6pt] \text{exactly } n \text{ vectors} \\ \quad \text{check independence or span} \\ \quad \text{(one gives the other)} \end{cases} \end{aligned}
Text solution
Compare the number of vectors in Set A to dim(R3)=3\text{dim}(\mathbb{R}^3) = 3 Set A has only 22 vectors, which can at most span a flat 2D plane and cannot span 3-dimensional space:
2 vectors<dimension 3  ⟹  Set A is not a basis for R3\displaystyle \text{2 vectors} < \text{dimension } 3 \implies \text{Set A is not a basis for }\mathbb{R}^3
Count the vectors in Set B and put them into columns Set B has 33 vectors in a 3-dimensional space, so we only need to check linear independence by putting them into a matrix and clearing below the first pivot:
[101011124]→R3←R3−R1[101011023]\displaystyle \begin{bmatrix} \first{1} & \second{0} & \third{1} \\ \first{0} & \second{1} & \third{1} \\ \first{1} & \second{2} & \third{4} \end{bmatrix} \xrightarrow{R_3 \leftarrow R_3 - R_1} \begin{bmatrix} \first{1} & \second{0} & \third{1} \\ \first{0} & \second{1} & \third{1} \\ \first{0} & \second{2} & \third{3} \end{bmatrix}
Clear below the second pivot and count the pivots Clearing the 2\second{2} in row 3 leaves a pivot in all 33 columns, so the vectors are linearly independent and automatically span R3\mathbb{R}^3:
[101011023]→R3←R3−2R2[101011001]  ⟹  Set B is a basis for R3\displaystyle \begin{aligned} &\begin{bmatrix} \first{1} & \second{0} & \third{1} \\ \first{0} & \second{1} & \third{1} \\ \first{0} & \second{2} & \third{3} \end{bmatrix} \\ &\xrightarrow{R_3 \leftarrow R_3 - 2R_2} \begin{bmatrix} \first{\mathbf{1}} & \second{0} & \third{1} \\ \first{0} & \second{\mathbf{1}} & \third{1} \\ \first{0} & \second{0} & \third{\mathbf{1}} \end{bmatrix} \\ &\implies \text{Set B is a basis for }\mathbb{R}^3 \end{aligned}
6

Testing if a set is a basis for a subspace

What if the target space is not all of R3\mathbb{R}^3, but a plane sitting inside it? We want to test whether the set

S={[111],[−420]}\displaystyle S = \left\{ \first{\begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix}}, \second{\begin{bmatrix} -4 \\ 2 \\ 0 \end{bmatrix}} \right\}

is a basis for the subspace W\subsp{W} defined by x+2y−3z=0x + 2y - 3z = 0.

seen edge-on
Testing if a set is a basis for a subspace
x\htmlClass{lc-mute}{x}
y\htmlClass{lc-mute}{y}
z\htmlClass{lc-mute}{z}
W\htmlClass{lc-blue}{W}
S={[111],[−420]}S = \left\{ \htmlClass{lc-green}{\begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix}}, \htmlClass{lc-pink}{\begin{bmatrix} -4 \\ 2 \\ 0 \end{bmatrix}} \right\}
basis for W ?\text{basis for } \htmlClass{lc-blue}{W}\,?
Text solution
Plug each vector into the equation of W\subsp{W} to check that it lies in W\subsp{W} Substituting both vectors into x+2y−3z=0x + 2y - 3z = 0 gives 00, confirming that both vectors actually lie in the plane W\subsp{W}:
1+2(1)−3(1)=0−4+2(2)−3(0)=0\displaystyle \begin{aligned} \first{1} + 2(\first{1}) - 3(\first{1}) &= 0 \\ \second{-4} + 2(\second{2}) - 3(\second{0}) &= 0 \end{aligned}
Compare the number of vectors in SS with the dimension of W\subsp{W} The single equation x+2y−3z=0x + 2y - 3z = 0 in 33 variables leaves 22 free variables, so dim(W)=2\text{dim}(\subsp{W}) = 2, which matches the 22 vectors in SS:
2 vectors in S\displaystyle \text{2 vectors in } S =dim(W)\displaystyle = \text{dim}(\subsp{W}) =2\displaystyle = 2
Check that one vector is not a scalar multiple of the other No number multiplies [111]\first{\begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix}} to give [−420]\second{\begin{bmatrix} -4 \\ 2 \\ 0 \end{bmatrix}}, so the 22 vectors are linearly independent inside the 2D subspace W\subsp{W} and automatically span it:
c[111]≠[−420]  ⟹  S is a basis for W\displaystyle \first{c}\first{\begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix}} \neq \second{\begin{bmatrix} -4 \\ 2 \\ 0 \end{bmatrix}} \implies S \text{ is a basis for } \subsp{W}

Key concepts

A basis is a set of vectors that both spans the space and is linearly independent, and the dimension of the space is the number of vectors in a basis, never the number of entries inside each vector (so {[100],[010]}\left\{\first{\begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix}}, \second{\begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix}}\right\} spans a 22-dimensional plane inside R3\mathbb{R}^3).

How you work depends on whether you are building a basis or testing a candidate set:

Building a basis from a span of vectors

Drop redundant vectors and keep the independent directions. If a relationship is obvious by sight, like v2=2v1\second{v_2} = \first{2v_1} for v1=[121]\first{v_1} = \first{\begin{bmatrix} 1 \\ 2 \\ 1 \end{bmatrix}} and v2=[242]\second{v_2} = \second{\begin{bmatrix} 2 \\ 4 \\ 2 \end{bmatrix}}, you can drop the redundant vector right away without setting up a matrix. Otherwise, put the vectors into the columns of a matrix, row reduce to find the pivots, and take the matching pivot columns from the original matrix; the number of pivots (the rank) is the dimension.

Building a basis from an equation

Solve for the pivot variable and split the general vector by the free variables, such as writing x+2y−3z=0x + \first{2y} - \second{3z} = 0 as

[xyz]=y[−210]⏟basis vector+z[301]⏟basis vector\displaystyle \target{\begin{bmatrix} x \\ y \\ z \end{bmatrix}} = \first{y}\underbrace{\first{\begin{bmatrix} -2 \\ 1 \\ 0 \end{bmatrix}}}_{\first{\text{basis vector}}} + \second{z}\underbrace{\second{\begin{bmatrix} 3 \\ 0 \\ 1 \end{bmatrix}}}_{\second{\text{basis vector}}}
The vectors attached to the free variables form a basis, and the number of free variables (3−1=23 - 1 = 2) is the dimension.

Testing if a given set is a basis (Yes or No)

Do not trim the set. For a subspace W\subsp{W} like x+2y−3z=0x + 2y - 3z = 0, first plug each vector into the equation to make sure it lies in W\subsp{W}. Then count the vectors against the target dimension nn before doing any row reduction: fewer than nn vectors cannot span, and more than nn vectors cannot be independent. Only when you have exactly nn vectors in an nn-dimensional space do you check linear independence (all nn columns get a pivot, or for 22 vectors, neither is a scalar multiple of the other), which gives span automatically.

7

Practice

1

Consider the subspace V\subsp{V} of R4\mathbb{R}^4 spanned by v1=[1020]\first{v_1} = \first{\begin{bmatrix} 1 \\ 0 \\ 2 \\ 0 \end{bmatrix}}, v2=[0103]\second{v_2} = \second{\begin{bmatrix} 0 \\ 1 \\ 0 \\ 3 \end{bmatrix}}, and v3=[2040]\third{v_3} = \third{\begin{bmatrix} 2 \\ 0 \\ 4 \\ 0 \end{bmatrix}}. By inspection, find a basis for V\subsp{V} and state its dimension.

Compare the entries of v3\third{v_3} against v1\first{v_1} and v2\second{v_2}: is one vector a scalar multiple of another?

Looking at the entries, v3=2v1\third{v_3} = \first{2v_1}, so v3\third{v_3} points along the same line as v1\first{v_1} and is redundant, while v1\first{v_1} and v2\second{v_2} have zeros in alternating entries and point in independent directions. Dropping v3\third{v_3} leaves v1\first{v_1} and v2\second{v_2}. Be careful not to count the 4\fails{4} entries inside each vector and call the dimension 4\fails{4}, or keep all 33 vectors and call the dimension 3\fails{3}: the dimension is the number of vectors in the basis.
Basis={[1020],[0103]},dimension=2\displaystyle \text{Basis} = \left\{ \first{\begin{bmatrix} 1 \\ 0 \\ 2 \\ 0 \end{bmatrix}}, \second{\begin{bmatrix} 0 \\ 1 \\ 0 \\ 3 \end{bmatrix}} \right\}, \quad \text{dimension} = 2
2

Without doing any calculations, explain why neither Set A\text{Set A} ={[120],[01−1]}{}= \left\{ \first{\begin{bmatrix} 1 \\ 2 \\ 0 \end{bmatrix}}, \second{\begin{bmatrix} 0 \\ 1 \\ -1 \end{bmatrix}} \right\} nor Set B={[100],[010],\text{Set B} = \Big\{ \first{\begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix}}, \second{\begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix}}, [001],[2−13]}\third{\begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix}}, \begin{bmatrix} 2 \\ -1 \\ 3 \end{bmatrix} \Big\} is a basis for R3\mathbb{R}^3, and state which requirement of a basis each set fails.

What is the dimension of R3\mathbb{R}^3, and which requirement of a basis fails when you have too few vectors versus too many?

The space R3\mathbb{R}^3 has dimension 33, so any basis for R3\mathbb{R}^3 must have exactly 33 vectors. Don't swap the two reasons and say Set A fails independence or Set B fails to span (Set B actually contains the three standard basis vectors, so it does span R3\mathbb{R}^3): Set A has only 22 vectors (fewer than 33), so it fails to span R3\mathbb{R}^3; Set B has 44 vectors (more than 33), so it fails linear independence.
3

Find a basis for the subspace spanned by v1=[1−12]\first{v_1} = \first{\begin{bmatrix} 1 \\ -1 \\ 2 \end{bmatrix}}, v2=[3−36]\second{v_2} = \second{\begin{bmatrix} 3 \\ -3 \\ 6 \end{bmatrix}}, v3=[110]\third{v_3} = \third{\begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix}}, and v4=[24−2]v_4 = \begin{bmatrix} 2 \\ 4 \\ -2 \end{bmatrix}, and state its dimension.

Put the four vectors into the columns of a matrix and row reduce: which columns get a pivot?

Putting the vectors into columns and row reducing gives:
[1312−1−314260−2]→R2←R2+R1R3←R3−2R1[1312002600−2−6]→R3←R3+R2[131200260000]\displaystyle \begin{aligned} &\begin{bmatrix} \first{1} & \second{3} & \third{1} & 2 \\ \first{-1} & \second{-3} & \third{1} & 4 \\ \first{2} & \second{6} & \third{0} & -2 \end{bmatrix} \\ &\xrightarrow{\substack{R_2 \leftarrow R_2 + R_1 \\ R_3 \leftarrow R_3 - 2R_1}} \begin{bmatrix} \first{1} & \second{3} & \third{1} & 2 \\ \first{0} & \second{0} & \third{2} & 6 \\ \first{0} & \second{0} & \third{-2} & -6 \end{bmatrix} \\ &\xrightarrow{R_3 \leftarrow R_3 + R_2} \begin{bmatrix} \first{\mathbf{1}} & \second{3} & \third{1} & 2 \\ \first{0} & \second{0} & \third{\mathbf{2}} & 6 \\ \first{0} & \second{0} & \third{0} & 0 \end{bmatrix} \end{aligned}
The pivots are in columns 1 and 3. Watch out for the common mistake of taking columns 1 and 3 from the row-reduced matrix, which would give the wrong basis {[100],[120]}\left\{ \fails{\begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix}}, \fails{\begin{bmatrix} 1 \\ 2 \\ 0 \end{bmatrix}} \right\}; always take the pivot columns from the original matrix.
Basis={[1−12],[110]},dimension=2\displaystyle \text{Basis} = \left\{ \first{\begin{bmatrix} 1 \\ -1 \\ 2 \end{bmatrix}}, \third{\begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix}} \right\}, \quad \text{dimension} = 2
4

Find a basis and the dimension for the subspace of all vectors [xyz]\target{\begin{bmatrix} x \\ y \\ z \end{bmatrix}} in R3\mathbb{R}^3 that satisfy x−3y+4z=0x - 3y + 4z = 0.

Solve for the pivot variable xx, then substitute it into [xyz]\target{\begin{bmatrix} x \\ y \\ z \end{bmatrix}} and split the vector by the free variables y\first{y} and z\second{z}.

Solving for the pivot variable xx in terms of the free variables y\first{y} and z\second{z} gives x=3y−4zx = \first{3y} - \second{4z}. Be careful not to read the coefficients −3-3 and 44 straight from x−3y+4z=0x - \first{3y} + \second{4z} = 0 without moving them across the equals sign first, which flips the top entries and gives the wrong basis {[−310],[401]}\left\{ \fails{\begin{bmatrix} -3 \\ 1 \\ 0 \end{bmatrix}}, \fails{\begin{bmatrix} 4 \\ 0 \\ 1 \end{bmatrix}} \right\}. Substituting x=3y−4zx = \first{3y} - \second{4z} into the general vector gives:
[xyz]=[3y−4zyz]=y[310]+z[−401]\displaystyle \begin{aligned} \target{\begin{bmatrix} x \\ y \\ z \end{bmatrix}} &= \begin{bmatrix} \first{3y} - \second{4z} \\ \first{y} \\ \second{z} \end{bmatrix} \\ &= \first{y}\first{\begin{bmatrix} 3 \\ 1 \\ 0 \end{bmatrix}} + \second{z}\second{\begin{bmatrix} -4 \\ 0 \\ 1 \end{bmatrix}} \end{aligned}
Basis={[310],[−401]},dimension=2\displaystyle \text{Basis} = \left\{ \first{\begin{bmatrix} 3 \\ 1 \\ 0 \end{bmatrix}}, \second{\begin{bmatrix} -4 \\ 0 \\ 1 \end{bmatrix}} \right\}, \quad \text{dimension} = 2
5

Is the set S={[12−1],[013],[251]}S = \left\{ \first{\begin{bmatrix} 1 \\ 2 \\ -1 \end{bmatrix}}, \second{\begin{bmatrix} 0 \\ 1 \\ 3 \end{bmatrix}}, \third{\begin{bmatrix} 2 \\ 5 \\ 1 \end{bmatrix}} \right\} a basis for R3\mathbb{R}^3?

The set has 33 vectors matching dim(R3)=3\text{dim}(\mathbb{R}^3) = 3, so put the vectors into columns and row reduce: does every column get a pivot?

Don't stop and answer "Yes" just because SS has 33 vectors in R3\mathbb{R}^3. Matching the dimension only tells you to check linear independence. Putting the vectors into columns and row reducing gives:
[102215−131]→R2←R2−2R1R3←R3+R1[102011033]→R3←R3−3R2[102011000]\displaystyle \begin{aligned} &\begin{bmatrix} \first{1} & \second{0} & \third{2} \\ \first{2} & \second{1} & \third{5} \\ \first{-1} & \second{3} & \third{1} \end{bmatrix} \xrightarrow{\substack{R_2 \leftarrow R_2 - 2R_1 \\ R_3 \leftarrow R_3 + R_1}} \begin{bmatrix} \first{1} & \second{0} & \third{2} \\ \first{0} & \second{1} & \third{1} \\ \first{0} & \second{3} & \third{3} \end{bmatrix} \\ &\xrightarrow{R_3 \leftarrow R_3 - 3R_2} \begin{bmatrix} \first{\mathbf{1}} & \second{0} & \third{2} \\ \first{0} & \second{\mathbf{1}} & \third{1} \\ \first{0} & \second{0} & \third{0} \end{bmatrix} \end{aligned}
(Be careful when clearing row 3 in the first step: adding R1R_1 to R3R_3 gives 1+2=31 + 2 = 3 in the bottom-right entry, whereas a sign slip there, writing 1−2=−11 - 2 = \fails{-1}, would leave a false third pivot and lead to "Yes.") Because the matrix has only 22 pivots (since [251]=2[12−1]+[013]\third{\begin{bmatrix} 2 \\ 5 \\ 1 \end{bmatrix}} = \first{2}\first{\begin{bmatrix} 1 \\ 2 \\ -1 \end{bmatrix}} + \second{\begin{bmatrix} 0 \\ 1 \\ 3 \end{bmatrix}}), the vectors are not linearly independent.
No
6

Let W\subsp{W} be the plane in R3\mathbb{R}^3 defined by x−3y+2z=0x - 3y + 2z = 0. Determine whether S1={[111],[211]}S_1 = \left\{ \first{\begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix}}, \second{\begin{bmatrix} 2 \\ 1 \\ 1 \end{bmatrix}} \right\} and S2={[111],[310]}S_2 = \left\{ \first{\begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix}}, \second{\begin{bmatrix} 3 \\ 1 \\ 0 \end{bmatrix}} \right\} are bases for W\subsp{W}.

Before checking the vector count and linear independence, test whether every vector in S1S_1 and S2S_2 satisfies x−3y+2z=0x - 3y + 2z = 0.

Don't skip checking whether the vectors in S1S_1 satisfy the equation: if you only notice that S1S_1 has 22 vectors that aren't scalar multiples of each other, you will mistakenly say "Yes" for both sets. Plugging the second vector of S1S_1, [211]\second{\begin{bmatrix} 2 \\ 1 \\ 1 \end{bmatrix}}, into x−3y+2z=0x - 3y + 2z = 0 gives 2−3(1)+2(1)=1≠0\second{2} - 3(\second{1}) + 2(\second{1}) = \fails{1} \neq 0, so it does not lie in W\subsp{W}. For S2S_2, both vectors satisfy the equation (1−3(1)+2(1)=0\first{1} - 3(\first{1}) + 2(\first{1}) = 0 and 3−3(1)+2(0)=0\second{3} - 3(\second{1}) + 2(\second{0}) = 0), the count of 22 vectors matches dim(W)=2\text{dim}(\subsp{W}) = 2, and neither vector is a scalar multiple of the other.
S1S_1 is not a basis for W\subsp{W}; S2S_2 is a basis for W\subsp{W}