M301 Linear Algebra · Week 9

Vector Spaces, Subspaces, Null and Column Spaces, Bases

Vector spaces and subspaces · Null spaces, column spaces, row spaces, and linear transformations · Linearly independent sets; bases

By the end of this week you will be able to:

  • work with matrices and functions as vectors, and name the zero vector of each space;
  • decide whether a given set is a subspace, and give a specific counterexample when it is not;
  • find a spanning set for \(\operatorname{Nul} A\) and decide whether a vector lies in \(\operatorname{Nul} A\) or in \(\operatorname{Col} A\);
  • find the kernel and the range of a linear transformation between vector spaces;
  • decide whether a set is a basis, and find bases for \(\operatorname{Nul} A\), \(\operatorname{Col} A\) and \(\operatorname{Row} A\).

Day 1: Vector Spaces and Subspaces

Today we see that matrices and functions can be added and scaled just like vectors in \(\mathbb R^n\), and we learn a quick test for deciding whether a set is a subspace.

Facts used today
  • Vectors in \(\mathbb R^n\) are added and scaled entry by entry: \((1,2,3)+(4,0,-1)=(5,2,2)\) and \(3(1,2,3)=(3,6,9)\).
  • A linear combination of \(\mathbf v_1,\dots,\mathbf v_p\) is a vector \(c_1\mathbf v_1+\cdots+c_p\mathbf v_p\) with scalars \(c_1,\dots,c_p\).
  • \(\operatorname{Span}\{\mathbf v_1,\dots,\mathbf v_p\}\) is the set of all linear combinations of \(\mathbf v_1,\dots,\mathbf v_p\).
  • A vector \(\mathbf y\) is in \(\operatorname{Span}\{\mathbf v_1,\dots,\mathbf v_p\}\) exactly when the system with augmented matrix \([\,\mathbf v_1\ \cdots\ \mathbf v_p \mid \mathbf y\,]\) is consistent, that is, when an echelon form has no row \([\,0\ \cdots\ 0 \mid b\,]\) with \(b\neq 0\).

1.1 Vector spaces

Everything we did with vectors in \(\mathbb R^n\) used only a few rules for addition and scalar multiplication. Many other sets of objects follow the same rules. Such a set is called a vector space, and its elements are called vectors, even when they are matrices or functions.

Definition (vector space)

A vector space is a nonempty set \(V\) of objects, called vectors, with two operations, addition and multiplication by scalars (real numbers), such that the following ten axioms hold for all \(\mathbf u,\mathbf v,\mathbf w\) in \(V\) and all scalars \(c,d\).

  1. \(\mathbf u+\mathbf v\) is in \(V\).
  2. \(\mathbf u+\mathbf v=\mathbf v+\mathbf u\).
  3. \((\mathbf u+\mathbf v)+\mathbf w=\mathbf u+(\mathbf v+\mathbf w)\).
  4. There is a zero vector \(\mathbf 0\) in \(V\) with \(\mathbf u+\mathbf 0=\mathbf u\).
  5. For each \(\mathbf u\) there is a vector \(-\mathbf u\) in \(V\) with \(\mathbf u+(-\mathbf u)=\mathbf 0\).
  6. \(c\mathbf u\) is in \(V\).
  7. \(c(\mathbf u+\mathbf v)=c\mathbf u+c\mathbf v\).
  8. \((c+d)\mathbf u=c\mathbf u+d\mathbf u\).
  9. \(c(d\mathbf u)=(cd)\mathbf u\).
  10. \(1\mathbf u=\mathbf u\).

Axioms 1 and 6 say that the two operations never take you outside \(V\). The other axioms are the usual rules of algebra. From the axioms one gets three facts that we use all the time: for every \(\mathbf u\) in \(V\) and every scalar \(c\),

\[0\mathbf u=\mathbf 0,\qquad c\mathbf 0=\mathbf 0,\qquad -\mathbf u=(-1)\mathbf u.\]
Example 1 (four vector spaces)
(a) \(\mathbb R^n\), with the usual operations, is a vector space for every \(n\ge 1\).
(b) \(M_{m\times n}\) is the set of all \(m\times n\) matrices, with the usual matrix addition and scalar multiplication. In \(M_{2\times 2}\), \[\begin{bmatrix} 1 & 0\\ 2 & -3\end{bmatrix}+\begin{bmatrix} 4 & 1\\ -2 & 5\end{bmatrix}=\begin{bmatrix} 5 & 1\\ 0 & 2\end{bmatrix},\qquad 3\begin{bmatrix} 1 & 0\\ 2 & -3\end{bmatrix}=\begin{bmatrix} 3 & 0\\ 6 & -9\end{bmatrix}.\]
(c) The set of all real-valued functions on \(\mathbb R\) is a vector space. Functions are added and scaled pointwise: \((f+g)(t)=f(t)+g(t)\) and \((cf)(t)=c\,f(t)\). For \(f(t)=\sin t\) and \(g(t)=t^2\), \((f+g)(t)=\sin t+t^2\) and \((2f)(t)=2\sin t\).
(d) The set \(\mathbb S\) of signals consists of doubly infinite sequences \(\{y_k\}=(\dots,y_{-1},y_0,y_1,\dots)\), added and scaled term by term: \(\{y_k\}+\{z_k\}=\{y_k+z_k\}\) and \(c\{y_k\}=\{cy_k\}\). A signal records a measurement taken at equally spaced times.

The zero vector is \((0,\dots,0)\) in \(\mathbb R^n\), the zero matrix in \(M_{m\times n}\), the function that is identically zero in the space of functions, and the zero signal \((\dots,0,0,0,\dots)\) in \(\mathbb S\). The negative of a vector is \((-1)\) times it.

1.2 Subspaces

Most vector spaces we meet sit inside a larger one, for example a plane through the origin inside \(\mathbb R^3\). For such a subset we only need to check three properties. The other axioms are automatic, because they already hold in the larger space.

Definition (subspace)

A subspace of a vector space \(V\) is a subset \(H\) of \(V\) with three properties:

(a) The zero vector of \(V\) is in \(H\).
(b) \(H\) is closed under addition: if \(\mathbf u\) and \(\mathbf v\) are in \(H\), then \(\mathbf u+\mathbf v\) is in \(H\).
(c) \(H\) is closed under scalar multiplication: if \(\mathbf u\) is in \(H\) and \(c\) is a scalar, then \(c\mathbf u\) is in \(H\).

Every subspace is itself a vector space, with the operations of \(V\).

How to test a subset \(H\)
  1. Check whether \(\mathbf 0\) is in \(H\). If it is not, stop: \(H\) is not a subspace.
  2. Take two general elements \(\mathbf u,\mathbf v\) of \(H\) and check whether \(\mathbf u+\mathbf v\) satisfies the condition that defines \(H\).
  3. Take a general \(\mathbf u\) in \(H\) and a general scalar \(c\) and check whether \(c\mathbf u\) satisfies the condition.

To show that \(H\) is not a subspace, one specific counterexample is enough: a specific pair \(\mathbf u,\mathbf v\) in \(H\) with \(\mathbf u+\mathbf v\) not in \(H\), or a specific \(\mathbf u\) and \(c\) with \(c\mathbf u\) not in \(H\).

Example 2 (a copy of the plane inside \(\mathbb R^3\))

Let \(H=\left\{\begin{bmatrix} s\\ t\\ 0\end{bmatrix} : s,t \text{ real}\right\}\). Is \(H\) a subspace of \(\mathbb R^3\)?

Solution

The condition for a vector to be in \(H\) is: the third entry is 0.

(a) \(\mathbf 0=(0,0,0)\) has third entry 0, so \(\mathbf 0\) is in \(H\).
(b) \((s_1,t_1,0)+(s_2,t_2,0)=(s_1+s_2,\,t_1+t_2,\,0)\). The third entry is 0, so the sum is in \(H\).
(c) \(c(s,t,0)=(cs,ct,0)\). The third entry is 0, so \(c\mathbf u\) is in \(H\).

So \(H\) is a subspace of \(\mathbb R^3\). Note that \(\mathbb R^2\) itself is not a subspace of \(\mathbb R^3\): vectors in \(\mathbb R^2\) have two entries, so \(\mathbb R^2\) is not even a subset of \(\mathbb R^3\). The set \(H\) only looks like \(\mathbb R^2\).

Example 3 (two lines in \(\mathbb R^2\))

Decide whether each line is a subspace of \(\mathbb R^2\).

(a) \(L_1=\{(x,y): y=x/2\}\)
(b) \(L_2=\{(x,y): y=x/2+2\}\)

Solution

