Arrows, polynomials, matrices and functions all obey the same ten rules for adding and scaling. Any set that does is a vector space โ and a subspace is a part of one that is closed under both operations.
In Chapter 4 a vector was an arrow, or a list of numbers $(v_1,\dots,v_n)$. But look at what we actually did with vectors: we added them and multiplied them by numbers, and we used a handful of rules โ $\mathbf{u}+\mathbf{v}=\mathbf{v}+\mathbf{u}$, $c(\mathbf{u}+\mathbf{v})=c\mathbf{u}+c\mathbf{v}$, and so on. Polynomials can be added and scaled by the same rules. So can matrices of a fixed size, sound signals, images, and functions on an interval. Everything we prove using only those rules is therefore true for all of these objects at once.
This section writes the rules down. A set with an addition and a scalar multiplication that obey them is called a vector space. Most of the vector spaces we meet live inside bigger ones โ a plane through the origin inside $\mathbb{R}^3$, the symmetric matrices inside all $2\times2$ matrices, the solutions of $A\mathbf{x}=\mathbf{0}$ inside $\mathbb{R}^n$. These are subspaces, and a short three-point test tells us when we have one.
The Vector-Space Axioms
Throughout this chapter the scalars are real numbers. The objects in $V$ are called vectors whatever they really are โ arrows, polynomials or matrices โ and we write them in bold.
๐ Definition 5.1 โ Vector space
A vector space is a nonempty set $V$ together with two operations, addition (which combines $\mathbf{u},\mathbf{v}\in V$ into $\mathbf{u}+\mathbf{v}$) and scalar multiplication (which combines $c\in\mathbb{R}$ and $\mathbf{u}\in V$ into $c\mathbf{u}$), such that for all $\mathbf{u},\mathbf{v},\mathbf{w}\in V$ and all scalars $c,d\in\mathbb{R}$:
1. Closed under addition$\mathbf{u}+\mathbf{v}$ is in $V$.
4. Zero vectorThere is a vector $\mathbf{0}\in V$ with $\mathbf{u}+\mathbf{0}=\mathbf{u}$ for every $\mathbf{u}$.
5. Additive inversesFor each $\mathbf{u}$ there is $-\mathbf{u}\in V$ with $\mathbf{u}+(-\mathbf{u})=\mathbf{0}$.
6. Closed under scalar multiplication$c\mathbf{u}$ is in $V$.
7. Distributive over vectors$c(\mathbf{u}+\mathbf{v})=c\mathbf{u}+c\mathbf{v}$.
8. Distributive over scalars$(c+d)\mathbf{u}=c\mathbf{u}+d\mathbf{u}$.
9. Associative for scalars$c(d\mathbf{u})=(cd)\mathbf{u}$.
10. Identity$1\mathbf{u}=\mathbf{u}$.
These ten statements are the axioms of a vector space. Axioms 1 and 6 say the set is closed: adding or scaling never takes us outside $V$.
Here are the vector spaces we shall use again and again. In each one the operations are the "obvious" ones, and every axiom follows from the ordinary algebra of real numbers applied entry by entry or coefficient by coefficient.
$\mathbb{R}^n$Column vectors $\begin{bmatrix}x_1\\ \vdots\\ x_n\end{bmatrix}$, added and scaled componentwise. Zero vector $(0,\dots,0)$.
$P_n$Polynomials $a_0+a_1x+\dots+a_nx^n$ of degree at most $n$ (including the zero polynomial), added and scaled coefficient by coefficient.
$M_{m\times n}$All $m\times n$ real matrices with matrix addition and scalar multiplication. Zero vector: the zero matrix $O$.
Functions on $[a,b]$All real functions $f$ on an interval, with $(f+g)(x)=f(x)+g(x)$ and $(cf)(x)=c\,f(x)$. Zero vector: the function that is $0$ everywhere.
A sampled signal โ say the $8$ sound-pressure readings in one millisecond of audio โ is simply a vector in $\mathbb{R}^8$; a greyscale image of $100\times100$ pixels is a vector in $M_{100\times100}$. Mixing two recordings is vector addition; turning the volume up is scalar multiplication.
๐ Theorem 5.1 โ Basic properties of every vector space
Let $V$ be a vector space, $\mathbf{u}\in V$ and $c\in\mathbb{R}$. Then
(a) $0\mathbf{u}=\mathbf{0}$; (b) $c\mathbf{0}=\mathbf{0}$; (c) $(-1)\mathbf{u}=-\mathbf{u}$; (d) if $c\mathbf{u}=\mathbf{0}$, then $c=0$ or $\mathbf{u}=\mathbf{0}$.
Proof of (a). By axiom 8, $0\mathbf{u}=(0+0)\mathbf{u}=0\mathbf{u}+0\mathbf{u}$. Add $-(0\mathbf{u})$ to both sides (axioms 3, 4, 5): $\mathbf{0}=0\mathbf{u}$. The other parts are proved the same way, using only the axioms โ so they hold for polynomials, matrices and functions as well as for arrows.
โ๏ธ Example 1 โ $P_2$ is a vector space
Let $P_2$ be the set of polynomials $p(x)=a_0+a_1x+a_2x^2$ with real coefficients. Show that $P_2$ is closed under addition and scalar multiplication, identify its zero vector and the negative of $p$, and explain why the remaining axioms hold.
๐ก Show solutionโถ
Closure If $p=a_0+a_1x+a_2x^2$ and $q=b_0+b_1x+b_2x^2$, then $$p+q=(a_0+b_0)+(a_1+b_1)x+(a_2+b_2)x^2,\qquad cp=ca_0+ca_1x+ca_2x^2 .$$ Both have degree at most $2$, so both are in $P_2$ (axioms 1 and 6).
Zero and negatives The zero vector is the zero polynomial $\mathbf{0}=0+0x+0x^2$, since $p+\mathbf{0}=p$. The negative of $p$ is $-p=-a_0-a_1x-a_2x^2$, since $p+(-p)=\mathbf{0}$ (axioms 4 and 5).
The rest Each remaining axiom compares the coefficients of two polynomials, coefficient by coefficient; e.g. axiom 7: the coefficient of $x^k$ in $c(p+q)$ is $c(a_k+b_k)=ca_k+cb_k$, which is the coefficient of $x^k$ in $cp+cq$. These are just the rules of real-number arithmetic, so all ten axioms hold.
Note Adding $p$ and $q$ works exactly like adding the vectors $(a_0,a_1,a_2)$ and $(b_0,b_1,b_2)$ in $\mathbb{R}^3$. In Section 5.5 this observation becomes the idea of coordinates.
To show that something is not a vector space, one failing axiom is enough โ and the best evidence is a concrete counterexample with numbers.
โ๏ธ Example 2 โ A strange scalar multiplication
On $\mathbb{R}^2$ keep the usual addition but define scalar multiplication by $c\odot(x,y)=(cx,\,y)$ (only the first component is scaled). Which axioms fail? Is this a vector space?
๐ก Show solutionโถ
Test axiom 8 Take $\mathbf{u}=(1,1)$ and $c=d=1$. Then $(c+d)\odot\mathbf{u}=2\odot(1,1)=(2,1)$, but $c\odot\mathbf{u}+d\odot\mathbf{u}=(1,1)+(1,1)=(2,2)$. These differ, so axiom 8 fails.
The others Axioms 1โ5 concern only addition, which is the usual one, so they hold. Axiom 6 holds ($(cx,y)\in\mathbb{R}^2$). Axiom 7: $c\odot(\mathbf{u}+\mathbf{v})=(c(x_1+x_2),\,y_1+y_2)=c\odot\mathbf{u}+c\odot\mathbf{v}$ โ. Axiom 9: $c\odot(d\odot\mathbf{u})=(cdx,\,y)=(cd)\odot\mathbf{u}$ โ. Axiom 10: $1\odot(x,y)=(x,y)$ โ.
Conclusion Nine axioms hold, but axiom 8 fails, so this is not a vector space. Every axiom matters.
Subspaces
Checking ten axioms is tedious. Fortunately most interesting vector spaces sit inside a bigger space we already trust, and then only closure needs checking: the other axioms are inherited automatically, because they are already true for all vectors of the big space.
๐ Definition 5.2 โ Subspace
A subspace of a vector space $V$ is a subset $W\subseteq V$ that is itself a vector space under the addition and scalar multiplication of $V$. Every vector space $V$ has the two trivial subspaces $\{\mathbf{0}\}$ and $V$ itself.
๐ Theorem 5.2 โ The subspace test
Let $V$ be a vector space and $W$ a subset of $V$. Then $W$ is a subspace of $V$ if and only if all three of the following hold:
$\mathbf{0}\in W$ (the zero vector of $V$ is in $W$);
if $\mathbf{u}\in W$ and $\mathbf{v}\in W$, then $\mathbf{u}+\mathbf{v}\in W$ (closed under addition);
if $\mathbf{u}\in W$ and $c\in\mathbb{R}$, then $c\mathbf{u}\in W$ (closed under scalar multiplication).
Why. Conditions 2 and 3 are axioms 1 and 6. Axioms 2, 3 and 7โ10 hold in $W$ because they hold for all vectors of $V$. Axiom 4 is condition 1, and axiom 5 holds because $-\mathbf{u}=(-1)\mathbf{u}$ (Theorem 5.1(c)) is in $W$ by condition 3.
๐งญ Problem-solving strategy โ is $W$ a subspace?
Zero first. Does $\mathbf{0}$ satisfy the condition defining $W$? If not, stop: $W$ is not a subspace. (A constant term "$=1$" or "$+1$" is the usual culprit.)
Look for a counterexample. Conditions such as $x\ge0$, $xy=0$, $y=x^2$, "integer entries" or "$\det A=0$" are rarely closed. Try $c=-1$, $c=\tfrac12$, or adding two vectors from different "pieces" of $W$.
Otherwise prove closure in general. Take arbitrary $\mathbf{u},\mathbf{v}\in W$ and $c\in\mathbb{R}$, write down what membership means, and show $\mathbf{u}+\mathbf{v}$ and $c\mathbf{u}$ satisfy the same condition. Numerical examples do not prove closure.
Shortcut. If $W$ is the set of solutions of homogeneous linear equations, or a span (both below), it is automatically a subspace.
โ๏ธ Example 3 โ A plane through the origin
Show that $W=\{(x,y,z)\in\mathbb{R}^3: x-2y+3z=0\}$ is a subspace of $\mathbb{R}^3$. Is $W'=\{(x,y,z): x-2y+3z=4\}$ a subspace?
๐ก Show solutionโถ
Zero $0-2(0)+3(0)=0$, so $\mathbf{0}\in W$.
Addition Let $\mathbf{u}=(u_1,u_2,u_3)$ and $\mathbf{v}=(v_1,v_2,v_3)$ be in $W$, so $u_1-2u_2+3u_3=0$ and $v_1-2v_2+3v_3=0$. Then $$(u_1+v_1)-2(u_2+v_2)+3(u_3+v_3)=(u_1-2u_2+3u_3)+(v_1-2v_2+3v_3)=0+0=0,$$ so $\mathbf{u}+\mathbf{v}\in W$.
Scaling $cu_1-2(cu_2)+3(cu_3)=c(u_1-2u_2+3u_3)=c\cdot0=0$, so $c\mathbf{u}\in W$. By Theorem 5.2, $W$ is a subspace โ geometrically, a plane through the origin.
$W'$ $0-0+0=0\ne4$, so $\mathbf{0}\notin W'$ and $W'$ is not a subspace. It is a parallel plane that misses the origin. (Closure fails too: $(4,0,0)\in W'$ but $2(4,0,0)=(8,0,0)$ gives $8\ne4$.)
โ๏ธ Example 4 โ Three subsets of $\mathbb{R}^2$ that are not subspaces
Explain why each set fails the subspace test: (a) the line $y=\tfrac12x+1$; (b) the first quadrant $Q=\{(x,y):x\ge0,\ y\ge0\}$; (c) the union of the two coordinate axes, $A=\{(x,y): xy=0\}$.
๐ก Show solutionโถ
(a) At $x=0$ the line has $y=1$, so $(0,0)$ is not on it: condition 1 fails. Lines that miss the origin are never subspaces.
(b) $Q$ contains $\mathbf{0}$ and is closed under addition (sums of non-negative numbers are non-negative), but $(1,2)\in Q$ while $(-1)(1,2)=(-1,-2)\notin Q$. Not closed under scalar multiplication.
(c) $A$ contains $\mathbf{0}$ and is closed under scalar multiplication ($xy=0\Rightarrow(cx)(cy)=c^2xy=0$), but $(1,0)\in A$ and $(0,1)\in A$ while $(1,0)+(0,1)=(1,1)$ has $xy=1\ne0$. Not closed under addition.
Lesson Each condition of the test can fail on its own. Try all three sets in Interactive 1 below and watch which arrow leaves the set.
Interactive 1 โ Closure Tester in $\mathbb{R}^2$
The set $W$ is drawn in purple. Two vectors $\mathbf{u},\mathbf{v}$ that lie in $W$ are drawn in blue; their sum $\mathbf{u}+\mathbf{v}$ and the multiple $c\mathbf{u}$ turn green when they stay inside $W$ and red when they escape. Press Play to let $\mathbf{u}$, $\mathbf{v}$ and $c$ wander and count the escapes.
1.5
$\mathbf{u}$, $\mathbf{v}$โ
$\mathbf{0}\in W$?โ
$\mathbf{u}+\mathbf{v}\in W$?โ
$c\mathbf{u}\in W$?โ
escapes (sum / multiple) in trialsโ
โ๏ธ Example 5 โ Subspaces of $M_{2\times2}$ and $P_2$
Decide which are subspaces: (a) the symmetric matrices $S=\{A\in M_{2\times2}: A^{T}=A\}$; (b) the singular matrices $\{A\in M_{2\times2}:\det A=0\}$; (c) $\{p\in P_2: p(1)=0\}$; (d) $\{p\in P_2: p(0)=1\}$.
๐ก Show solutionโถ
(a) Yes $O^{T}=O$. If $A^{T}=A$ and $B^{T}=B$ then $(A+B)^{T}=A^{T}+B^{T}=A+B$ and $(cA)^{T}=cA^{T}=cA$. All three conditions hold, so $S$ is a subspace.
(b) No $\begin{bmatrix}1&0\\0&0\end{bmatrix}$ and $\begin{bmatrix}0&0\\0&1\end{bmatrix}$ both have determinant $0$, but their sum is $I$ with $\det I=1$. Not closed under addition. (It is closed under scaling, since $\det(cA)=c^2\det A$ โ one good condition is not enough.)
(c) Yes The zero polynomial has $\mathbf{0}(1)=0$. If $p(1)=0$ and $q(1)=0$ then $(p+q)(1)=p(1)+q(1)=0$ and $(cp)(1)=c\,p(1)=0$. A subspace.
(d) No The zero polynomial has value $0\ne1$ at $x=0$. Not a subspace (and $p+q$ would have $(p+q)(0)=2$).
Subspaces of $\mathbb{R}^2$ and $\mathbb{R}^3$
If a subspace of $\mathbb{R}^2$ contains a nonzero vector $\mathbf{u}$, it must contain every multiple $c\mathbf{u}$ โ the whole line through $\mathbf{0}$ in the direction of $\mathbf{u}$. If it also contains a vector $\mathbf{v}$ off that line, it contains every $a\mathbf{u}+b\mathbf{v}$, which is all of $\mathbb{R}^2$. So there are only three kinds. The same reasoning one dimension up gives four kinds in $\mathbb{R}^3$:
Subspaces of $\mathbb{R}^2$$\{\mathbf{0}\}$; lines through the origin; $\mathbb{R}^2$ itself.
Subspaces of $\mathbb{R}^3$$\{\mathbf{0}\}$; lines through the origin; planes through the origin; $\mathbb{R}^3$ itself.
(We shall prove that this list is complete in Section 5.3, using the idea of dimension.) Lines and planes that miss the origin are never subspaces, and neither are curved surfaces, half-planes or bounded pieces such as discs.
Interactive 2 โ Subspaces of $\mathbb{R}^3$, Seen From All Sides
An oblique view of $\mathbb{R}^3$ that slowly swings from side to side. Choose a set: the moving green point is a combination of the set's vectors and never leaves a subspace. For the plane that misses the origin, two points $\mathbf{p},\mathbf{q}$ on the plane are added and their sum (red) lands off the plane. Drag the slider to choose the viewing direction.
coefficientsโ
vector shownโ
membership checkโ
subspace?โ
Null Spaces and Spans
Two constructions produce subspaces automatically, and between them they account for almost every subspace in this course. The first comes from a homogeneous system of linear equations.
๐ Theorem 5.3 โ The null space is a subspace
Let $A$ be an $m\times n$ matrix. The null space of $A$,
$$\operatorname{Nul}A=\{\mathbf{x}\in\mathbb{R}^n: A\mathbf{x}=\mathbf{0}\},$$
the set of all solutions of the homogeneous system $A\mathbf{x}=\mathbf{0}$, is a subspace of $\mathbb{R}^n$.
Proof. $A\mathbf{0}=\mathbf{0}$, so $\mathbf{0}\in\operatorname{Nul}A$. If $A\mathbf{u}=\mathbf{0}$ and $A\mathbf{v}=\mathbf{0}$, then $A(\mathbf{u}+\mathbf{v})=A\mathbf{u}+A\mathbf{v}=\mathbf{0}$ and $A(c\mathbf{u})=c(A\mathbf{u})=\mathbf{0}$. Apply Theorem 5.2.
โ ๏ธ Only homogeneous systems
The solution set of $A\mathbf{x}=\mathbf{b}$ with $\mathbf{b}\ne\mathbf{0}$ is never a subspace: $\mathbf{0}$ is not a solution, because $A\mathbf{0}=\mathbf{0}\ne\mathbf{b}$. Geometrically it is the null space shifted away from the origin, like the plane $W'$ of Example 3. Note also that $\operatorname{Nul}A$ lives in $\mathbb{R}^n$ โ the number of columns of $A$ โ not in $\mathbb{R}^m$.
The second construction starts from a few vectors and builds everything that can be made from them.
๐ Definition 5.3 โ Linear combination and span
Let $\mathbf{v}_1,\dots,\mathbf{v}_k$ be vectors in a vector space $V$. A linear combination of them is any vector of the form
$$c_1\mathbf{v}_1+c_2\mathbf{v}_2+\dots+c_k\mathbf{v}_k\qquad(c_1,\dots,c_k\in\mathbb{R}).$$
The set of all such linear combinations is the span of the vectors, written $\operatorname{span}\{\mathbf{v}_1,\dots,\mathbf{v}_k\}$.
๐ Theorem 5.4 โ A span is a subspace
If $\mathbf{v}_1,\dots,\mathbf{v}_k$ are vectors in a vector space $V$, then $W=\operatorname{span}\{\mathbf{v}_1,\dots,\mathbf{v}_k\}$ is a subspace of $V$. It is the smallest subspace of $V$ containing $\mathbf{v}_1,\dots,\mathbf{v}_k$: every subspace that contains them all contains $W$.
Proof. $\mathbf{0}=0\mathbf{v}_1+\dots+0\mathbf{v}_k\in W$. The sum of $\sum c_i\mathbf{v}_i$ and $\sum d_i\mathbf{v}_i$ is $\sum(c_i+d_i)\mathbf{v}_i$, and $a\sum c_i\mathbf{v}_i=\sum(ac_i)\mathbf{v}_i$ โ both are again linear combinations. Finally, a subspace containing every $\mathbf{v}_i$ is closed under scaling and adding, so it contains every linear combination of them.
โ๏ธ Example 6 โ Describing a null space as a span
Let $A=\begin{bmatrix}1&2&0&-1\\2&4&1&1\end{bmatrix}$. Find vectors that span $\operatorname{Nul}A$.
๐ก Show solutionโถ
Reduce Row reduce $A$ (the zero right-hand side never changes, so we may leave it out): $$\begin{bmatrix}1&2&0&-1\\2&4&1&1\end{bmatrix}\xrightarrow{R_2\to R_2-2R_1}\begin{bmatrix}1&2&0&-1\\0&0&1&3\end{bmatrix}.$$ This is already in reduced row echelon form, with pivots in columns $1$ and $3$.
Solve The free variables are $x_2=s$ and $x_4=t$. The rows say $x_1+2x_2-x_4=0$ and $x_3+3x_4=0$, so $x_1=-2s+t$ and $x_3=-3t$.
Vector form $$\mathbf{x}=\begin{bmatrix}-2s+t\\s\\-3t\\t\end{bmatrix}=s\begin{bmatrix}-2\\1\\0\\0\end{bmatrix}+t\begin{bmatrix}1\\0\\-3\\1\end{bmatrix},\qquad\text{so}\qquad\operatorname{Nul}A=\operatorname{span}\left\{\begin{bmatrix}-2\\1\\0\\0\end{bmatrix},\begin{bmatrix}1\\0\\-3\\1\end{bmatrix}\right\}.$$
Check $A\begin{bmatrix}-2\\1\\0\\0\end{bmatrix}=\begin{bmatrix}-2+2\\-4+4\end{bmatrix}=\mathbf{0}$ and $A\begin{bmatrix}1\\0\\-3\\1\end{bmatrix}=\begin{bmatrix}1-1\\2-3+1\end{bmatrix}=\mathbf{0}$. โ Each free variable contributes one spanning vector.
In $\mathbb{R}^3$ the span of one nonzero vector is a line through the origin, and the span of two vectors that do not lie on a common line is a plane through the origin. For instance $\operatorname{span}\{(1,0,1),(0,1,1)\}$ is the plane $x+y-z=0$ of Interactive 2: both vectors satisfy the equation, so every combination does too. Section 5.2 asks the natural next questions โ is a given vector in a span? and which vectors in a spanning list are really needed?
Exercises
I
Is the set, with the operations given, a vector space? If not, name one axiom that fails and give a numerical counterexample.
1 $M_{2\times3}$, all $2\times3$ real matrices, with the usual matrix operations.
2 The polynomials of degree exactly $2$, with the usual operations.
3 The positive real numbers, with ordinary addition and ordinary multiplication by real scalars.
4 $\{(x,2x): x\in\mathbb{R}\}$ with the usual operations of $\mathbb{R}^2$.
5 $\mathbb{R}^2$ with the usual addition and $c\odot(x,y)=(0,0)$ for every $c$.
6 $\mathbb{R}^2$ with $(x_1,y_1)\oplus(x_2,y_2)=(x_1+x_2,\,0)$ and the usual scalar multiplication.
7 All functions $f:\mathbb{R}\to\mathbb{R}$ with $f(0)=0$, with the usual operations on functions.
8 The invertible $2\times2$ matrices, with the usual operations.
๐ก Show solutionsโถ
1 Yes. Sums and multiples of $2\times3$ matrices are $2\times3$ matrices; the zero vector is the $2\times3$ zero matrix and every axiom holds entry by entry.
2 No. Not closed under addition: $x^2$ and $-x^2+1$ have degree $2$, but their sum $1$ has degree $0$. Also the zero polynomial is missing (axiom 4).
3 No. Not closed under scalar multiplication: $(-1)\cdot2=-2$ is not positive. There is also no zero vector ($0$ is not positive).
4 Yes. $(a,2a)+(b,2b)=(a+b,\,2(a+b))$ and $c(a,2a)=(ca,\,2(ca))$ stay in the set, and $(0,0)$ is in it; it is a subspace of $\mathbb{R}^2$ (the line $y=2x$), hence a vector space.
6 No. Axiom 4 fails: we would need $\mathbf{z}$ with $(1,1)\oplus\mathbf{z}=(1,1)$, but $(1,1)\oplus\mathbf{z}$ always has second component $0$. (Axiom 2 holds; axiom 8 also fails: $2(1,1)=(2,2)$ but $(1,1)\oplus(1,1)=(2,0)$.)
7 Yes. It is a subspace of the space of all functions: the zero function has $0(0)=0$; $(f+g)(0)=0+0=0$; $(cf)(0)=c\cdot0=0$.
8 No. The zero matrix $O$ is not invertible, so axiom 4 fails; and $I+(-I)=O$ shows it is not closed under addition.
II
Use the subspace test (Theorem 5.2). Prove closure in general, or give a numerical counterexample.
1 $W=\{(x,y): y=3x\}$ in $\mathbb{R}^2$
2 $W=\{(x,y): y=3x+1\}$ in $\mathbb{R}^2$
3 $W=\{(x,y): xy\ge0\}$ in $\mathbb{R}^2$ (first and third quadrants with the axes)
4 $W=\{(x,y,z): z=x+y\}$ in $\mathbb{R}^3$
5 $W=\{(x,y,z): x=0\text{ and }y=2z\}$ in $\mathbb{R}^3$
6 $W=\{(x,y,z): x^2+y^2=z^2\}$ in $\mathbb{R}^3$ (a double cone)
7 $W=\{(a,b,c): a,b,c\text{ are integers}\}$ in $\mathbb{R}^3$
8 The upper-triangular matrices $\left\{\begin{bmatrix}a&b\\0&d\end{bmatrix}\right\}$ in $M_{2\times2}$
9 $\{A\in M_{2\times2}:\operatorname{tr}A=0\}$
10 $\{A\in M_{2\times2}: A^2=A\}$
11 $\{p\in P_2: p(0)=0\}$
12 $\{p\in P_2: p(1)=p(2)\}$
13 $\{p\in P_2: p(0)\,p(1)=0\}$
14 (uses calculus) The differentiable functions $f$ on $\mathbb{R}$ with $f'(x)=2f(x)$ for all $x$, inside the space of all functions on $\mathbb{R}$.
๐ก Show solutionsโถ
1 Subspace. $0=3\cdot0$; if $y_1=3x_1$, $y_2=3x_2$ then $y_1+y_2=3(x_1+x_2)$ and $cy_1=3(cx_1)$. (A line through the origin.)
2 Not a subspace: $(0,0)$ gives $0\ne1$.
3 Not a subspace. It contains $\mathbf{0}$ and is closed under scaling ($c^2xy\ge0$), but $(2,1)+(-1,-2)=(1,-1)$ has $xy=-1\lt0$.
4 Subspace. $0=0+0$; if $z_1=x_1+y_1$ and $z_2=x_2+y_2$ then $z_1+z_2=(x_1+x_2)+(y_1+y_2)$ and $cz_1=cx_1+cy_1$. (It is $\operatorname{Nul}\begin{bmatrix}1&1&-1\end{bmatrix}$, a plane.)
5 Subspace. It is the null space of $\begin{bmatrix}1&0&0\\0&1&-2\end{bmatrix}$ โ a line through the origin, $\operatorname{span}\{(0,2,1)\}$.
6 Not a subspace. $(1,0,1)$ and $(0,1,1)$ lie on the cone, but their sum $(1,1,2)$ has $x^2+y^2=2\ne4=z^2$.
7 Not a subspace: $(1,0,0)\in W$ but $\tfrac12(1,0,0)=(\tfrac12,0,0)\notin W$.
8 Subspace. $O$ is upper triangular, and sums and multiples of matrices with lower-left entry $0$ still have lower-left entry $0$.
9 Subspace. $\operatorname{tr}O=0$, $\operatorname{tr}(A+B)=\operatorname{tr}A+\operatorname{tr}B=0$ and $\operatorname{tr}(cA)=c\operatorname{tr}A=0$.
10 Not a subspace: $I^2=I$, but $(2I)^2=4I\ne2I$.
11 Subspace. The zero polynomial vanishes at $0$; $(p+q)(0)=p(0)+q(0)=0$; $(cp)(0)=c\,p(0)=0$.
12 Subspace. Writing the condition as $p(1)-p(2)=0$: the zero polynomial satisfies it, and $(p+q)(1)-(p+q)(2)=[p(1)-p(2)]+[q(1)-q(2)]=0$, $(cp)(1)-(cp)(2)=c[p(1)-p(2)]=0$.
13 Not a subspace. $p=x$ (with $p(0)=0$) and $q=1-x$ (with $q(1)=0$) are both in the set, but $p+q=1$ has $p(0)p(1)=1\ne0$.
14 Subspace. The zero function satisfies $0'=0=2\cdot0$. If $f'=2f$ and $g'=2g$, then $(f+g)'=f'+g'=2(f+g)$ and $(cf)'=cf'=2(cf)$. (These are the functions $Ce^{2x}$ โ a line through the origin in function space.)
III
Null spaces and spans.
1 Find vectors that span $\operatorname{Nul}A$ for $A=\begin{bmatrix}1&-1&2\\2&-2&4\end{bmatrix}$.
2 Find vectors that span $\operatorname{Nul}A$ for $A=\begin{bmatrix}1&0&2\\0&1&-1\\1&1&1\end{bmatrix}$.
3 Find $\operatorname{Nul}A$ for $A=\begin{bmatrix}1&2\\3&4\end{bmatrix}$.
4 Find vectors that span $\operatorname{Nul}A$ for $A=\begin{bmatrix}1&2&0&1\\0&0&1&-2\end{bmatrix}$.
5 Is $\mathbf{x}=(2,1,0)$ in $\operatorname{Nul}A$ for $A=\begin{bmatrix}1&-2&5\\3&-6&1\end{bmatrix}$?
6 Describe $\operatorname{span}\{(1,2)\}$ in $\mathbb{R}^2$ geometrically and by an equation.
7 Show that $\operatorname{span}\{(1,1,0),(0,1,1)\}$ lies in the plane $x-y+z=0$.
8 Is the solution set of $x+y+z=1$ a subspace of $\mathbb{R}^3$? What about $x+y+z=0$?
Check: the reduced matrix, a spanning set for Nul A, and Aยทv = 0 for each vector
๐ก Show solutionsโถ
1 $R_2\to R_2-2R_1$ gives $\begin{bmatrix}1&-1&2\\0&0&0\end{bmatrix}$. With $x_2=s$, $x_3=t$: $x_1=s-2t$, so $\operatorname{Nul}A=\operatorname{span}\{(1,1,0),(-2,0,1)\}$ โ a plane in $\mathbb{R}^3$.
2 $R_3\to R_3-R_1$, then $R_3\to R_3-R_2$: $\begin{bmatrix}1&0&2\\0&1&-1\\0&0&0\end{bmatrix}$. With $x_3=t$: $x_1=-2t$, $x_2=t$, so $\operatorname{Nul}A=\operatorname{span}\{(-2,1,1)\}$ โ a line.
3 $R_2\to R_2-3R_1$ gives $\begin{bmatrix}1&2\\0&-2\end{bmatrix}$: two pivots and no free variables, so the only solution is $\mathbf{x}=\mathbf{0}$ and $\operatorname{Nul}A=\{\mathbf{0}\}$.
6 All multiples $(t,2t)$: the line through the origin with slope $2$, i.e. $y=2x$.
7 Both vectors satisfy the equation: $1-1+0=0$ and $0-1+1=0$. The plane $x-y+z=0$ is a subspace (a null space), so it contains every linear combination of them (Theorem 5.4).
8 $x+y+z=1$: no, $\mathbf{0}$ does not satisfy it. $x+y+z=0$: yes, it is $\operatorname{Nul}\begin{bmatrix}1&1&1\end{bmatrix}$, a plane through the origin.
IV
Applications and proofs.
1Weather data. A week of temperature readings is a vector $\mathbf{t}=(t_1,\dots,t_7)\in\mathbb{R}^7$. A "deviation pattern" is one whose readings add up to $0$. Show that the deviation patterns form a subspace of $\mathbb{R}^7$.
2Mixing. A paint shop records a mix as the vector of litres used of $3$ base colours, so every real mix has non-negative entries. Is the set of real mixes a subspace of $\mathbb{R}^3$? Explain which condition fails.
3Electrical circuits. At a junction, current $i_1$ (in amperes) flows in and currents $i_2$ and $i_3$ flow out, so Kirchhoff's current law says $i_1-i_2-i_3=0$. Show that the allowed $(i_1,i_2,i_3)$ form a subspace of $\mathbb{R}^3$ and find two vectors that span it.
4 Prove that if $U$ and $W$ are subspaces of $V$, then $U\cap W$ is a subspace. Use Example 4(c) to show that $U\cup W$ need not be.
5 Let $W$ be a subspace of $V$, $\mathbf{u}\in W$ and $\mathbf{v}\notin W$. Prove that $\mathbf{u}+\mathbf{v}\notin W$.
6Challenge. Show that a line $\{\mathbf{p}+t\mathbf{d}: t\in\mathbb{R}\}$ in $\mathbb{R}^3$ (with $\mathbf{d}\ne\mathbf{0}$) is a subspace if and only if it passes through the origin.
๐ก Show solutionsโถ
1 The set is $\operatorname{Nul}\begin{bmatrix}1&1&1&1&1&1&1\end{bmatrix}$, so it is a subspace by Theorem 5.3. Directly: $0+\dots+0=0$; if $\sum t_i=0$ and $\sum s_i=0$ then $\sum(t_i+s_i)=0$ and $\sum ct_i=0$.
2 No. It contains $\mathbf{0}$ and is closed under addition, but not under scalar multiplication: $(-1)(2,1,0)=(-2,-1,0)$ has negative entries. (Such a set is called a cone; it is not a subspace.)
3 The set is $\operatorname{Nul}\begin{bmatrix}1&-1&-1\end{bmatrix}$, a subspace. With $i_2=s$, $i_3=t$: $i_1=s+t$, so it is $\operatorname{span}\{(1,1,0),(1,0,1)\}$ โ "all current goes out through branch 2" and "all through branch 3", and every allowed flow is a mixture of the two.
4 $\mathbf{0}$ is in both, so in $U\cap W$. If $\mathbf{u},\mathbf{v}\in U\cap W$ then $\mathbf{u}+\mathbf{v}$ and $c\mathbf{u}$ are in $U$ (a subspace) and in $W$ (a subspace), so in $U\cap W$. The two axes $U=\{(x,0)\}$ and $W=\{(0,y)\}$ are subspaces of $\mathbb{R}^2$, but their union is the set $A$ of Example 4(c), which is not closed under addition.
5 Suppose $\mathbf{u}+\mathbf{v}\in W$. Since $-\mathbf{u}=(-1)\mathbf{u}\in W$, closure gives $(\mathbf{u}+\mathbf{v})+(-\mathbf{u})=\mathbf{v}\in W$ โ a contradiction. So $\mathbf{u}+\mathbf{v}\notin W$.
6 If the line passes through $\mathbf{0}$, then $\mathbf{0}=\mathbf{p}+t_0\mathbf{d}$, so $\mathbf{p}=-t_0\mathbf{d}$ and the line is $\{(t-t_0)\mathbf{d}\}=\operatorname{span}\{\mathbf{d}\}$, a subspace. Conversely a subspace must contain $\mathbf{0}$, so the line passes through the origin.
๐ฌ ResearchโTeaching NexusResearch-tutored ยท optional, about 30 minutes
Research question. In a water-distribution network with no taps open, which patterns of pipe flow are physically possible โ and how many "independent loops" describe them all?
Why it matters. Water utilities, electricity grids and traffic engineers all model networks by conservation laws: at every junction, what flows in must flow out. The possible flows are exactly the null space of the network's incidence matrix, so they form a subspace โ any two possible flow patterns can be added, and any pattern can be scaled.
What to do.
Sample case: junctions $1,2,3,4$ joined by pipes $e_1:1\to2$, $e_2:2\to3$, $e_3:3\to4$, $e_4:4\to1$ and a cross-pipe $e_5:1\to3$ (arrows give the positive direction; a negative flow runs backwards).
Build the $4\times5$ incidence matrix $N$: in column $j$, put $-1$ in the row of the junction pipe $e_j$ leaves and $+1$ in the row it enters. Explain why "flow in equals flow out at every junction" is the system $N\mathbf{f}=\mathbf{0}$.
Row reduce $N$ and find vectors that span $\operatorname{Nul}N$. Interpret each spanning vector as water circulating round a closed loop of pipes.
Check that the loop $1\to2\to3\to1$ (using $e_5$ backwards) is a combination of your spanning vectors.
Tools: Pencil and paper; optionally any matrix calculator or Python/sympy to check the row reduction.
Hand in: A half-page note with the matrix $N$, a spanning set for its null space, a sketch of the loops, and one sentence on why the flow patterns form a subspace while "flows that deliver 5 litres per second to junction 3" do not.
Going further. Find a map of a real network โ a city's ring roads, a campus heating loop, or a regional power grid โ and count its junctions $J$ and links $L$. For a connected network the number of independent loops is $L-J+1$; check this against the size of your spanning set.
Instructor note: $N=\begin{bmatrix}-1&0&0&1&-1\\1&-1&0&0&0\\0&1&-1&0&1\\0&0&1&-1&0\end{bmatrix}$ has rank $3$, so two free variables; one spanning set is $(1,1,1,1,0)$ (the outer loop) and $(0,0,1,1,1)$ (the loop $1\to3\to4\to1$). The loop $1\to2\to3\to1$ is $(1,1,0,0,-1)$, their difference. $L-J+1=5-4+1=2$. โ
๐งช Self-check quiz
0/5 correct
Q1. Which of these subsets of $\mathbb{R}^2$ is a subspace?
Q2. The quickest first check that a set $W$ is not a subspace is to see whether
Q3. If $A$ is a $3\times5$ matrix, then $\operatorname{Nul}A$ is a subspace of
Q4. The singular $2\times2$ matrices ($\det A=0$) do not form a subspace of $M_{2\times2}$ because
Q5. In $\mathbb{R}^3$, $\operatorname{span}\{(1,2,3)\}$ is