(a) \(0=0/2\), so \((0,0)\) is in \(L_1\). If \(y_1=x_1/2\) and \(y_2=x_2/2\), then \(y_1+y_2=(x_1+x_2)/2\), so the sum is in \(L_1\). If \(y=x/2\), then \(cy=(cx)/2\), so \(c(x,y)\) is in \(L_1\). Thus \(L_1\) is a subspace. In Figure 1 (left), \(\mathbf u=(2,1)\), \(\mathbf v=(-3,-1.5)\) and \(\mathbf u+\mathbf v=(-1,-0.5)\) all lie on the line.
(b) For \(x=0\) the line gives \(y=2\), not \(0\). So \((0,0)\) is not in \(L_2\) and \(L_2\) is not a subspace. Addition also fails: \(\mathbf p=(-3,0.5)\) and \(\mathbf q=(1,2.5)\) are on \(L_2\), but \(\mathbf p+\mathbf q=(-2,3)\) is not, since \(-2/2+2=1\neq 3\) (Figure 1, right).
uvu+vy = x/2through the origin: a subspacepqp+qy = x/2 + 2not through the origin: not a subspace
Figure 1. Left: a line through the origin is closed under addition and scalar multiplication. Right: a line that misses the origin is not; \(\mathbf p+\mathbf q\) leaves the line.
Example 4 (one property holds, the other fails)
(a) Let \(V=\{(x,y): x\ge 0,\ y\ge 0\}\), the first quadrant. If \(\mathbf u\) and \(\mathbf v\) have nonnegative entries, so does \(\mathbf u+\mathbf v\). So \(V\) is closed under addition. But \(\mathbf u=(3,2)\) is in \(V\) and \((-1)\mathbf u=(-3,-2)\) is not. So \(V\) is not a subspace.
(b) Let \(W=\{(x,y): xy\ge 0\}\), the first and third quadrants together with the axes. If \(xy\ge 0\), then \((cx)(cy)=c^2xy\ge 0\). So \(W\) is closed under scalar multiplication. But \(\mathbf u=(3,1)\) and \(\mathbf v=(-1,-3)\) are in \(W\), while \(\mathbf u+\mathbf v=(2,-2)\) has \(2\cdot(-2)=-4<0\). So \(W\) is not a subspace.

Both sets contain \(\mathbf 0\). The zero test is necessary, but it is not enough. See Figure 2.

u(−1)uVclosed under +, not under scalarsuvu+vWWclosed under scalars, not under +
Figure 2. Left: the first quadrant \(V\) is not closed under multiplication by \(-1\). Right: the union \(W\) of the first and third quadrants is not closed under addition.
Example 5 (subsets of \(M_{2\times 2}\))
(a) Let \(S\) be the set of symmetric \(2\times 2\) matrices, \(\begin{bmatrix} a & b\\ b & d\end{bmatrix}\). The zero matrix is symmetric. Adding two such matrices gives \(\begin{bmatrix} a_1+a_2 & b_1+b_2\\ b_1+b_2 & d_1+d_2\end{bmatrix}\), again with equal off-diagonal entries. Scaling gives \(\begin{bmatrix} ca & cb\\ cb & cd\end{bmatrix}\), also symmetric. So \(S\) is a subspace of \(M_{2\times 2}\).
(b) Let \(N\) be the set of \(2\times 2\) matrices with determinant 0. The zero matrix is in \(N\). But \[\begin{bmatrix} 1 & 0\\ 0 & 0\end{bmatrix}+\begin{bmatrix} 0 & 0\\ 0 & 1\end{bmatrix}=\begin{bmatrix} 1 & 0\\ 0 & 1\end{bmatrix}.\] Both matrices on the left have determinant 0, and the sum has determinant 1. So \(N\) is not closed under addition and is not a subspace.
Exercise 1.A (subspace or not?)

Self-check only. These exercises are not graded.

For each set, choose whether it is a subspace of the given space.

(a) \(\{(x,y,z): x+y+z=0\}\) in \(\mathbb R^3\):
(b) \(\{(x,y): y=3x-1\}\) in \(\mathbb R^2\):
(c) \(\{(x,y): y=x^2\}\) in \(\mathbb R^2\):
(d) \(\left\{\begin{bmatrix} a & 1\\ 0 & b\end{bmatrix} : a,b \text{ real}\right\}\) in \(M_{2\times 2}\):
(e) \(\{(x,y,z): x\le y\}\) in \(\mathbb R^3\):
(a) Subspace. \(0+0+0=0\). If \(x_1+y_1+z_1=0\) and \(x_2+y_2+z_2=0\), the sum of the two vectors also has entries adding up to 0, and \(cx+cy+cz=c\cdot 0=0\).
(b) Not a subspace. At \(x=0\) we get \(y=-1\), so \((0,0)\) is not on the line.
(c) Not a subspace. \((1,1)\) is in the set, but \(2(1,1)=(2,2)\) is not, since \(2\neq 2^2\).
(d) Not a subspace. Every matrix in the set has \((1,2)\)-entry 1, so the zero matrix is not in the set.
(e) Not a subspace. \((0,1,0)\) is in the set (\(0\le 1\)), but \((-1)(0,1,0)=(0,-1,0)\) is not (\(0\le -1\) is false).
Exercise 1.B (build counterexamples)

Self-check only. Many answers are possible; the check tests whether your vectors really are counterexamples. Entries may be typed as integers, decimals (1.5 or 1,5) or simple fractions (3/2).

(a) Let \(H=\{(x,y): y\ge 0\}\), the upper half-plane. Give a vector \(\mathbf u\) in \(H\) and a scalar \(c\) such that \(c\mathbf u\) is not in \(H\).
\(\mathbf u=(\) , \()\),   \(c=\)
(b) Let \(K=\{(x,y): xy=0\}\), the union of the two coordinate axes. Give vectors \(\mathbf p\) and \(\mathbf q\) in \(K\) such that \(\mathbf p+\mathbf q\) is not in \(K\).
\(\mathbf p=(\) , \()\),   \(\mathbf q=(\) , \()\)
(a) Any \(\mathbf u\) with \(y>0\) and any negative \(c\) works. For example \(\mathbf u=(1,2)\) and \(c=-1\): \(c\mathbf u=(-1,-2)\) has negative second entry.
(b) Take one vector on each axis, both nonzero. For example \(\mathbf p=(1,0)\) and \(\mathbf q=(0,1)\): \(\mathbf p+\mathbf q=(1,1)\) and \(1\cdot 1=1\neq 0\).

1.3 The subspace spanned by a set

The most common way to describe a subspace is as a span. This also gives the fastest way to prove that a set is a subspace.

Theorem 1 If \(\mathbf v_1,\dots,\mathbf v_p\) are in a vector space \(V\), then \(\operatorname{Span}\{\mathbf v_1,\dots,\mathbf v_p\}\) is a subspace of \(V\).

We call \(\operatorname{Span}\{\mathbf v_1,\dots,\mathbf v_p\}\) the subspace spanned (or generated) by \(\mathbf v_1,\dots,\mathbf v_p\). If \(H=\operatorname{Span}\{\mathbf v_1,\dots,\mathbf v_p\}\), the set \(\{\mathbf v_1,\dots,\mathbf v_p\}\) is a spanning set for \(H\). In \(\mathbb R^3\), the span of one nonzero vector is a line through the origin, and the span of two vectors that are not multiples of each other is a plane through the origin (Figure 3).

x₁x₂x₃v1v20Span{v1, v2}: a planex₁x₂x₃v0Span{v}: a line
Figure 3. Two subspaces of \(\mathbb R^3\). Left: the plane spanned by \(\mathbf v_1=(2,0,1)\) and \(\mathbf v_2=(0,2,1)\). Right: the line spanned by \(\mathbf v=(1,2,2)\). Both pass through the origin.
Example 6 (write the set as a span)

Let \(H\) be the set of all vectors \((a-3b,\ b-a,\ a,\ b)\), where \(a\) and \(b\) are any real numbers. Show that \(H\) is a subspace of \(\mathbb R^4\).

Solution

Write a general vector of \(H\) as a column and split it according to the parameters \(a\) and \(b\):

\[\begin{bmatrix} a-3b\\ b-a\\ a\\ b\end{bmatrix}=a\begin{bmatrix} 1\\ -1\\ 1\\ 0\end{bmatrix}+b\begin{bmatrix} -3\\ 1\\ 0\\ 1\end{bmatrix}=a\mathbf v_1+b\mathbf v_2.\]

So \(H=\operatorname{Span}\{\mathbf v_1,\mathbf v_2\}\), and \(H\) is a subspace of \(\mathbb R^4\) by Theorem 1. No property had to be checked by hand.

Example 7 (is a vector in the subspace?)

For which values of \(h\) is \(\mathbf y\) in the subspace of \(\mathbb R^3\) spanned by \(\mathbf v_1,\mathbf v_2,\mathbf v_3\)?

\[\mathbf v_1=\begin{bmatrix} 1\\ -1\\ -2\end{bmatrix},\quad \mathbf v_2=\begin{bmatrix} 5\\ -4\\ -7\end{bmatrix},\quad \mathbf v_3=\begin{bmatrix} -3\\ 1\\ 0\end{bmatrix},\quad \mathbf y=\begin{bmatrix} -4\\ 3\\ h\end{bmatrix}.\]

Solution

\(\mathbf y\) is in the subspace exactly when \(x_1\mathbf v_1+x_2\mathbf v_2+x_3\mathbf v_3=\mathbf y\) is consistent. Row reduce the augmented matrix with \(R_2\to R_2+R_1\) and \(R_3\to R_3+2R_1\), then \(R_3\to R_3-3R_2\):

\[\left[\begin{array}{ccc|c} 1 & 5 & -3 & -4\\ -1 & -4 & 1 & 3\\ -2 & -7 & 0 & h\end{array}\right]\sim \left[\begin{array}{ccc|c} 1 & 5 & -3 & -4\\ 0 & 1 & -2 & -1\\ 0 & 3 & -6 & h-8\end{array}\right]\sim \left[\begin{array}{ccc|c} 1 & 5 & -3 & -4\\ 0 & 1 & -2 & -1\\ 0 & 0 & 0 & h-5\end{array}\right].\]

The system is consistent exactly when \(h-5=0\). So \(\mathbf y\) is in the subspace if and only if \(h=5\).

Exercise 1.C (find a spanning set)

Self-check only. Several answers are correct; the check tests whether your two vectors lie in \(H\) and span it.

Let \(H\) be the set of all vectors \((a+2b,\ -a,\ 3b,\ a-b)\) with \(a,b\) real. Find vectors \(\mathbf v_1,\mathbf v_2\) with \(H=\operatorname{Span}\{\mathbf v_1,\mathbf v_2\}\). Enter them as the columns of the grid.

\([\,\mathbf v_1\ \ \mathbf v_2\,]=\)

Split by the parameters:

\[\begin{bmatrix} a+2b\\ -a\\ 3b\\ a-b\end{bmatrix}=a\begin{bmatrix} 1\\ -1\\ 0\\ 1\end{bmatrix}+b\begin{bmatrix} 2\\ 0\\ 3\\ -1\end{bmatrix}.\]

So \(\mathbf v_1=(1,-1,0,1)\) and \(\mathbf v_2=(2,0,3,-1)\) work. Any two vectors of \(H\) that are not multiples of each other also span \(H\), for example \(\mathbf v_1+\mathbf v_2\) and \(\mathbf v_1-\mathbf v_2\).

Exercise 1.D (membership in a span)

Self-check only.

Let \(\mathbf v_1=(1,2,-1)\), \(\mathbf v_2=(0,1,3)\) and \(\mathbf y=(2,5,h)\). Find the value of \(h\) for which \(\mathbf y\) is in \(\operatorname{Span}\{\mathbf v_1,\mathbf v_2\}\), and the weights with \(\mathbf y=c_1\mathbf v_1+c_2\mathbf v_2\).

\(h=\) \(c_1=\) \(c_2=\)

We need \(c_1(1,2,-1)+c_2(0,1,3)=(2,5,h)\). The first entry gives \(c_1=2\). The second gives \(2c_1+c_2=5\), so \(c_2=1\). The third entry must then be \(-c_1+3c_2=-2+3=1\). So \(h=1\).

With row reduction: \(\left[\begin{array}{cc|c} 1 & 0 & 2\\ 2 & 1 & 5\\ -1 & 3 & h\end{array}\right]\sim\left[\begin{array}{cc|c} 1 & 0 & 2\\ 0 & 1 & 1\\ 0 & 3 & h+2\end{array}\right]\sim\left[\begin{array}{cc|c} 1 & 0 & 2\\ 0 & 1 & 1\\ 0 & 0 & h-1\end{array}\right]\), consistent exactly when \(h=1\).

Day 2: Null Spaces, Column Spaces, Row Spaces, and Linear Transformations

Today we meet the subspaces that come with every matrix, \(\operatorname{Nul} A\), \(\operatorname{Col} A\) and \(\operatorname{Row} A\), and the kernel and range of a linear transformation.

Facts used today
  • A subspace of \(V\) is a subset that contains \(\mathbf 0\) and is closed under addition and scalar multiplication. A span \(\operatorname{Span}\{\mathbf v_1,\dots,\mathbf v_p\}\) is always a subspace.
  • If \(A=[\,\mathbf a_1\ \cdots\ \mathbf a_n\,]\) and \(\mathbf x=(x_1,\dots,x_n)\), then \(A\mathbf x=x_1\mathbf a_1+\cdots+x_n\mathbf a_n\), a linear combination of the columns of \(A\).
  • To solve \(A\mathbf x=\mathbf 0\), row reduce \([\,A\mid\mathbf 0\,]\) to reduced echelon form and write the basic variables in terms of the free variables.
  • \(A\mathbf x=\mathbf b\) is consistent exactly when an echelon form of \([\,A\mid\mathbf b\,]\) has no row \([\,0\ \cdots\ 0\mid c\,]\) with \(c\neq 0\).

2.1 The null space of a matrix

Definition (null space) The null space of an \(m\times n\) matrix \(A\), written \(\operatorname{Nul} A\), is the set of all solutions of the homogeneous equation \(A\mathbf x=\mathbf 0\): \[\operatorname{Nul} A=\{\mathbf x : \mathbf x \text{ is in } \mathbb R^n \text{ and } A\mathbf x=\mathbf 0\}.\]
Example 1 (is a vector in \(\operatorname{Nul} A\)?)

Let \(A=\begin{bmatrix} 1 & -3 & -2\\ -5 & 9 & 1\end{bmatrix}\) and \(\mathbf u=\begin{bmatrix} 5\\ 3\\ -2\end{bmatrix}\). Is \(\mathbf u\) in \(\operatorname{Nul} A\)?

Solution

We only need to compute \(A\mathbf u\):

\[A\mathbf u=\begin{bmatrix} 5-9+4\\ -25+27-2\end{bmatrix}=\begin{bmatrix} 0\\ 0\end{bmatrix}.\]

So \(\mathbf u\) is in \(\operatorname{Nul} A\). Testing membership in a null space takes one multiplication.

Theorem 2 The null space of an \(m\times n\) matrix \(A\) is a subspace of \(\mathbb R^n\). Equivalently, the set of all solutions of a system \(A\mathbf x=\mathbf 0\) of \(m\) homogeneous linear equations in \(n\) unknowns is a subspace of \(\mathbb R^n\).
Example 2 (a set described by equations)

Let \(H\) be the set of all vectors \((a,b,c,d)\) in \(\mathbb R^4\) with \(a-2b+5c=d\) and \(c-a=b\). Show that \(H\) is a subspace of \(\mathbb R^4\).

Solution

Move every variable to the left side:

\[\begin{aligned} a-2b+5c-d&=0\\ -a-b+c\phantom{{}-d}&=0\end{aligned}\qquad\text{so}\qquad H=\operatorname{Nul}\begin{bmatrix} 1 & -2 & 5 & -1\\ -1 & -1 & 1 & 0\end{bmatrix}.\]

By Theorem 2, \(H\) is a subspace of \(\mathbb R^4\). The equations must be homogeneous: the solutions of \(x_1+x_2=1\), for example, do not include \(\mathbf 0\).

The definition of \(\operatorname{Nul} A\) is implicit: it gives a condition to check, not a list of vectors. Solving \(A\mathbf x=\mathbf 0\) turns it into an explicit description, a spanning set.

Example 3 (a spanning set for \(\operatorname{Nul} A\))

Find a spanning set for the null space of \(A=\begin{bmatrix} 1 & 2 & 0 & -1\\ 2 & 4 & 1 & 1\\ -1 & -2 & 2 & 7\end{bmatrix}\).

Solution

Row reduce \([\,A\mid\mathbf 0\,]\): \(R_2\to R_2-2R_1\), \(R_3\to R_3+R_1\), then \(R_3\to R_3-2R_2\).

\[\left[\begin{array}{cccc|c} 1 & 2 & 0 & -1 & 0\\ 2 & 4 & 1 & 1 & 0\\ -1 & -2 & 2 & 7 & 0\end{array}\right]\sim \left[\begin{array}{cccc|c} 1 & 2 & 0 & -1 & 0\\ 0 & 0 & 1 & 3 & 0\\ 0 & 0 & 2 & 6 & 0\end{array}\right]\sim \left[\begin{array}{cccc|c} 1 & 2 & 0 & -1 & 0\\ 0 & 0 & 1 & 3 & 0\\ 0 & 0 & 0 & 0 & 0\end{array}\right].\]

The pivots are in columns 1 and 3, so \(x_2\) and \(x_4\) are free, and \(x_1=-2x_2+x_4\), \(x_3=-3x_4\). Write the general solution as a combination with the free variables as weights:

\[\begin{bmatrix} x_1\\ x_2\\ x_3\\ x_4\end{bmatrix}=\begin{bmatrix} -2x_2+x_4\\ x_2\\ -3x_4\\ x_4\end{bmatrix}=x_2\begin{bmatrix} -2\\ 1\\ 0\\ 0\end{bmatrix}+x_4\begin{bmatrix} 1\\ 0\\ -3\\ 1\end{bmatrix}=x_2\mathbf u+x_4\mathbf v.\]

So \(\operatorname{Nul} A=\operatorname{Span}\{\mathbf u,\mathbf v\}\). Check: \(A\mathbf u=(-2+2,\,-4+4,\,2-2)=\mathbf 0\) and \(A\mathbf v=(1-1,\,2-3+1,\,-1-6+7)=\mathbf 0\).

Two facts about this method
(a) The spanning set it produces is automatically linearly independent: in the entries of the free variables, each vector has a 1 where the others have 0.
(b) When \(\operatorname{Nul} A\neq\{\mathbf 0\}\), the number of vectors in the spanning set equals the number of free variables of \(A\mathbf x=\mathbf 0\). With no free variables, \(\operatorname{Nul} A=\{\mathbf 0\}\).
Example 4 (a line and the zero subspace)
(a) Let \(A=\begin{bmatrix} 1 & 2\\ 2 & 4\end{bmatrix}\). The replacement \(R_2\to R_2-2R_1\) gives \(\begin{bmatrix} 1 & 2\\ 0 & 0\end{bmatrix}\), so \(x_1=-2x_2\) with \(x_2\) free and \(\operatorname{Nul} A=\operatorname{Span}\{(-2,1)\}\). This is the line \(x_1+2x_2=0\) through the origin (Figure 4, left).
(b) Let \(B=\begin{bmatrix} 1 & 2\\ 3 & 4\end{bmatrix}\). Since \(\det B=4-6=-2\neq 0\), \(B\) is invertible and \(B\mathbf x=\mathbf 0\) has only the trivial solution. So \(\operatorname{Nul} B=\{\mathbf 0\}\).
Exercise 2.A (vectors in \(\operatorname{Nul} A\) and \(\operatorname{Col} A\))

Self-check only. Many answers are possible; the check computes with your vectors.

Let \(A=\begin{bmatrix} 1 & 2 & -1\\ 0 & 1 & 1\\ 2 & 5 & -1\end{bmatrix}\).

(a) Give a nonzero vector \(\mathbf x\) in \(\operatorname{Nul} A\).
\(\mathbf x=(\) , , \()\)
(b) Give a vector \(\mathbf b\) in \(\operatorname{Col} A\) that is not a multiple of any single column of \(A\).
\(\mathbf b=(\) , , \()\)
(c) Give a vector \(\mathbf w\) in \(\mathbb R^3\) that is not in \(\operatorname{Col} A\).
\(\mathbf w=(\) , , \()\)
(a) \(R_3\to R_3-2R_1\) gives row \((0,1,1)\), equal to row 2, so \(R_3\to R_3-R_2\) gives a zero row. From \(\begin{bmatrix} 1 & 2 & -1\\ 0 & 1 & 1\\ 0 & 0 & 0\end{bmatrix}\): \(x_2=-x_3\), \(x_1=-2x_2+x_3=3x_3\). With \(x_3=1\): \(\mathbf x=(3,-1,1)\). Any nonzero multiple also works.
(b) Add two columns, for example \(\mathbf a_1+\mathbf a_2=(3,1,7)\). It is in \(\operatorname{Col} A\) and is not a multiple of any column.
(c) Row 3 of \(A\) is \(2\cdot(\text{row }1)+(\text{row }2)\). So for \(A\mathbf x=\mathbf w\) to be consistent we need \(w_3=2w_1+w_2\). Any \(\mathbf w\) that breaks this works, for example \(\mathbf w=(0,0,1)\).
Exercise 2.B (a spanning set for a null space)

Self-check only. The check tests that both vectors are in \(\operatorname{Nul} A\) and that together they span it.

Find a spanning set \(\{\mathbf u,\mathbf v\}\) for \(\operatorname{Nul} A\), where

\[A=\begin{bmatrix} 1 & 0 & 2 & 0 & -1\\ 2 & 1 & 3 & 0 & 1\\ -1 & 3 & -5 & 1 & 12\end{bmatrix}.\]
\([\,\mathbf u\ \ \mathbf v\,]=\)

Row reduce \([\,A\mid\mathbf 0\,]\). \(R_2\to R_2-2R_1\) and \(R_3\to R_3+R_1\) give rows \((0,1,-1,0,3)\) and \((0,3,-3,1,11)\). Then \(R_3\to R_3-3R_2\) gives \((0,0,0,1,2)\):

\[\left[\begin{array}{ccccc|c} 1 & 0 & 2 & 0 & -1 & 0\\ 0 & 1 & -1 & 0 & 3 & 0\\ 0 & 0 & 0 & 1 & 2 & 0\end{array}\right].\]

This is already reduced. Free variables: \(x_3,x_5\). Then \(x_1=-2x_3+x_5\), \(x_2=x_3-3x_5\), \(x_4=-2x_5\), and

\[\mathbf x=x_3\begin{bmatrix} -2\\ 1\\ 1\\ 0\\ 0\end{bmatrix}+x_5\begin{bmatrix} 1\\ -3\\ 0\\ -2\\ 1\end{bmatrix}.\]

2.2 The column space of a matrix

Definition (column space) The column space of an \(m\times n\) matrix \(A=[\,\mathbf a_1\ \cdots\ \mathbf a_n\,]\), written \(\operatorname{Col} A\), is the set of all linear combinations of the columns of \(A\): \[\operatorname{Col} A=\operatorname{Span}\{\mathbf a_1,\dots,\mathbf a_n\}=\{\mathbf b : \mathbf b=A\mathbf x \text{ for some } \mathbf x \text{ in } \mathbb R^n\}.\]
Theorem 3 The column space of an \(m\times n\) matrix \(A\) is a subspace of \(\mathbb R^m\).

Unlike the null space, \(\operatorname{Col} A\) is defined explicitly: the columns are given, and every other vector of \(\operatorname{Col} A\) is built from them.

Example 5 (a set as a column space)

Find a matrix \(A\) with \(W=\operatorname{Col} A\), where \(W=\{(6a-b,\ a+b,\ -7a) : a,b \text{ real}\}\).

Solution

\[\begin{bmatrix} 6a-b\\ a+b\\ -7a\end{bmatrix}=a\begin{bmatrix} 6\\ 1\\ -7\end{bmatrix}+b\begin{bmatrix} -1\\ 1\\ 0\end{bmatrix},\qquad\text{so}\qquad A=\begin{bmatrix} 6 & -1\\ 1 & 1\\ -7 & 0\end{bmatrix}.\]

The vectors of the spanning set become the columns of \(A\). Then \(W=\operatorname{Col} A\), and \(W\) is a subspace of \(\mathbb R^3\).

Example 6 (is a vector in \(\operatorname{Col} A\)?)

Let \(A=\begin{bmatrix} 1 & 3\\ 2 & 1\\ -1 & 2\end{bmatrix}\). Describe \(\operatorname{Col} A\) by an equation, and decide whether \(\mathbf b=(5,0,5)\) and \(\mathbf w=(1,1,1)\) are in \(\operatorname{Col} A\).

Solution

Row reduce \([\,A\mid\mathbf b\,]\) for a general \(\mathbf b=(b_1,b_2,b_3)\): \(R_2\to R_2-2R_1\), \(R_3\to R_3+R_1\), then \(R_3\to R_3+R_2\).

\[\left[\begin{array}{cc|c} 1 & 3 & b_1\\ 2 & 1 & b_2\\ -1 & 2 & b_3\end{array}\right]\sim \left[\begin{array}{cc|c} 1 & 3 & b_1\\ 0 & -5 & b_2-2b_1\\ 0 & 5 & b_3+b_1\end{array}\right]\sim \left[\begin{array}{cc|c} 1 & 3 & b_1\\ 0 & -5 & b_2-2b_1\\ 0 & 0 & b_2+b_3-b_1\end{array}\right].\]

The system is consistent exactly when \(b_2+b_3-b_1=0\). So \(\operatorname{Col} A\) is the plane \(b_1=b_2+b_3\) in \(\mathbb R^3\).

For \(\mathbf b=(5,0,5)\): \(0+5=5\), so \(\mathbf b\) is in \(\operatorname{Col} A\). Indeed \(\mathbf b=-\mathbf a_1+2\mathbf a_2\).
For \(\mathbf w=(1,1,1)\): \(1+1=2\neq 1\), so \(\mathbf w\) is not in \(\operatorname{Col} A\).

For the matrix \(A=\begin{bmatrix} 1 & 2\\ 2 & 4\end{bmatrix}\) of Example 4, the second column is twice the first, so \(\operatorname{Col} A=\operatorname{Span}\{(1,2)\}\), another line through the origin. Figure 4 shows both subspaces. They are different lines.

(−2, 1)Nul ANul A: solutions of Ax = 0a1a2Col ACol A: combinations of the columns
Figure 4. For \(A=\begin{bmatrix} 1 & 2\\ 2 & 4\end{bmatrix}\): left, \(\operatorname{Nul} A=\operatorname{Span}\{(-2,1)\}\); right, \(\operatorname{Col} A=\operatorname{Span}\{\mathbf a_1\}\), with \(\mathbf a_2=2\mathbf a_1\).

2.3 The row space

Definition (row space) If \(A\) is an \(m\times n\) matrix, each row of \(A\) has \(n\) entries and can be viewed as a vector in \(\mathbb R^n\). The set of all linear combinations of the rows is the row space of \(A\), written \(\operatorname{Row} A\). It is a subspace of \(\mathbb R^n\). Since the rows of \(A\) are the columns of \(A^T\), \(\operatorname{Row} A=\operatorname{Col} A^T\).
Example 7 (a vector in the row space)
For \(M=\begin{bmatrix} 1 & 0 & -1\\ 0 & 1 & 1\end{bmatrix}\), the vector \((1,1,0)\) is in \(\operatorname{Row} M\), because \((1,1,0)=(1,0,-1)+(0,1,1)\). The vector \((1,0,0)\) is not: \(c_1(1,0,-1)+c_2(0,1,1)=(c_1,\,c_2,\,c_2-c_1)\), and \((c_1,c_2)=(1,0)\) gives third entry \(-1\), not 0.

2.4 Comparing \(\operatorname{Nul} A\) and \(\operatorname{Col} A\)

Example 8 (one matrix, two different subspaces)

Let \(A=\begin{bmatrix} 2 & 4 & -2 & 1\\ -2 & -5 & 7 & 3\\ 3 & 7 & -8 & 6\end{bmatrix}\), \(\mathbf u=\begin{bmatrix} 3\\ -2\\ -1\\ 0\end{bmatrix}\), \(\mathbf v=\begin{bmatrix} 3\\ -1\\ 3\end{bmatrix}\).

(a) \(\operatorname{Col} A\) is a subspace of \(\mathbb R^k\) and \(\operatorname{Nul} A\) is a subspace of \(\mathbb R^\ell\). Find \(k\) and \(\ell\).
(b) Find a nonzero vector in \(\operatorname{Col} A\) and a nonzero vector in \(\operatorname{Nul} A\).
(c) Is \(\mathbf u\) in \(\operatorname{Nul} A\)? Could \(\mathbf u\) be in \(\operatorname{Col} A\)?
(d) Is \(\mathbf v\) in \(\operatorname{Col} A\)? Could \(\mathbf v\) be in \(\operatorname{Nul} A\)?

Solution

(a) The columns have 3 entries, so \(k=3\). A vector \(\mathbf x\) with \(A\mathbf x\) defined has 4 entries, so \(\ell=4\).
(b) Any column is in \(\operatorname{Col} A\), for example \((2,-2,3)\). For \(\operatorname{Nul} A\), row reduction gives \([\,A\mid\mathbf 0\,]\sim\left[\begin{array}{cccc|c} 1 & 0 & 9 & 0 & 0\\ 0 & 1 & -5 & 0 & 0\\ 0 & 0 & 0 & 1 & 0\end{array}\right]\). So \(x_1=-9x_3\), \(x_2=5x_3\), \(x_4=0\), with \(x_3\) free. With \(x_3=1\): \((-9,5,1,0)\).
(c) \(A\mathbf u=(6-8+2+0,\ -6+10-7+0,\ 9-14+8+0)=(0,-3,3)\neq\mathbf 0\), so \(\mathbf u\) is not in \(\operatorname{Nul} A\). It has 4 entries, so it cannot be in \(\operatorname{Col} A\), which lives in \(\mathbb R^3\).
(d) Row reduce \([\,A\mid\mathbf v\,]\): \(R_2\to R_2+R_1\), \(R_3\to 2R_3-3R_1\), then \(R_2\to -R_2\) and \(R_3\to R_3-2R_2\): \[\left[\begin{array}{cccc|c} 2 & 4 & -2 & 1 & 3\\ -2 & -5 & 7 & 3 & -1\\ 3 & 7 & -8 & 6 & 3\end{array}\right]\sim \left[\begin{array}{cccc|c} 2 & 4 & -2 & 1 & 3\\ 0 & -1 & 5 & 4 & 2\\ 0 & 2 & -10 & 9 & -3\end{array}\right]\sim \left[\begin{array}{cccc|c} 2 & 4 & -2 & 1 & 3\\ 0 & 1 & -5 & -4 & -2\\ 0 & 0 & 0 & 17 & 1\end{array}\right].\] There is no row \([\,0\ 0\ 0\ 0\mid c\,]\) with \(c\neq 0\), so \(A\mathbf x=\mathbf v\) is consistent and \(\mathbf v\) is in \(\operatorname{Col} A\). It has 3 entries, so it cannot be in \(\operatorname{Nul} A\), which lives in \(\mathbb R^4\).
Nul \(A\) and Col \(A\) for an \(m\times n\) matrix \(A\)
\(\operatorname{Nul} A\)\(\operatorname{Col} A\)
a subspace of \(\mathbb R^n\)a subspace of \(\mathbb R^m\)
implicit: given by the condition \(A\mathbf x=\mathbf 0\)explicit: built from the columns of \(A\)
finding vectors needs row operations on \([\,A\mid\mathbf 0\,]\)finding vectors is easy: take the columns and their combinations
testing a given \(\mathbf v\) is easy: compute \(A\mathbf v\)testing a given \(\mathbf v\) needs row operations on \([\,A\mid\mathbf v\,]\)
\(\operatorname{Nul} A=\{\mathbf 0\}\) iff \(A\mathbf x=\mathbf 0\) has only the trivial solution iff \(\mathbf x\mapsto A\mathbf x\) is one-to-one\(\operatorname{Col} A=\mathbb R^m\) iff \(A\mathbf x=\mathbf b\) is consistent for every \(\mathbf b\) iff \(\mathbf x\mapsto A\mathbf x\) is onto \(\mathbb R^m\)
Exercise 2.C (a set as a column space)

Self-check only. Several answers are correct; the check tests whether \(\operatorname{Col} A=W\) for your matrix.

Let \(W=\{(a-2b,\ 3b,\ a+b,\ -a) : a,b \text{ real}\}\). Find a \(4\times 2\) matrix \(A\) with \(\operatorname{Col} A=W\).

\(A=\)
\[\begin{bmatrix} a-2b\\ 3b\\ a+b\\ -a\end{bmatrix}=a\begin{bmatrix} 1\\ 0\\ 1\\ -1\end{bmatrix}+b\begin{bmatrix} -2\\ 3\\ 1\\ 0\end{bmatrix},\qquad A=\begin{bmatrix} 1 & -2\\ 0 & 3\\ 1 & 1\\ -1 & 0\end{bmatrix}.\]

2.5 Kernel and range of a linear transformation

Definition (linear transformation, kernel, range)

A linear transformation \(T\) from a vector space \(V\) into a vector space \(W\) is a rule that assigns to each \(\mathbf x\) in \(V\) a unique vector \(T(\mathbf x)\) in \(W\), such that

(i) \(T(\mathbf u+\mathbf v)=T(\mathbf u)+T(\mathbf v)\) for all \(\mathbf u,\mathbf v\) in \(V\), and
(ii) \(T(c\mathbf u)=cT(\mathbf u)\) for all \(\mathbf u\) in \(V\) and all scalars \(c\).

The kernel of \(T\) is the set of all \(\mathbf u\) in \(V\) with \(T(\mathbf u)=\mathbf 0\). The range of \(T\) is the set of all vectors of the form \(T(\mathbf x)\) in \(W\). The kernel is a subspace of \(V\) and the range is a subspace of \(W\) (Figure 5).

If \(T(\mathbf x)=A\mathbf x\) for a matrix \(A\), then the kernel of \(T\) is \(\operatorname{Nul} A\) and the range of \(T\) is \(\operatorname{Col} A\).

0kernelV0rangeWTthe kernel is a subspace of Vthe range is a subspace of W
Figure 5. The kernel of \(T\) is the part of \(V\) that \(T\) sends to \(\mathbf 0\); the range is the set of all outputs. Both are subspaces.
Example 9 (a two-day moving average)

Let \(\{p_k\}\) in \(\mathbb S\) be the daily price of a stock. The two-day moving average is the transformation \(M_2:\mathbb S\to\mathbb S\),

\[M_2(\{p_k\})=\left\{\frac{p_k+p_{k-1}}{2}\right\}.\]

Show that \(M_2\) is linear and find its kernel.

Solution

Linear. For signals \(\{p_k\},\{q_k\}\) and a scalar \(c\):

\[M_2(\{p_k+q_k\})=\left\{\frac{p_k+p_{k-1}}{2}+\frac{q_k+q_{k-1}}{2}\right\}=M_2(\{p_k\})+M_2(\{q_k\}),\qquad M_2(\{cp_k\})=\left\{c\,\frac{p_k+p_{k-1}}{2}\right\}=c\,M_2(\{p_k\}).\]

Kernel. \(\{p_k\}\) is in the kernel when \(p_k+p_{k-1}=0\), that is \(p_k=-p_{k-1}\), for every \(k\). Starting from \(p_0\) this gives \(p_k=p_0(-1)^k\). So the kernel is the set of multiples of the alternating signal \(\{(-1)^k\}=(\dots,1,-1,1,-1,\dots)\). The moving average removes exactly this day-to-day up-and-down pattern.

Day 3: Linearly Independent Sets; Bases

Today we find the smallest sets that still span a subspace, called bases, and we compute bases for \(\operatorname{Nul} A\), \(\operatorname{Col} A\) and \(\operatorname{Row} A\).

Facts used today
  • Vectors \(\mathbf v_1,\dots,\mathbf v_p\) in \(\mathbb R^n\) are linearly independent exactly when \([\,\mathbf v_1\ \cdots\ \mathbf v_p\,]\mathbf x=\mathbf 0\) has only the trivial solution, that is, when every column of \([\,\mathbf v_1\ \cdots\ \mathbf v_p\,]\) is a pivot column.
  • Two vectors are linearly dependent exactly when one is a multiple of the other. A set that contains \(\mathbf 0\) is linearly dependent. More than \(n\) vectors in \(\mathbb R^n\) are always linearly dependent.
  • For an \(n\times n\) matrix \(A\), the following are equivalent: \(A\) is invertible; \(A\) has \(n\) pivots; \(\det A\neq 0\); the columns of \(A\) are linearly independent; the columns of \(A\) span \(\mathbb R^n\).
  • \(\operatorname{Nul} A\) is the solution set of \(A\mathbf x=\mathbf 0\); \(\operatorname{Col} A\) is the span of the columns of \(A\); \(\operatorname{Row} A\) is the span of the rows of \(A\).

3.1 Linear independence in a vector space

Definition (linear independence)

An indexed set \(\{\mathbf v_1,\dots,\mathbf v_p\}\) in a vector space \(V\) is linearly independent if the vector equation

\[c_1\mathbf v_1+c_2\mathbf v_2+\cdots+c_p\mathbf v_p=\mathbf 0\]

has only the trivial solution \(c_1=\cdots=c_p=0\). Otherwise the set is linearly dependent, and an equation with weights not all zero is a linear dependence relation.

Theorem 4 An indexed set \(\{\mathbf v_1,\dots,\mathbf v_p\}\) of two or more vectors, with \(\mathbf v_1\neq\mathbf 0\), is linearly dependent if and only if some \(\mathbf v_j\) (with \(j>1\)) is a linear combination of the vectors before it, \(\mathbf v_1,\dots,\mathbf v_{j-1}\).

When the vectors are matrices or functions, we cannot put them directly into the columns of a matrix. Then we work with the definition, or look for one vector that is a combination of the others.

Example 1 (matrices)

In \(M_{2\times 2}\), let \(A_1=\begin{bmatrix} 1 & 0\\ 0 & 1\end{bmatrix}\), \(A_2=\begin{bmatrix} 0 & 1\\ 1 & 0\end{bmatrix}\), \(A_3=\begin{bmatrix} 1 & 1\\ 1 & 1\end{bmatrix}\). Then \(A_3=A_1+A_2\), so \(\{A_1,A_2,A_3\}\) is linearly dependent. The smaller set \(\{A_1,A_2\}\) is linearly independent: \(c_1A_1+c_2A_2=\begin{bmatrix} c_1 & c_2\\ c_2 & c_1\end{bmatrix}\) is the zero matrix only when \(c_1=c_2=0\).

3.2 Bases

Definition (basis)

Let \(H\) be a subspace of a vector space \(V\). A set \(\mathcal B\) of vectors in \(V\) is a basis for \(H\) if

(i) \(\mathcal B\) is linearly independent, and
(ii) \(\mathcal B\) spans \(H\): \(H=\operatorname{Span}\mathcal B\).

In particular, every vector of \(\mathcal B\) must belong to \(H\).

Example 2 (standard bases)
(a) In \(\mathbb R^n\), the columns \(\mathbf e_1,\dots,\mathbf e_n\) of \(I_n\) form the standard basis. For instance \((4,-1,7)=4\mathbf e_1-\mathbf e_2+7\mathbf e_3\).
(b) In \(M_{2\times 2}\), the four matrices \[E_{11}=\begin{bmatrix} 1 & 0\\ 0 & 0\end{bmatrix},\ E_{12}=\begin{bmatrix} 0 & 1\\ 0 & 0\end{bmatrix},\ E_{21}=\begin{bmatrix} 0 & 0\\ 1 & 0\end{bmatrix},\ E_{22}=\begin{bmatrix} 0 & 0\\ 0 & 1\end{bmatrix}\] form a basis, since \(\begin{bmatrix} a & b\\ c & d\end{bmatrix}=aE_{11}+bE_{12}+cE_{21}+dE_{22}\) and this is the zero matrix only when \(a=b=c=d=0\).
(c) If \(A\) is an invertible \(n\times n\) matrix, its columns form a basis for \(\mathbb R^n\): they are linearly independent and span \(\mathbb R^n\).
Example 3 (a basis for \(\mathbb R^3\)?)

Is \(\{\mathbf v_1,\mathbf v_2,\mathbf v_3\}\) a basis for \(\mathbb R^3\), where \(\mathbf v_1=(1,0,2)\), \(\mathbf v_2=(2,1,0)\), \(\mathbf v_3=(0,1,-3)\)?

Solution

There are three vectors in \(\mathbb R^3\), so the set is a basis exactly when \(A=[\,\mathbf v_1\ \mathbf v_2\ \mathbf v_3\,]\) is invertible. Use \(R_3\to R_3-2R_1\), then \(R_3\to R_3+4R_2\):

\[\begin{bmatrix} 1 & 2 & 0\\ 0 & 1 & 1\\ 2 & 0 & -3\end{bmatrix}\sim\begin{bmatrix} 1 & 2 & 0\\ 0 & 1 & 1\\ 0 & -4 & -3\end{bmatrix}\sim\begin{bmatrix} 1 & 2 & 0\\ 0 & 1 & 1\\ 0 & 0 & 1\end{bmatrix}.\]

There are three pivots, so \(A\) is invertible and the set is a basis for \(\mathbb R^3\). (Equivalently, \(\det A=1\cdot 1\cdot 1=1\neq 0\).)

Example 4 (too few, too many, wrong place)
(a) \(\{(1,-2,3),\ (-2,7,-9)\}\) is linearly independent (neither vector is a multiple of the other), but it is not a basis for \(\mathbb R^3\): a \(3\times 2\) matrix has at most 2 pivots, so it cannot have a pivot in every row, and the two vectors do not span \(\mathbb R^3\). It is not a basis for \(\mathbb R^2\) either, because its vectors are not in \(\mathbb R^2\).
(b) Any 4 vectors in \(\mathbb R^3\) are linearly dependent, so they never form a basis for \(\mathbb R^3\).
(c) Let \(H=\{(s,s,0): s \text{ real}\}\). Every vector of \(H\) is \(s\mathbf e_1+s\mathbf e_2\), but \(\{\mathbf e_1,\mathbf e_2\}\) is not a basis for \(H\): \(\mathbf e_1=(1,0,0)\) is not in \(H\). A basis for \(H\) is \(\{(1,1,0)\}\).
Figure 6 tool: is it a basis for \(\mathbb R^2\)?

Enter two vectors \(\mathbf b_1,\mathbf b_2\) as the columns of the matrix and move the sliders. The figure shows \(c_1\mathbf b_1+c_2\mathbf b_2\), and the grid lines show the vectors with whole-number weights. When \(\mathbf b_1,\mathbf b_2\) are a basis, these grid lines cover the whole plane; when they are dependent, every combination stays on one line.

\([\,\mathbf b_1\ \ \mathbf b_2\,]=\)
1 1
Figure 6. The vectors \(\mathbf b_1\) (red), \(\mathbf b_2\) (green) and \(c_1\mathbf b_1+c_2\mathbf b_2\) (dark). The faint lines pass through the combinations with whole-number weights.
Exercise 3.A (basis, or what is missing?)

Self-check only.

For each set of vectors in \(\mathbb R^3\), choose the correct description.

(a) \(\{(1,0,0),\ (1,1,0),\ (1,1,1)\}\)
(b) \(\{(1,2,3),\ (3,2,1)\}\)
(c) \(\{(1,0,1),\ (0,1,1),\ (1,1,2),\ (2,1,0)\}\)
(d) \(\{(1,-1,0),\ (0,1,-1),\ (-1,0,1)\}\)
(a) A basis. The matrix \(\begin{bmatrix} 1 & 1 & 1\\ 0 & 1 & 1\\ 0 & 0 & 1\end{bmatrix}\) is triangular with nonzero diagonal, so it has 3 pivots.
(b) Independent (not multiples of each other) but not spanning: a \(3\times 2\) matrix has at most 2 pivots, fewer than the 3 rows.
(c) Spans but dependent. Four vectors in \(\mathbb R^3\) are dependent; indeed \((1,1,2)=(1,0,1)+(0,1,1)\). The vectors \((1,0,1),(0,1,1),(2,1,0)\) give \(\det\begin{bmatrix} 1 & 0 & 2\\ 0 & 1 & 1\\ 1 & 1 & 0\end{bmatrix}=1(0-1)-0+2(0-1)=-3\neq 0\), so they already span \(\mathbb R^3\).
(d) Neither. The sum of the three vectors is \(\mathbf 0\), a dependence relation. The matrix has only 2 pivots, so the vectors span only a plane (the plane \(x_1+x_2+x_3=0\)).
Exercise 3.B (complete a basis)

Self-check only. Many answers are possible; the check tests whether your three vectors form a basis.

Find a vector \(\mathbf v_3\) such that \(\{(1,2,0),\ (0,1,-1),\ \mathbf v_3\}\) is a basis for \(\mathbb R^3\).

\(\mathbf v_3=(\) , , \()\)

We need \(\det\begin{bmatrix} 1 & 0 & a\\ 2 & 1 & b\\ 0 & -1 & c\end{bmatrix}\neq 0\). Expanding down column 3: \(a(-2-0)-b(-1-0)+c(1-0)=-2a+b+c\). For \(\mathbf v_3=\mathbf e_3=(0,0,1)\) this is \(1\neq 0\), so \(\mathbf v_3=(0,0,1)\) works. Any \(\mathbf v_3\) with \(-2a+b+c\neq 0\) works; the vectors with \(-2a+b+c=0\) are exactly the combinations of the first two vectors.

3.3 The Spanning Set Theorem

A spanning set may contain vectors that are not needed. Removing them leaves the span unchanged.

Theorem 5 (The Spanning Set Theorem) Let \(S=\{\mathbf v_1,\dots,\mathbf v_p\}\) be a set in \(V\), and let \(H=\operatorname{Span}\{\mathbf v_1,\dots,\mathbf v_p\}\).
(a) If one of the vectors in \(S\), say \(\mathbf v_k\), is a linear combination of the remaining vectors in \(S\), then the set formed from \(S\) by removing \(\mathbf v_k\) still spans \(H\).
(b) If \(H\neq\{\mathbf 0\}\), some subset of \(S\) is a basis for \(H\).
Example 5 (remove a vector that is not needed)

Let \(\mathbf v_1=(1,0,1)\), \(\mathbf v_2=(0,1,1)\), \(\mathbf v_3=(2,1,3)\) and \(H=\operatorname{Span}\{\mathbf v_1,\mathbf v_2,\mathbf v_3\}\). Find a basis for \(H\).

Solution

\(2\mathbf v_1+\mathbf v_2=(2,0,2)+(0,1,1)=(2,1,3)=\mathbf v_3\). So \(\mathbf v_3\) is a combination of \(\mathbf v_1,\mathbf v_2\), and by Theorem 5(a) \(H=\operatorname{Span}\{\mathbf v_1,\mathbf v_2\}\). Every combination \(c_1\mathbf v_1+c_2\mathbf v_2+c_3\mathbf v_3\) can be rewritten as \((c_1+2c_3)\mathbf v_1+(c_2+c_3)\mathbf v_2\). The vectors \(\mathbf v_1,\mathbf v_2\) are not multiples of each other, so \(\{\mathbf v_1,\mathbf v_2\}\) is linearly independent and is a basis for \(H\). Geometrically, \(H\) is a plane and \(\mathbf v_3\) lies in it (Figure 7).

x₁x₂x₃v1v2v32v1H0
Figure 7. \(\mathbf v_3=2\mathbf v_1+\mathbf v_2\) lies in the plane \(H=\operatorname{Span}\{\mathbf v_1,\mathbf v_2\}\), so adding \(\mathbf v_3\) to the spanning set does not make the span larger.
Example 6 (find a basis for a span by row reduction)

Find a basis for \(W=\operatorname{Span}\{\mathbf v_1,\mathbf v_2,\mathbf v_3,\mathbf v_4\}\), where

\[\mathbf v_1=\begin{bmatrix} 1\\ -3\\ 4\end{bmatrix},\quad \mathbf v_2=\begin{bmatrix} 6\\ 2\\ -1\end{bmatrix},\quad \mathbf v_3=\begin{bmatrix} 2\\ -2\\ 3\end{bmatrix},\quad \mathbf v_4=\begin{bmatrix} -4\\ -8\\ 9\end{bmatrix}.\]

Solution

Put the vectors into a matrix and row reduce: \(R_2\to R_2+3R_1\), \(R_3\to R_3-4R_1\); then \(R_2\to\tfrac14R_2\), \(R_3\to-\tfrac15R_3\); then \(R_3\to R_3-R_2\).

\[\begin{bmatrix} 1 & 6 & 2 & -4\\ -3 & 2 & -2 & -8\\ 4 & -1 & 3 & 9\end{bmatrix}\sim \begin{bmatrix} 1 & 6 & 2 & -4\\ 0 & 20 & 4 & -20\\ 0 & -25 & -5 & 25\end{bmatrix}\sim \begin{bmatrix} 1 & 6 & 2 & -4\\ 0 & 5 & 1 & -5\\ 0 & 5 & 1 & -5\end{bmatrix}\sim \begin{bmatrix} 1 & 6 & 2 & -4\\ 0 & 5 & 1 & -5\\ 0 & 0 & 0 & 0\end{bmatrix}.\]

The pivot columns are 1 and 2. So \(\mathbf v_3\) and \(\mathbf v_4\) are combinations of \(\mathbf v_1,\mathbf v_2\) (in fact \(\mathbf v_3=\tfrac45\mathbf v_1+\tfrac15\mathbf v_2\) and \(\mathbf v_4=2\mathbf v_1-\mathbf v_2\)), and \(\{\mathbf v_1,\mathbf v_2\}\) is a basis for \(W\).

3.4 Bases for \(\operatorname{Nul} A\), \(\operatorname{Col} A\) and \(\operatorname{Row} A\)

The method for writing \(\operatorname{Nul} A\) as a span (free variables as weights) always gives a linearly independent set. So when \(\operatorname{Nul} A\neq\{\mathbf 0\}\), it gives a basis for \(\operatorname{Nul} A\). For the other two subspaces we use the next two theorems.

Theorem 6 The pivot columns of a matrix \(A\) form a basis for \(\operatorname{Col} A\).
Theorem 7 If two matrices \(A\) and \(B\) are row equivalent, then their row spaces are the same. If \(B\) is in echelon form, the nonzero rows of \(B\) form a basis for the row space of \(A\) as well as for that of \(B\).
Example 7 (all three bases from one row reduction)

The matrix \(A\) below is row equivalent to the reduced echelon form \(B\):

\[A=\begin{bmatrix} 1 & 4 & 0 & 2 & -1\\ 3 & 12 & 1 & 5 & 5\\ 2 & 8 & 1 & 3 & 2\\ 5 & 20 & 2 & 8 & 8\end{bmatrix}\sim B=\begin{bmatrix} 1 & 4 & 0 & 2 & 0\\ 0 & 0 & 1 & -1 & 0\\ 0 & 0 & 0 & 0 & 1\\ 0 & 0 & 0 & 0 & 0\end{bmatrix}.\]

Find bases for \(\operatorname{Col} A\), \(\operatorname{Row} A\) and \(\operatorname{Nul} A\).

Solution

Col A. The pivots of \(B\) are in columns 1, 3, 5. In \(B\) we read off \(\mathbf b_2=4\mathbf b_1\) and \(\mathbf b_4=2\mathbf b_1-\mathbf b_3\). The columns of \(A\) satisfy the same relations: \(\mathbf a_2=4\mathbf a_1\) and \(\mathbf a_4=2\mathbf a_1-\mathbf a_3\) (check: \(2(1,3,2,5)-(0,1,1,2)=(2,5,3,8)=\mathbf a_4\)). The pivot columns of \(A\) form a basis:

\[\operatorname{Col} A:\ \left\{\begin{bmatrix} 1\\ 3\\ 2\\ 5\end{bmatrix},\ \begin{bmatrix} 0\\ 1\\ 1\\ 2\end{bmatrix},\ \begin{bmatrix} -1\\ 5\\ 2\\ 8\end{bmatrix}\right\}.\]

Row A. By Theorem 7, the nonzero rows of \(B\) form a basis:

\[\operatorname{Row} A:\ \{(1,4,0,2,0),\ (0,0,1,-1,0),\ (0,0,0,0,1)\}.\]

Nul A. From \(B\): \(x_2,x_4\) are free, \(x_1=-4x_2-2x_4\), \(x_3=x_4\), \(x_5=0\). So

\[\mathbf x=x_2\begin{bmatrix} -4\\ 1\\ 0\\ 0\\ 0\end{bmatrix}+x_4\begin{bmatrix} -2\\ 0\\ 1\\ 1\\ 0\end{bmatrix},\qquad \operatorname{Nul} A:\ \{(-4,1,0,0,0),\ (-2,0,1,1,0)\}.\]
Columns of \(A\), rows of \(B\)

For \(\operatorname{Col} A\), use the pivot columns of \(A\) itself, not the columns of the echelon form. Row operations change the column space: in Example 7 every column of \(B\) has last entry 0, while \(\mathbf a_1=(1,3,2,5)\) does not, so the columns of \(B\) do not even lie in \(\operatorname{Col} A\).

Example 8 (a basis for a plane)

Find a basis for the plane \(H=\{(x,y,z): x-3y+2z=0\}\) in \(\mathbb R^3\).

Solution

\(H=\operatorname{Nul}\begin{bmatrix} 1 & -3 & 2\end{bmatrix}\). The matrix is already in reduced echelon form; \(y,z\) are free and \(x=3y-2z\):

\[\begin{bmatrix} x\\ y\\ z\end{bmatrix}=y\begin{bmatrix} 3\\ 1\\ 0\end{bmatrix}+z\begin{bmatrix} -2\\ 0\\ 1\end{bmatrix}.\]

A basis for \(H\) is \(\{(3,1,0),\ (-2,0,1)\}\). Check: \(3-3+0=0\) and \(-2-0+2=0\).

Exercise 3.C (three bases for one matrix)

Self-check only. Several answers are correct; the check tests whether your vectors form a basis of each subspace.

Let \(A=\begin{bmatrix} 1 & 2 & 0 & 3\\ 2 & 4 & 1 & 4\\ -1 & -2 & 3 & -9\end{bmatrix}\). An echelon form of \(A\) is \(\begin{bmatrix} 1 & 2 & 0 & 3\\ 0 & 0 & 1 & -2\\ 0 & 0 & 0 & 0\end{bmatrix}\).

(a) A basis for \(\operatorname{Col} A\), entered as the two columns:
\(\operatorname{Col} A\):
(b) A basis for \(\operatorname{Row} A\), entered as the two rows:
\(\operatorname{Row} A\):
(c) A basis for \(\operatorname{Nul} A\), entered as the two columns:
\(\operatorname{Nul} A\):
(a) The pivots are in columns 1 and 3, so the basis is columns 1 and 3 of \(A\): \(\{(1,2,-1),\ (0,1,3)\}\).
(b) The nonzero rows of the echelon form: \(\{(1,2,0,3),\ (0,0,1,-2)\}\).
(c) The echelon form is already reduced. \(x_2,x_4\) are free, \(x_1=-2x_2-3x_4\), \(x_3=2x_4\): \(\{(-2,1,0,0),\ (-3,0,2,1)\}\).
Exercise 3.D (a basis for a plane)

Self-check only. Several answers are correct.

Find a basis for the plane \(\{(x,y,z): x-2y+3z=0\}\). Enter the two vectors as columns.
\([\,\mathbf u\ \ \mathbf v\,]=\)
\(x=2y-3z\) with \(y,z\) free: \((x,y,z)=y(2,1,0)+z(-3,0,1)\). A basis is \(\{(2,1,0),\ (-3,0,1)\}\).

3.5 Two views of a basis

A basis is as small as possible and as large as possible
(a) A basis is a spanning set that is as small as possible: removing any vector from a basis destroys the spanning property.
(b) A basis is a linearly independent set that is as large as possible: adding any vector of \(V\) to a basis makes the set linearly dependent.

Homework 9

Instructions
  • Fill in your name and surname below before you save the PDF.
  • Show your work. For each step, name the property, the row operation or the reason you use. An answer without the steps that lead to it does not receive full credit.
  • Every question has two answer modes: Type and Write by hand. In Write by hand mode the text boxes are replaced by a writing area where you can write with a pen, your finger or the mouse. For each question, only the answer of the selected mode goes into the PDF. Changing the mode does not delete what you entered in the other mode.
  • In Type mode, write a vector as (1, -2, 3) and a matrix as [1 2; 3 4] (rows separated by semicolons).
  • To submit: press "Save homework as PDF", choose "Save as PDF" in the print dialog, and upload the file to Canvas.
  • Your answers are saved automatically in this browser. If you open the page on a different computer or browser, they will not be there.

Question 115 points

Decide whether each set is a subspace of the given vector space. If it is, justify it (check the three properties, or write the set as a span or as a null space). If it is not, give a specific counterexample. Each part is worth 5 points.

(a) \(H_1=\{(x,y,z): x-2y+4z=0\}\) in \(\mathbb R^3\)
(b) \(H_2=\{(x,y): y=x^3\}\) in \(\mathbb R^2\)
(c) \(H_3=\{(a+2b,\ a-b,\ 3b,\ a) : a,b \text{ real}\}\) in \(\mathbb R^4\)

Question 220 points

Let

\[A=\begin{bmatrix} 1 & -2 & 0 & 3 & -1\\ -2 & 4 & 1 & -8 & 6\\ 3 & -6 & 2 & 5 & 5\end{bmatrix}.\]
(a) Find a spanning set for \(\operatorname{Nul} A\). Enter \([\,A\mid\mathbf 0\,]\) in the first grid and write each row operation (for example R2 -> R2 + 2R1) and the new matrix. Then write the general solution as a combination of vectors with the free variables as weights. (9 points)
(b) Decide whether \(\mathbf u_1=(3,1,-4,0,1)\) and \(\mathbf u_2=(1,1,1,1,1)\) are in \(\operatorname{Nul} A\). (3 points)
(c) Find all values of \(h\) for which \(\mathbf w=(1,2,h)\) is in \(\operatorname{Col} A\). (5 points)
(d) \(\operatorname{Nul} A\) is a subspace of \(\mathbb R^k\) and \(\operatorname{Col} A\) is a subspace of \(\mathbb R^\ell\). Give \(k\) and \(\ell\). Is \(\operatorname{Col} A=\mathbb R^\ell\)? Explain. (3 points)

Question 320 points

The transformation \(T:M_{2\times 2}\to\mathbb R^2\) defined by \(T\left(\begin{bmatrix} a & b\\ c & d\end{bmatrix}\right)=\begin{bmatrix} a+d\\ b+c\end{bmatrix}\) is linear.

(a) Find the kernel of \(T\) and give a basis for it. (8 points)
(b) Find a matrix \(A\) with \(T(A)=(3,1)\). Is the range of \(T\) all of \(\mathbb R^2\)? Explain. (7 points)
(c) Is the set \(\{A \text{ in } M_{2\times 2} : T(A)=(1,0)\}\) a subspace of \(M_{2\times 2}\)? Explain. (5 points)

Question 420 points

Let

\[A=\begin{bmatrix} 1 & 3 & 0 & 0 & -2\\ 2 & 6 & 1 & 0 & -3\\ -1 & -3 & 1 & 1 & 6\\ 1 & 3 & 2 & -1 & -3\end{bmatrix}.\]
(a) Row reduce \(A\) to reduced echelon form. Enter \(A\) in the first grid and write each row operation and the new matrix. (6 points)
(b) Give a basis for \(\operatorname{Col} A\). Explain why you chose these vectors. (5 points)
(c) Give a basis for \(\operatorname{Row} A\). (4 points)
(d) Give a basis for \(\operatorname{Nul} A\). (5 points)

Question 525 points

(a) For which values of \(h\) is \(\{(1,2,-1),\ (0,1,h),\ (2,3,1)\}\) a basis for \(\mathbb R^3\)? (7 points)
(b) Let \(\mathbf v_1=(1,-1,2)\), \(\mathbf v_2=(1,-2,1)\), \(\mathbf v_3=(0,1,1)\), \(\mathbf v_4=(3,-1,8)\) and \(W=\operatorname{Span}\{\mathbf v_1,\mathbf v_2,\mathbf v_3,\mathbf v_4\}\). Find a basis for \(W\) that consists of some of the vectors \(\mathbf v_i\). Write each of the other vectors as a combination of your basis vectors. (7 points)
(c) Let \(S\) be the set of \(2\times 2\) matrices of the form \(\begin{bmatrix} a & b\\ 0 & a\end{bmatrix}\). Find a basis for \(S\). (5 points)
(d) True or false? Justify each answer. (6 points)
(i) If \(\{\mathbf v_1,\mathbf v_2,\mathbf v_3\}\) spans a vector space \(V\) and \(\mathbf v_3=\mathbf v_1-\mathbf v_2\), then \(\{\mathbf v_1,\mathbf v_2\}\) spans \(V\).
(ii) The pivot columns of an echelon form of \(A\) form a basis for \(\operatorname{Col} A\).