MATH1231 10,435 words·53 min read

Vector Spaces

6.1 Definitions and examples of Vector Spaces#

To define a vector space, we need a mathematical system which consists of the following four things:

  1. A set VV of elements called "vectors".

  2. A "vector-addition" rule that combines a pair of vectors from VV. This is usually just represented by a +.+. For vectors v,w∈V,\mathbf{v}, \mathbf{w} \in V, you combine them by doing v+w.\mathbf{v} + \mathbf{w}.

  3. A field of scalars, denoted by F\mathbb{F}, where F\mathbb{F} could denote the rational numbers Q\mathbb{Q} or the real numbers R\mathbb{R} or the complex numbers C\mathbb{C}. There are other less common examples too.
    Field axioms for addition, multiplication, inverses, and distributivity

  4. A "multiplication by a scalar" rule for combining a vector from VV and a scalar from F\mathbb{F} to form a vector. This is probably the most confusing one.

    Basically, from the previous 3 rules, you can discern that a vector can have many possible forms (i.e. made up of only 1s and 0s, or of 2 dimensional matrices etc.), hence, a proper way of determining what happens when scalars multiply such vectors must be formed. There cannot be a default way for every vector as its contents may or may not be different per vector type.

    If λ\lambda is a scalar and v\mathbf{v} is an element of VV, then λ∗v\lambda * \mathbf{v} means the result of multiplying v\mathbf{v} by the scalar λ\lambda.

    You can internalise this using these examples:

    • Standard Rule: If VV is a 2D coordinate space and F\mathbb{F} is the real numbers, the rule is λ∗(x,y)=(λx,λy)\lambda * (x,y) = (\lambda x, \lambda y).
    • Matrix Rule: if VV is a set of 2×22 \times 2 matrices, multiplying by a scalar means applying it to all four entries inside the matrix grid.
    • Function rule: If VV is a set of functions, then multiplying a function f(x)f(x) by a scalar λ\lambda creates a brand new function g(x)g(x), defined by the rule g(x)=λ⋅f(x)g(x) = \lambda \cdot f(x).

The system is then denoted by (V,+,∗,F)(V, +,*, \mathbb{F}). Often times we can omit the ∗* if its representation remains obvious.

We can now give a formal definition of a vector space.

Definition of a vector space and its ten axioms

Note:
1. Each of the basic rules is called an axiom
2. The vector −v-\mathbf{v} in axiom 5 and the vector formed by multiplying v\mathbf{v} with the scalar -1 are not the same by definition.
3. Formally, axiom 7 says λ∗(μ∗v)=(λμ)∗v\lambda * (\mu * \mathbf{v}) = (\lambda \mu) * \mathbf{v}.
4. In axiom 9, the addition on the left is the addition of two scalars while the addition on the right is the addition of two vectors. They are different additions.
5. Two vector spaces are only the same when all the four things are the same (V,+,∗,F)(V, +,*, \mathbb{F}). However, different vector spaces with the same set of vectors are rarely discussed, unlike different sets of vectors with the same set of scalars and the same operations.
6. When there is no confusion, we shall simply call (V,+,∗,F)(V, +,*, \mathbb{F}), the vector space VV.

It is very difficult from the definition alone to acquire a good intuitive understanding - a "gut feeling" - for what is meant by a vector space. You need to supplement the definition by a good “rough idea” of what a vector space is. A good rough idea could be:

A vector space is “something where we know how to add objects and multiply objects by numbers, and where the addition and multiplication satisfy ‘sensible’ laws”

Examples of sets which are vector spaces#

Example 1 (The Vector Space Rn\mathbb{R}^n). This represents the set of all vectors of all reals in any nthn\text{th} dimension.

Rn={x:x=(x1⋮xn) for x1,…,xn∈R}.\mathbb{R}^n = \left\{ \mathbf{x} : \mathbf{x} = \begin{pmatrix} x_1 \\ \vdots \\ x_n \end{pmatrix} \text{ for } x_1, \dots, x_n \in \mathbb{R} \right\}.

The set of scalars is simply R\mathbb{R}.
Vector addition is then defined by

(x1⋮xn)+(y1⋮xn)=(x1+y1⋮xn+yn).\begin{pmatrix} x_1 \\ \vdots \\ x_n \end{pmatrix} + \begin{pmatrix} y_1 \\ \vdots \\ x_n \end{pmatrix} = \begin{pmatrix} x_1+y_1 \\ \vdots \\ x_n +y_n\end{pmatrix}.

To prove that it is a vector space, it is necessary to show that all ten axioms listed in the definition are satisfied by the system.

All the axioms are general statements about arbitrary vectors and scalars. We have to prove the axioms are satisfied by any:

u=(u1⋮un),v=(v1⋮vn),w=(w1⋮wn), and λ,μ∈R.\mathbf{u}=\begin{pmatrix} u_1 \\ \vdots \\ u_n \end{pmatrix}, \mathbf{v} = \begin{pmatrix} v_1 \\ \vdots \\ v_n \end{pmatrix}, \mathbf{w}=\begin{pmatrix} w_1 \\ \vdots \\ w_n \end{pmatrix}, \text{ and } \lambda,\mu \in \mathbb{R}.

Lot's of working out to prove all 10 axioms

After we have checked that all ten axioms are satisfied, we can conclude that the system is a vector space, or simply Rn\mathbb{R}^n is a vector space over R\mathbb{R}.

Example 2 (The Vector Space Cn\mathbb{C}^n). The set of vectors similar to example 1 but in the field of the complex numbers.

To prove that this is a vector space it is necessary to show that the ten vector space axioms are satisfied. This proof is formally identical to that for Rn\mathbb{R}^n over R\mathbb{R} since only basic operations are involved.

Example 3 (The Vector Space Mmn=Mmn(R)M_{mn}=M_{mn}(\mathbb{R}) of Real Matrices). This represents a vector made up of matrices of dimensions m,nm,n where every number inside these matrices must be a real number (the scalar field F\mathbb{F} in this case). There is a natural and straightforward generalisation to Mmn(F)M_{mn}(\mathbb{F}), where the entries come from the field F\mathbb{F}.

Note

Set notation for real m by n matrices
Lowk insane notation i couldnt be asked to latex

Example 4 (The Vector Space of Polynomials). This is simply the vector space representing every possible polynomial: x2,3x21+3,12+2x765+9x54355x^2, 3x^{21}+3, 12+2x^{765}+9x^{54355} etc. However it is worth noting that the set of all real-valued functions on R\mathbb{R} can form a vector space, as does the set of all continuous functions (so stuff like sin⁡(x)\sin(x) or exe^x). To represent the set of all real polynomials, you write P(R)\mathbb{P}(\mathbb{R}).

A vector p∈P(R)p \in \mathbb{P}(\mathbb{R}) is the polynomial given by p(x)=a0+a1x+⋯+anxn=∑k=0nakxkp(x) = a_0+a_1x+\dots+a_nx^n=\sum_{k=0}^{n} a_kx^k.
It is important to note that p(x)p(x) is not in considered a vector whilst pp is. In other words, pp is a real-valued function whilst p(x)p(x) is the value of the function at xx.

One more thing to note is that P(R)\mathbb{P}(\mathbb{R}) has infinite dimensions since a polynomial can always have a higher leading coefficient since it is in the field of real numbers. You can generalise the field by simply denoting them as P(F)\mathbb{P}(\mathbb{F}) over a field F\mathbb{F}. I think any field with addition and multiplication by a scalar similarly defined is also a vector space.

For any non-negative integers nn, the subset of all polynomial degrees n or less including the zero polynomial is again a vector space.

Pn(F)={p:p is a polynomial over F,degree of p≤n or p=0}.\mathbb{P}_n(\mathbb{F})=\{p:p\text{ is a polynomial over } \mathbb{F}, \text{degree of } p \leq n \text{ or } p=0\}.

Examples of sets which are NOT vector spaces#

Example 1 (Z3\mathbb{Z}^3, the set of vectors with integer components)
This is simply represented by (x,y,z)(x,y,z), and there are 2 axioms that this set breaks.
Since we have not specified the field of these vectors, the default field for scalar's is usually the real numbers R\mathbb{R}. Looking at Axiom 6, any vector multiplied by any scalar in the field must result in a vector that stays within the original set. However, suppose

λ=0.3,v=(1,2,3)\lambda = 0.3, \mathbf{v}=(1,2,3)

then, λv=(0.3,0.6,0.9)\lambda \mathbf{v} = (0.3,0.6,0.9), since this vector consists of at least one non-integer member, it cannot be in the original set, and thus the space is not closed.

Limiting the scalars to only consist of integers Z\mathbb{Z} fixes our previous problem, however it breaks the very definition of . Since the integers don't have a multiplicative inverse (i.e. there does not exist a number zz in the integers such that zz−1=1z z^-1 = 1), you cannot choose a field to be integers only.

A vector space is fundamentally designed for continuous scaling; you need to be able to stretch or shrink a vector by any microscopic fraction. Because integers are rigid, whole steps, they can't handle being shrunk by fractions, which ruins the geometry required to be a true vector space.

Example 2 (The set of all matrices)
This set is obvious; suppose you have a matrice A23A_{23} and another matrice B32B_{32}, attempting to add them is undefined, breaking the first axiom.

Example 3 (The set of polynomials of degree 3)
This seems like a 180, however, looking closely, the set consists of polynomials only of degree 3. Unlike the definition of Pn(F)\mathbb{P}_n(\mathbb{F}) which allows any polynomial with degree ≤n\leq n, the degree must be precisely nn in this case. This violates Axiom 1 as:

let p(x)=x3+2x,let q(x)=−x3+5,p(x)+q(x)=2x+5\begin{align*} \text{let } p(x) = x^3 + 2x, \\ \text{let } q(x) = -x^3+5, \\ p(x)+q(x)=2x+5 \end{align*}

Since both pp and qq are within the set, performing an addition between the two results in a polynomial outside of the set, hence not being closed. We can generalise this to be true for any nn.

Exercise asking whether real polynomials of exact degrees 3, 17, and n form vector spaces
Answering these,

  • a)
  • b)
    Simply restate it to be less than or equal to each degree in order to be true

6.2 Vector Arithmetic#

The axioms give a minimal set of rules needed to define a vector space. The first five vector space axioms apply to vector addition, and they are in fact identical to the five basic axioms of addition for integers, real numbers and complex numbers. This means that all the arithmetic properties of vector addition are identical to corresponding properties of addition of numbers.

Proposition 1. In any vector space VV, the following properties hold for addition.

  1. Uniqueness of Zero. There is one and only one zero vector.
  2. Cancellation Property. If u,v,w∈V\mathbf{u}, \mathbf{v}, \mathbf{w} \in V satisfy u+v=u+w\mathbf{u} + \mathbf{v} = \mathbf{u} + \mathbf{w}, then v=w\mathbf{v} = \mathbf{w}.
  3. Uniqueness of Negatives. For all v∈V\mathbf{v} \in V, there exists only one w∈V\mathbf{w} \in V such that v+w=0\mathbf{v} + \mathbf{w} = 0

Proof
Four properties of vector addition: unique zero, cancellation, unique negatives, and the negative of zero
Prove (3): Each vector in a vector space only has one negative.
Let v+w=0\mathbf{v} + \mathbf{w} = \mathbf{0} and v+u=0\mathbf{v} + \mathbf{u} = \mathbf{0}. By the axioms of a vector space, we can evaluate w\mathbf{w} as follows:

w=w+0w=w+(v+u)w=(w+v)+uw=0+uw=u■.\begin{align*} \mathbf{w} &= \mathbf{w} + \mathbf{0} \\ \mathbf{w} &= \mathbf{w} + (\mathbf{v} + \mathbf{u}) \\ \mathbf{w} &= (\mathbf{w} + \mathbf{v}) + \mathbf{u} \\ \mathbf{w} &= \mathbf{0} + \mathbf{u} \\ \mathbf{w} &= \mathbf{u} \quad \quad \quad \quad \quad \quad \quad \quad \quad \blacksquare. \end{align*}

Prove (4): The zero vector is its own negative i.e. 0=−0\mathbf{0}=\mathbf{-0}
By the existence of the zero vector, we know that adding 0\mathbf{0} to itself yields:

0+0=0\begin{align*} \mathbf{0} + \mathbf{0} &= \mathbf{0} \end{align*}

By the definition of an additive inverse, the negative of the zero vector, −0-\mathbf{0}, must satisfy:

0+(−0)=0\begin{align*} \mathbf{0} + (-\mathbf{0}) &= \mathbf{0} \end{align*}

Since both expressions equal 0\mathbf{0}, we can equate them:

0+0=0+(−0)\begin{align*} \mathbf{0} + \mathbf{0} &= \mathbf{0} + (-\mathbf{0}) \end{align*}

Because the additive inverse is unique, it must follow that:

0=−0■.\begin{align*} \mathbf{0} &= -\mathbf{0} \quad \quad \quad \quad \blacksquare. \end{align*}

Proposition 2. Suppose that VV is a vector space over a field F\mathbb{F}, λ∈F\lambda \in \mathbb{F}, v∈F,0\mathbf{v} \in \mathbb{F},0 is the zero scalar in F\mathbb{F} and 0\mathbf{0} is the zero vector in VV. Then the following properties hold for multiplication by a scalar:

  1. Multiplication by the zero scalar. 0v=0\mathbf{0} \mathbf{v} = \mathbf{0},
  2. Multiplication of the zero vector. λ0=0.\lambda \mathbf{0}=\mathbf{0}.
  3. Multiplication by −1-1. (−1)v=−v(-1)\mathbf{v}=-\mathbf{v} (the additive inverse of v\mathbf{v}).
  4. Zero Products. If λv=0\lambda \mathbf{v} = \mathbf{0}, then either λ=0\lambda = 0 or v=0\mathbf{v} = \mathbf{0}.
  5. Cancellation Property. If λv=μv\lambda \mathbf{v} = \mu \mathbf{v} and v≠0\mathbf{v} \neq \mathbf{0} then λ=μ\lambda = \mu.

6.3 Subspaces#

Many problems about vectors involve subsets of some vector space, such as the points on a line in Rn\mathbb{R}^n forming a subset of Rn\mathbb{R}^n, or the points on a plane in R3\mathbb{R}^3 form a subset of Rn\mathbb{R}^n.

The question that arises is if a subset of the real-number line is a vector space; for now we will focus on ways to show that a given set is not a vector space.

Example. Suppose you have S=[−5,5]={x∈R:−5≤x≤5}S = [-5,5] = \{x \in \mathbb{R}: -5 \leq x \leq 5 \}, is this a vector space?
Geometrically, the set S represents a line segment.

The given system is not a vector space, since it is not closed under scalar multiplication. A counterexample; 5∈S5 \in S, but 5 + 5 = 10 is not an element of S.

Example. The plane R2\mathbb{R}^2 is a vector space. Show that the subset SS of R2\mathbb{R}^2 given by

S={x=(x1x2)∈R2:x1≥0}S = \left\{ \mathbf{x}= \pmatrix{x_1 \\ x_2} \in \mathbb{R^2}: x_1 \geq 0 \right\}

is not a vector space.

There are several ways to solve this problem since there are several axioms which are not satisfied. One method is to note that (10)∈S\pmatrix{1 \\ 0} \in S, whereas −1(10)=(−10)∉S-1\pmatrix{1 \\ 0} = \pmatrix{-1 \\ 0} \notin S. Hence the set SS is not closed under scalar multiplication and so SS is not a vector space.
Coordinate plane showing S as the shaded half-plane where x1 is nonnegative
Geometric view of S

Example. Let S=p∈P(R):p(2)≥0S = {p\in \mathbb{P(R)} : p(2) \geq 0}. Is SS a vector space?

Suppose p(x)=x2p(x)=x^2, then p∈Sp \in S as p(2)=4≥0p(2)=4 \ge 0, but −p-p is not in SS as −p(2)=−4-p(2)=-4, therefore SS is not a vector space.

  • A common theme here is in showing that a set does not need to contain some region (i.e. negatives), you should always give a specific numerical example. You should do the same when showing that a set is not closed under addition, or not closed under scalar multiplication.

However, you can (sometimes) use these methods to show that something is not a vector space, but you can never use them to show that something is a vector space; (basically some vs all proof in 1081).

So far we have seen that it is usually fairly simple to show that a subset is not a vector space, but it will be time-consuming and tedious to show that a given subset is a vector space by checking all ten axioms. We can leverage the fact that they are subsets to make things simpler.

We first make the following definitions,

Note

Definition
A subset SS of a vector space VV is called a subspace of VV if SS is itself a vector space over the same field of scalars as VV and under the same rules for addition and multiplication by scalars.

In addition if there is at least one vector in VV which is not contained in SS, the subspace SS is called a proper subspace of VV.

A simple test for a subspace is given by the following theorem.

Note

The Subspace Theorem
A subset SS of a vector space VV over a field FF, under the same rules for addition and multiplication by scalars, is a subspace of VV if and only if
i) The vector 0\mathbf{0} in VV also belongs to SS
ii) SS is closed under vector addition, and
iii) SS is closed under multiplication by scalars from F\mathbb{F}.

Proof. If SS is a subspace then it is a vector space.

Suppose SS contains the zero vector and the two closure axioms 1 and 6 are satisfied by elements of SS. Since VV is a vector space, and SS and VV are under the same operations, the vector space axioms 2, 3, 7, 8, 9, 10 are automatically satisfied by all elements of S.

Since SS contains the zero vector, if v∈S\mathbf{v} \in S, then 0+v=0\mathbf{0+v=0} (since this is true in VV and hence in SS, so axiom 4 follows).

Finally, if v∈Sv\in S then v∈Vv\in V . Hence, from part 3 of Proposition 2, we have −v=(−1)v−\mathbf{v} = (−1)\mathbf{v}. But, as SS is closed under multiplication by a scalar, we have (−1)v∈S(−1)\mathbf{v} ∈ S, and hence −v∈S−\mathbf{v} ∈ S. Thus, axiom 5 is satisfied for all vectors in S. The proof is complete.

If we want to check if SS is a subspace of VV, we should first check if the zero vector of VV is in SS. If the zero vector is in SS we can proceed to verify the two closure axioms. Otherwise, we can draw a conclusion that SS is not a subspace of VV. If we have proved that axioms 1, 4 and 6 are true, then axiom 5 also works automatically and need not be checked separately.

Identifying the Subspace#

In order to use the subset theorem, you will need to identify a vector space containing your set SS.
This is where to look: In all the sets below, mm and nn are positive integers and F\mathbb{F} is a field. Usually, F\mathbb{F} is Q\mathbb{Q}, R\mathbb{R}or C\mathbb{C}. Recall:

  • Rn\mathbb{R}^n is a vector space over the field R\mathbb{R}.
  • Cn\mathbb{C}^n is a vector space over the field C\mathbb{C} (and also over the field R\mathbb{R}).
  • P(F)\mathbb{P}(\mathbb{F}), the set of polynomials with coefficients in the field F\mathbb{F}, is a vector space over F\mathbb{F}.
  • Pn(F)\mathbb{P}_n(\mathbb{F}), the set of polynomials of degree at most nn with coefficients in the field F\mathbb{F}, is a vector space over F\mathbb{F}.
  • Mmn(F)M_{mn}(\mathbb{F}), the set of matrices with mm rows and nn columns and with entries in the field F\mathbb{F}, is a vector space over F\mathbb{F}.

Example.
Parallel lines S3 and S4, with S4 passing through the origin

Proof. Since S4S_4 is a subset of the known vector space R2\mathbb{R}^2, we only need to verify the three conditions of the Subspace Theorem to prove it is a vector space.

1. The zero vector is in S4S_4:
Let x⃗=(00)\vec{\mathbf{x}} = \begin{pmatrix} 0 \\ 0 \end{pmatrix}. We test if it satisfies the rule of the set by substituting x1=0x_1 = 0 and x2=0x_2 = 0:

2(0)−3(0)=02(0) - 3(0) = 0

Since the condition is satisfied, the zero vector 0⃗∈S4\vec{\mathbf{0}} \in S_4.

2. Closure under addition:
Let u⃗\vec{\mathbf{u}} and v⃗\vec{\mathbf{v}} be two random vectors in S4S_4. By definition of the set, this means we know as a fact that 2u1−3u2=02u_1 - 3u_2 = 0 and 2v1−3v2=02v_1 - 3v_2 = 0.
We want to test if their sum, u⃗+v⃗=(u1+v1u2+v2)\vec{\mathbf{u}} + \vec{\mathbf{v}} = \begin{pmatrix} u_1 + v_1 \\ u_2 + v_2 \end{pmatrix}, also satisfies the rule of the set.

2(u1+v1)−3(u2+v2)=2u1+2v1−3u2−3v2=(2u1−3u2)+(2v1−3v2)=0+0=0\begin{align*} 2(u_1 + v_1) - 3(u_2 + v_2) &= 2u_1 + 2v_1 - 3u_2 - 3v_2 \\ &= (2u_1 - 3u_2) + (2v_1 - 3v_2) \\ &= 0 + 0 \\ &= 0 \end{align*}

Because the result is 00, the sum vector survives the test, meaning u⃗+v⃗∈S4\vec{\mathbf{u}} + \vec{\mathbf{v}} \in S_4.

3. Closure under scalar multiplication:
Let u⃗∈S4\vec{\mathbf{u}} \in S_4 (so 2u1−3u2=02u_1 - 3u_2 = 0) and let λ\lambda be any real scalar.
We want to test if the scaled vector, λu⃗=(λu1λu2)\lambda\vec{\mathbf{u}} = \begin{pmatrix} \lambda u_1 \\ \lambda u_2 \end{pmatrix}, satisfies the rule.

2(λu1)−3(λu2)=λ(2u1)−λ(3u2)=λ(2u1−3u2)=λ(0)=0\begin{align*} 2(\lambda u_1) - 3(\lambda u_2) &= \lambda(2u_1) - \lambda(3u_2) \\ &= \lambda(2u_1 - 3u_2) \\ &= \lambda(0) \\ &= 0 \end{align*}

Because the result is 00, the scaled vector survives the test, meaning λu⃗∈S4\lambda\vec{\mathbf{u}} \in S_4.

Because S4S_4 contains the zero vector and is closed under both addition and scalar multiplication, it is a valid subspace of R2\mathbb{R}^2, and therefore it is a vector space itself.
■\blacksquare.

Example. Show that S={x∈R2:2x1−3x2=0}S = \left\{\mathbf{x} \in \mathbb{R}^2:2x_1-3x_2=0\right\} is a vector space.
Proof. We can rewrite the equation 2x1−3x2=02x_1-3x_2=0 as x2=23x1x_2=\dfrac{2}{3}x_1, and then let SS be the subset of R2\mathbb{R}^2 defined by vectors of the form (x23x)\begin{pmatrix} x \\ \frac{2}{3}x \end{pmatrix} where x∈Rx \in \mathbb{R}. We can then verify the three subspace conditions.

1. The zero vector is in SS:
If we choose x=0x = 0, the resulting vector in our set is:

(023(0))=(00)\begin{pmatrix} 0 \\ \frac{2}{3}(0) \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \end{pmatrix}

Since we can generate the zero vector, 0⃗∈S\vec{\mathbf{0}} \in S.

2. Closure under addition:
Let u⃗\vec{\mathbf{u}} and v⃗\vec{\mathbf{v}} be two vectors in SS. By definition of the set, they must have the form:

u⃗=(a23a)andv⃗=(b23b)\vec{\mathbf{u}} = \begin{pmatrix} a \\ \frac{2}{3}a \end{pmatrix} \quad \text{and} \quad \vec{\mathbf{v}} = \begin{pmatrix} b \\ \frac{2}{3}b \end{pmatrix}

We add them together:

u⃗+v⃗=(a23a)+(b23b)=(a+b23a+23b)=(a+b23(a+b))\begin{align*} \vec{\mathbf{u}} + \vec{\mathbf{v}} &= \begin{pmatrix} a \\ \frac{2}{3}a \end{pmatrix} + \begin{pmatrix} b \\ \frac{2}{3}b \end{pmatrix} \\ &= \begin{pmatrix} a + b \\ \frac{2}{3}a + \frac{2}{3}b \end{pmatrix} \\ &= \begin{pmatrix} a + b \\ \frac{2}{3}(a + b) \end{pmatrix} \end{align*}

Notice that the bottom component is exactly 23\frac{2}{3} times the top component. Because the sum perfectly matches the required pattern of the set, u⃗+v⃗∈S\vec{\mathbf{u}} + \vec{\mathbf{v}} \in S.

3. Closure under scalar multiplication:
Let u⃗=(a23a)\vec{\mathbf{u}} = \begin{pmatrix} a \\ \frac{2}{3}a \end{pmatrix} be in SS, and let λ\lambda be any real scalar.
We scale the vector:

λu⃗=λ(a23a)=(λaλ(23a))=(λa23(λa))\begin{align*} \lambda\vec{\mathbf{u}} &= \lambda \begin{pmatrix} a \\ \frac{2}{3}a \end{pmatrix} \\ &= \begin{pmatrix} \lambda a \\ \lambda\left(\frac{2}{3}a\right) \end{pmatrix} \\ &= \begin{pmatrix} \lambda a \\ \frac{2}{3}(\lambda a) \end{pmatrix} \end{align*}

Once again, the bottom component is exactly 23\frac{2}{3} times the top component. The scaled vector maintains the pattern, so λu⃗∈S\lambda\vec{\mathbf{u}} \in S.

Since SS contains the zero vector and is closed under addition and scalar multiplication, it is a subspace of R2\mathbb{R}^2.

You can do it both ways; you can rewrite a given equation into a vector form or you can simply just use the equation as in previous examples.

Lemma. A line in Rn\mathbb{R}^n is a subspace if and only if it passes through the origin;
Suppose that SS represents a line in Rn\mathbb{R}^n. If 0∉S\mathbf{0} \notin S, then SS is not a subspace. Hence, a line which does not pass through the origin is not a vector subspace.
If SS is a line through the origin we can write

S={x∈Rn:x=tv,t∈R},S = \left\{ \mathbf{x} \in \mathbb{R}^n : \mathbf{x}=t\mathbf{v}, t \in \mathbb{R}\right\},

where v\mathbf{v} is a fixed non-zero vector in Rn\mathbb{R}^n. To check if SS is a subspace we check the two closure axioms.
Closure under addition. If x1,x2∈S\mathbf{x}_1, \mathbf{x}_2 \in S then

x1=t1vandx2=t2vfor some t1,t2∈R.\mathbf{x}_1 = t_1\mathbf{v} \quad \text{and} \quad \mathbf{x}_2 = t_2\mathbf{v} \quad \text{for some } t_1, t_2 \in \mathbb{R}.

Hence,

x1+x2=(t1+t2)v=t′v,\mathbf{x}_1 + \mathbf{x}_2 = (t_1 + t_2)\mathbf{v} = t'\mathbf{v},

where t′=t1+t2∈Rt' = t_1 + t_2 \in \mathbb{R}. Thus, x1+x2∈S\mathbf{x}_1 + \mathbf{x}_2 \in S, and hence SS is closed under addition.
Closure under multiplication by a scalar. We have

x=tvfor somet∈R,\mathbf{x} = t\mathbf{v} \quad \text{for some} \quad t \in \mathbb{R},

and hence, if λ∈R\lambda \in \mathbb{R},

λx=λ(tv)=(λt)v=t′′v,\lambda\mathbf{x} = \lambda(t\mathbf{v}) = (\lambda t)\mathbf{v} = t''\mathbf{v},

where t′′=λt∈Rt'' = \lambda t \in \mathbb{R}. Hence λx∈S\lambda\mathbf{x} \in S, and thus SS is closed under multiplication by a scalar.
Therefore, by the Subspace Theorem, the line SS is a subspace of Rn\mathbb{R}^n if it passes through the origin. A similar result to that given for lines also holds for planes.

Example. Let SS be the set of polynomials which satisfy all of the following conditions:

  • their coefficients are complex numbers,
  • their degree is at most 7,
  • their second derivative evaluated at x=5x=5 is zero.
    Is SS a vector space over C\mathbb{C}?

Rewriting SS in set notation,

S={p∈P7(C):p′′(5)=0}.S=\left\{ p \in \mathbb{P}_7(\mathbb{C}) : p''(5)=0 \right\}.

By the Subspace Theorem, we only check axioms 1, 4 and 6;
Closure of vector addition:
Suppose p,q∈Sp,q \in S, then p′′(5)=0,q′′(5)=0p''(5) = 0, q''(5)=0, if we let h=p+qh = p + q, then

h′′(5)=p′′(5)+q′′(5)h′′(5)=0+0h′′(5)=0\begin{align*} h''(5)&=p''(5)+q''(5) \\ h''(5) &= 0 + 0 \\ h''(5) &= 0 \end{align*}

meaning that vector addition is closed.

Closure under scalar multiplication:
Suppose p∈Sp\in S, then p′′(5)=0p''(5) = 0, suppose cc is some constant in C\mathbb{C}, and h(x)=c⋅p(x)h(x)=c \cdot p(x), so

h′′(x)=c⋅p′′(x)h′′(5)=c⋅p′′(5)h′′(5)=c⋅0h′′(5)=0.\begin{align*} h''(x)&= c \cdot p''(x) \\ h''(5)&=c \cdot p''(5) \\ h''(5) &= c \cdot 0 \\ h''(5) &= 0. \end{align*}

Therefore, scalar multiplication is also closed (and hence negatives of vectors).

Existence of a 0 vector:
If p∈Sp\in S, p′′(5)=0p''(5) = 0, but if p(x)=0p(x) = 0 then p′′(5)p''(5) is also equal to zero.

In practice, some of the most important subspaces of Rn\mathbb{R}^n are connected with systems of linear equations, that is, with the matrix equation Ax=bA\mathbf{x}=\mathbf{b}.
Example. Let AA be an m×nm × n matrix with real entries. Show that the subset SS of Rn\mathbb{R}^n which consists of all solutions of the matrix equation Ax=bA\mathbf{x}=\mathbf{b} for given b∈Rm\mathbf{b} \in \mathbb{R}^m is a subspace of Rn\mathbb{R}^n if and only if b=0\mathbf{b} = \mathbf{0}.

Suppose there exists a case where b≠0\mathbf{b} \neq \mathbf{0}, then 0∈Rn\mathbf{0} \in \mathbb{R}^n is not a solution of Ax=bA\mathbf{x}=\mathbf{b} as A0=0≠bA\mathbf{0}=\mathbf{0} \neq\mathbf{b}, and hence SS does not contain the zero vector. Thus SS is not a subspace.

If b=0\mathbf{b} = \mathbf{0}, then SS is the set of solutions of Ax=0A\mathbf{x}=\mathbf{0}. We use the Subspace Theorem to show that SS is a subspace.
Closure under addition. If x∈S\mathbf{x} \in S and y∈S\mathbf{y} \in S, then Ax=0A\mathbf{x}=\mathbf{0} and Ay=0A\mathbf{y}=\mathbf{0}, and hence

A(x+y)=Ax+Ay=0+0=0A\mathbf{(x+y)}=A\mathbf{x}+A\mathbf{y}=\mathbf{0}+\mathbf{0}=\mathbf{0}

Thus x+y∈S\mathbf{x}+\mathbf{y}\in S and SS is closed under addition.
Closure under multiplication by a scalar. If x∈S\mathbf{x} \in S, we have Ax=0,A \mathbf{x}= \mathbf{0}, and hence for all λ∈R\lambda \in \mathbb{R},

A(λx)=λA(x)=λ0=0.A(\lambda \mathbf{x}) = \lambda A( \mathbf{x}) = \lambda \mathbf{0} = \mathbf{0}.

And hence is it closed under scalar multiplication.

Example. (Rapid-fire subspace drills) For each of the following sets, decide whether SS is a subspace. Each one hides a different trap.

(a) S={x∈R3:x1+x2+x3=1}S = \left\{ \mathbf{x} \in \mathbb{R}^3 : x_1 + x_2 + x_3 = 1 \right\}.
Not a subspace. Substituting the zero vector gives 0+0+0=0≠10 + 0 + 0 = 0 \neq 1, so 0∉S\mathbf{0} \notin S and we can stop immediately. Always test the zero vector first; if it fails you are done in one line.

(b) S={x∈R2:x1x2=0}S = \left\{ \mathbf{x} \in \mathbb{R}^2 : x_1 x_2 = 0 \right\}, i.e. the union of the two coordinate axes.
Not a subspace. It contains 0\mathbf{0}, and it is even closed under scalar multiplication since (λx1)(λx2)=λ2x1x2=0(\lambda x_1)(\lambda x_2) = \lambda^2 x_1x_2 = 0; however it is not closed under addition:

(10)+(01)=(11)∉S.\begin{pmatrix} 1 \\ 0 \end{pmatrix} + \begin{pmatrix} 0 \\ 1 \end{pmatrix} = \begin{pmatrix} 1 \\ 1 \end{pmatrix} \notin S.

Passing two of the three conditions means nothing; all three must hold.

(c) S={x∈R3:x1=x2=x3}S = \left\{ \mathbf{x} \in \mathbb{R}^3 : x_1 = x_2 = x_3 \right\}.
Subspace. Every element has the form t(111)t\begin{pmatrix} 1 \\ 1 \\ 1\end{pmatrix} for t∈Rt \in \mathbb{R}, so SS is a line through the origin, and we proved in the Lemma above that such lines are subspaces.

(d) S={A∈M22(R):det⁡(A)=0}S = \left\{ A \in M_{22}(\mathbb{R}) : \det(A) = 0 \right\}.
Not a subspace. The zero matrix is in SS, and det⁡(λA)=λ2det⁡(A)=0\det(\lambda A) = \lambda^2\det(A) = 0 gives closure under scalar multiplication, but addition fails:

(1000)+(0001)=(1001),\begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix} + \begin{pmatrix} 0 & 0 \\ 0 & 1 \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix},

and the identity matrix has determinant 1≠01 \neq 0, so the sum has escaped the set.

The lesson from these drills: sets defined by linear, homogeneous conditions (like 2x1−3x2=02x_1 - 3x_2 = 0 or p′′(5)=0p''(5) = 0) tend to be subspaces, while sets defined by non-linear conditions (products, determinants, inequalities) or by conditions with a non-zero right hand side tend to fail.

An important theoretical and practical problem concerning vector spaces is that of finding all their subspaces. For example, it can be shown that the only subspaces of R2\mathbb{R}^2 are (1) the origin, (2) lines through the origin, and (3) R2\mathbb{R}^2 itself. Similarly, for R3\mathbb{R}^3 the only subspaces are (1) the origin, (2) lines through the origin, (3) planes through the origin, and (4) R3\mathbb{R}^3 itself. A listing of subspaces can be given for any vector space. However, before we can investigate this problem satisfactorily, we require further machinery. This machinery will be developed in Sections 6.4 and 6.5. In vector spaces other than Rn\mathbb{R}^n it may be difficult to get a good geometric feel for which subsets are subspaces. Nonetheless, the Subspace Theorem allows one a simple way to check whether a certain set is a subspace or not.

6.4 Linear combinations and spans#

The two fundamental vector space operations are addition and multiplication by a scalar. If we combine these two we can result in something called "linear combinations" and "span"; a linear combination of a given set of vectors is a sum of scalar multiples of the vectors and the span of a given set of vectors is the set of all linear combinations of the vectors.

Note

Linear Combination
Let S={v1,⋯ ,vn}S = \{\mathbf{v_1},\cdots,\mathbf{v_n}\} be a finite set of vectors in a vector space VV over a field F\mathbb{F}. Then a linear combination of SS is a sum of scalar multiples of the form

λ1v1+⋯+λnvn with λ1,⋯ ,λn∈F.> \lambda_1 \mathbf{v_1}+ \cdots + \lambda_n \mathbf{v_n} \text{ with } \lambda_1, \cdots, \lambda_n \in \mathbb{F}. >

Example. The vector (3−4)\begin{pmatrix}3 \\ -4 \end{pmatrix} is a linear combination of the vectors in the set

{(11),(23),(1−1)} in R2 because (3−4)=2(11)+(−1)(23)+3(1−1).\left \{ \begin{pmatrix} 1 \\ 1 \end{pmatrix} , \begin{pmatrix} 2 \\ 3 \end{pmatrix} , \begin{pmatrix} 1 \\ -1 \end{pmatrix} \right \} \text { in } \mathbb{R}^2 \text{ because } \begin{pmatrix} 3 \\ -4 \end{pmatrix} = 2\begin{pmatrix} 1 \\ 1 \end{pmatrix} + (-1)\begin{pmatrix} 2 \\ 3 \end{pmatrix} + 3\begin{pmatrix} 1 \\ -1 \end{pmatrix} .

Example. Is b=(3−15)\mathbf{b} = \begin{pmatrix} 3 \\ -1 \\ 5 \end{pmatrix} a linear combination of v1=(111)\mathbf{v}_1 = \begin{pmatrix} 1 \\ 1 \\ 1 \end{pmatrix} and v2=(1−12)\mathbf{v}_2 = \begin{pmatrix} 1 \\ -1 \\ 2 \end{pmatrix}?

We are looking for scalars λ1,λ2\lambda_1, \lambda_2 such that λ1v1+λ2v2=b\lambda_1\mathbf{v}_1 + \lambda_2\mathbf{v}_2 = \mathbf{b}. Comparing components gives three equations in only two unknowns:

λ1+λ2=3,λ1−λ2=−1,λ1+2λ2=5.\begin{align*} \lambda_1 + \lambda_2 &= 3, \\ \lambda_1 - \lambda_2 &= -1, \\ \lambda_1 + 2\lambda_2 &= 5. \end{align*}

Adding the first two equations,

2λ1=2λ1=1,\begin{align*} 2\lambda_1 &= 2 \\ \lambda_1 &= 1, \end{align*}

and hence λ2=3−1=2\lambda_2 = 3 - 1 = 2. Substituting into the third equation as a check: 1+2(2)=51 + 2(2) = 5, which is consistent. Therefore

b=v1+2v2,\mathbf{b} = \mathbf{v}_1 + 2\mathbf{v}_2,

so b\mathbf{b} is a linear combination of the two vectors. Notice that if the third component of b\mathbf{b} were changed to, say, 44, the first two equations would still force λ1=1\lambda_1 = 1 and λ2=2\lambda_2 = 2, but then λ1+2λ2=5≠4\lambda_1 + 2\lambda_2 = 5 \neq 4 and no combination would exist. This makes sense geometrically; in R3\mathbb{R}^3 the set of all linear combinations of two (non-parallel) vectors is only a plane, so most vectors miss it.

We know that a vector space is closed under addition and multiplication of scalars, and therefore any subspace of that vector space is closed as well, so it must be closed under the operation of forming linear combinations.

Note

Span
Let S={v1,⋯ ,vn}S = \{\mathbf{v_1},\cdots,\mathbf{v_n}\} be a finite set of vectors in a vector space VV over a field F\mathbb{F}. Then the span of the set SS is the set of all linear combinations of SS, that is,

span(S)=span(v1,⋯ ,vn)={v∈V:v=λ1v1+⋯+λnvn for some λ1,⋯λn∈F}.\begin{align*} \text{span}(S) &= \text{span}(\mathbf{v_1},\cdots,\mathbf{v_n}) \\ &= \left \{\mathbf{v} \in V: \mathbf{v} = \lambda_1 \mathbf{v}_1 + \cdots + \lambda_n \mathbf{v}_n \text{ for some } \lambda_1, \cdots \lambda_n \in \mathbb{F} \right \}. \end{align*}

Example. The span of a non-zero vector v\mathbf{v} in Rn\mathbb{R}^n is a line through the origin;

S={x∈Rn:x=λv, for some λ∈R}.S = \left \{\mathbf{x} \in \mathbb{R}^n: \mathbf{x}= \lambda \mathbf{v}, \text{ for some } \lambda \in \mathbb{R} \right \}.

This set is just span(v\mathbf{v}).

Example. If {v,w}\left \{ \mathbf{v}, \mathbf{w} \right \} is a pair of non-zero, non-parallel vectors in Rn\mathbb{R}^n then span(v,w\mathbf{v}, \mathbf{w}) is a plane containing the origin.

Note

A span is a subspace
If SS is a finite, non-empty set of vectors in a vector space VV, then span(SS) is a subspace of VV. Further, span(SS) is the smallest subspace containing SS (in the sense that span(SS) is a subspace of every subspace which contains SS).

Proof. We first note that 0∈S\mathbf{0} \in S, since we may take each scalar to be zero. We know that every linear combination of SS is a vector in VV, so span(S)\text{span}(S) is a subset of VV.

To prove that span(S)\text{span}(S) is a subspace we will use the Subspace Theorem, so we set out to prove that span(S)\text{span}(S) is closed under addition and under multiplication by scalars. Let SS be the set

S={v1,…,vn}S = \{\mathbf{v}_1, \dots, \mathbf{v}_n\}

where all vj\mathbf{v}_j belong to VV.
To show closure under addition, suppose u,w∈span(S)\mathbf{u}, \mathbf{w} \in \text{span}(S). Then

u=λ1v1+⋯+λnvnfor some λ1,…,λn∈Fandw=μ1v1+⋯+μnvnfor some μ1,…,μn∈F,sou+w=(λ1+μ1)v1+⋯+(λn+μn)vnwith λ1+μ1,…,λn+μn∈F.\begin{aligned} \mathbf{u} &= \lambda_1 \mathbf{v}_1 + \cdots + \lambda_n \mathbf{v}_n \quad \text{for some } \lambda_1, \dots, \lambda_n \in \mathbb{F} \quad \text{and} \\ \mathbf{w} &= \mu_1 \mathbf{v}_1 + \cdots + \mu_n \mathbf{v}_n \quad \text{for some } \mu_1, \dots, \mu_n \in \mathbb{F}, \\ \text{so} \quad \mathbf{u} + \mathbf{w} &= (\lambda_1 + \mu_1)\mathbf{v}_1 + \cdots + (\lambda_n + \mu_n)\mathbf{v}_n \quad \text{with } \lambda_1 + \mu_1, \dots, \lambda_n + \mu_n \in \mathbb{F}. \end{aligned}

This shows that u+w\mathbf{u} + \mathbf{w} belongs to span(S)\text{span}(S), so span(S)\text{span}(S) is closed under addition. To prove closure under multiplication by a scalar, suppose u∈span(S)\mathbf{u} \in \text{span}(S) and λ∈F\lambda \in \mathbb{F}. Then

λu=λ(λ1v1+⋯+λnvn)=(λλ1)v1+⋯+(λλn)vn,\begin{aligned} \lambda \mathbf{u} &= \lambda(\lambda_1 \mathbf{v}_1 + \cdots + \lambda_n \mathbf{v}_n) \\ &= (\lambda \lambda_1)\mathbf{v}_1 + \cdots + (\lambda \lambda_n)\mathbf{v}_n, \end{aligned}

where λλ1,…,λλn∈F\lambda \lambda_1, \dots, \lambda \lambda_n \in \mathbb{F}. This shows that λu\lambda \mathbf{u} belongs to span(S)\text{span}(S), so span(S)\text{span}(S) is closed under multiplication by scalars.

We have now proved that span(S)\text{span}(S) is a subspace of VV. To show that it is the smallest subspace of VV containing SS, suppose WW is any subspace of VV containing SS. Then WW is itself a vector space containing SS and, by what we have just proved, span(S)\text{span}(S) is a subspace of WW. This completes the proof by showing that span(S)\text{span}(S) is a subspace of every subspace of VV containing SS.

Note

Definition 3.
A finite set SS of vectors in a vector space VV is called a spanning set for VV if span(SS) = VV or equivalently, if every vector in VV can be expressed as a linear combination of vectors in SS.

Example. Every vector (x1⋮xn)∈Rn\begin{pmatrix} x_1 \\ \vdots \\ x_n \end{pmatrix} \in \mathbb{R}^n can be written as x=x1e1+⋯+xnen\mathbf{x}=x_1\mathbf{e}_1 + \cdots + x_n \mathbf{e}_n. This expresses x\mathbf{x} as a linear combination of the set {e1,⋯ ,en}\{\mathbf{e}_1,\cdots,\mathbf{e}_n\}, where

e1=(10⋮0),e2=(01⋮0),⋯ ,en=(00⋮1).\mathbf{e}_1=\begin{pmatrix} 1 \\ 0 \\ \vdots \\ 0 \end{pmatrix}, \mathbf{e}_2=\begin{pmatrix} 0 \\ 1 \\ \vdots \\ 0 \end{pmatrix}, \cdots, \mathbf{e}_n=\begin{pmatrix} 0 \\ 0 \\ \vdots \\ 1 \end{pmatrix}.

Thus, Rn=\mathbb{R}^n = span$(\mathbf{e}_1,\cdots,\mathbf{e}_n)$ and the set {e1,⋯ ,en}\{\mathbf{e}_1,\cdots,\mathbf{e}_n\} spans Rn\mathbb{R}^n.

Example. Let Pn\mathbb{P}_n denote the space of polynomials of degree less than or equal to nn. Every polynomial p∈Pnp \in \mathbb{P}_n can be written as a linear combination of the polynomials {1,x,x2,⋯ ,xn}\{1, x, x_2 , \cdots, x_n\}, so Pn=span(1,x,x2,⋯ ,xn)\mathbb{P}_n = \text{span}(1, x, x_2 , \cdots, x_n) . We shall see later that there is no finite set of vectors whose span is all of P\mathbb{P} (the vector space of all polynomials).

6.4.1 Matrices and spans in Rm\mathbb{R}^m#

We want to have an effective way to tell whether or not a given vector in Rm\mathbb{R}^m belongs to the span of a set S={v1,…,vn}S = \{\mathbf{v}_1, \dots, \mathbf{v}_n\}. From the definition of span, we know that b\mathbf{b} belongs to span(S)\text{span}(S) if and only if there are λ1,…,λn∈R\lambda_1, \dots, \lambda_n \in \mathbb{R} such that

b=λ1v1+⋯+λnvn.\mathbf{b} = \lambda_1\mathbf{v}_1 + \cdots + \lambda_n\mathbf{v}_n.

This equivalent to the condition that there is at least one solution to the vector equation

x1v1+⋯+xnvn=b,x_1\mathbf{v}_1 + \cdots + x_n\mathbf{v}_n = \mathbf{b},

where x1,…,xnx_1, \dots, x_n are the unknowns. This vector equation represents a set of simultaneous linear equations in nn unknowns. Therefore the question of whether b\mathbf{b} belongs to span(S)\text{span}(S) is a question of whether or not a particular set of linear equations has a solution. This is the sort of question which we studied in detail in MATH1131/41.

Furthermore, suppose that v1=(a11⋮am1)\mathbf{v}_1 = \begin{pmatrix} a_{11} \\ \vdots \\ a_{m1} \end{pmatrix}, v2=(a12⋮am2)\mathbf{v}_2 = \begin{pmatrix} a_{12} \\ \vdots \\ a_{m2} \end{pmatrix}, …\dots, vn=(a1n⋮amn)\mathbf{v}_n = \begin{pmatrix} a_{1n} \\ \vdots \\ a_{mn} \end{pmatrix}, and x=(x1⋮xn)\mathbf{x} = \begin{pmatrix} x_1 \\ \vdots \\ x_n \end{pmatrix}.

If that AA is the m×nm \times n matrix whose columns are the vectors v1,…,vn\mathbf{v}_1, \dots, \mathbf{v}_n then

Ax=(a11⋯a1n⋮⋱⋮am1⋯amn)(x1⋮xn)=(a11x1+⋯+a1nxn⋮am1x1+⋯+amnxn)=x1(a11⋮am1)+⋯+xn(a1n⋮amn)=x1v1+⋯+xnvn.\begin{aligned} A\mathbf{x} &= \begin{pmatrix} a_{11} & \cdots & a_{1n} \\ \vdots & \ddots & \vdots \\ a_{m1} & \cdots & a_{mn} \end{pmatrix} \begin{pmatrix} x_1 \\ \vdots \\ x_n \end{pmatrix} = \begin{pmatrix} a_{11}x_1 + \cdots + a_{1n}x_n \\ \vdots \\ a_{m1}x_1 + \cdots + a_{mn}x_n \end{pmatrix} \\ &= x_1 \begin{pmatrix} a_{11} \\ \vdots \\ a_{m1} \end{pmatrix} + \cdots + x_n \begin{pmatrix} a_{1n} \\ \vdots \\ a_{mn} \end{pmatrix} = x_1\mathbf{v}_1 + \cdots + x_n\mathbf{v}_n. \end{aligned}

As a result, we have the following proposition.

Proposition 3 (Matrices, Linear Combinations and Spans). If S={v1,…,vn}S = \{\mathbf{v}_1, \dots, \mathbf{v}_n\} is a set of vectors in Rm\mathbb{R}^m and AA is the m×nm \times n matrix whose columns are the vectors v1,…,vn\mathbf{v}_1, \dots, \mathbf{v}_n then

a) a vector b\mathbf{b} in Rm\mathbb{R}^m can be expressed as a linear combination of SS if and only if it can be expressed in the form AxA\mathbf{x} for some x\mathbf{x} in Rn\mathbb{R}^n,

b) a vector b\mathbf{b} in Rm\mathbb{R}^m belongs to span(S)\text{span}(S) if and only if the equation Ax=bA\mathbf{x} = \mathbf{b} has a solution x\mathbf{x} in Rn\mathbb{R}^n.

Example 10. For the set of three vectors

v1=(0536),v2=(1345),v3=(−2−3−5−6)∈R4,we letA=(01−253−334−565−6)andx=(x1x2x3).\mathbf{v}_1 = \begin{pmatrix} 0 \\ 5 \\ 3 \\ 6 \end{pmatrix}, \mathbf{v}_2 = \begin{pmatrix} 1 \\ 3 \\ 4 \\ 5 \end{pmatrix}, \mathbf{v}_3 = \begin{pmatrix} -2 \\ -3 \\ -5 \\ -6 \end{pmatrix} \in \mathbb{R}^4, \quad \text{we let} \quad A = \begin{pmatrix} 0 & 1 & -2 \\ 5 & 3 & -3 \\ 3 & 4 & -5 \\ 6 & 5 & -6 \end{pmatrix} \quad \text{and} \quad \mathbf{x} = \begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix}.

By expanding each side, it can easily be checked that

Ax=(x2−2x35x1+3x2−3x33x1+4x2−5x36x1+5x2−6x3)=x1(0536)+x2(1345)+x3(−2−3−5−6).A\mathbf{x} = \begin{pmatrix} x_2 - 2x_3 \\ 5x_1 + 3x_2 - 3x_3 \\ 3x_1 + 4x_2 - 5x_3 \\ 6x_1 + 5x_2 - 6x_3 \end{pmatrix} = x_1 \begin{pmatrix} 0 \\ 5 \\ 3 \\ 6 \end{pmatrix} + x_2 \begin{pmatrix} 1 \\ 3 \\ 4 \\ 5 \end{pmatrix} + x_3 \begin{pmatrix} -2 \\ -3 \\ -5 \\ -6 \end{pmatrix}.

In particular, choosing x1=1,x2=1,x3=3x_1 = 1, x_2 = 1, x_3 = 3,

A(113)=1(0536)+1(1345)+3(−2−3−5−6)=(−5−1−8−7).A\begin{pmatrix} 1 \\ 1 \\ 3 \end{pmatrix} = 1\begin{pmatrix} 0 \\ 5 \\ 3 \\ 6 \end{pmatrix} + 1\begin{pmatrix} 1 \\ 3 \\ 4 \\ 5 \end{pmatrix} + 3\begin{pmatrix} -2 \\ -3 \\ -5 \\ -6 \end{pmatrix} = \begin{pmatrix} -5 \\ -1 \\ -8 \\ -7 \end{pmatrix}.

If we call this last vector b\mathbf{b}, then x=(113)\mathbf{x} = \begin{pmatrix} 1 \\ 1 \\ 3 \end{pmatrix} is a solution of Ax=bA\mathbf{x} = \mathbf{b} precisely because b\mathbf{b} can be written as the linear combination v1+v2+3v3\mathbf{v}_1 + \mathbf{v}_2 + 3\mathbf{v}_3.

Ax is a linear combination of the columns of A, with the entries of x as the scalars.\boxed{A\mathbf{x} \text{ is a linear combination of the columns of } A, \text{ with the entries of } \mathbf{x} \text{ as the scalars}.}

This one observation powers the rest of the chapter. A useful special case: if ej\mathbf{e}_j is the jjth standard basis vector in Rn\mathbb{R}^n, then Aej=ajA\mathbf{e}_j = \mathbf{a}_j, the jjth column of AA, since every scalar in the combination is 00 except the jjth, which is 11.

Since the span of the columns of a matrix comes up constantly, it gets its own name.

Note

Definition 4
The subspace of Rm\mathbb{R}^m spanned by the columns of an m×nm \times n matrix AA is called the column space of AA and is denoted by col(A)\text{col}(A).

Basically, col(A)\text{col}(A) is the set of every output AxA\mathbf{x} that the matrix could ever produce; asking "is b∈col(A)\mathbf{b} \in \text{col}(A)?" is exactly asking "does Ax=bA\mathbf{x} = \mathbf{b} have a solution?".

6.4.2 Solving problems about spans#

By Proposition 3, every span question in Rm\mathbb{R}^m turns into a question about linear equations:

b∈span(S)  ⟺  Ax=b has a solution,\boxed{\mathbf{b} \in \text{span}(S) \iff A\mathbf{x} = \mathbf{b} \text{ has a solution},}

where AA is the matrix whose columns are the vectors in SS. So the method is always the same: build AA, form the augmented matrix (A∣b)(A|\mathbf{b}), reduce to row-echelon form, and read off whether the system is consistent. If the right-hand column is non-leading, a solution exists; if the right-hand column is leading, there is no solution.

Example. Is the vector b=(1412)\mathbf{b} = \begin{pmatrix} 1 \\ 4 \\ 1 \\ 2 \end{pmatrix} in the span of the set S={(1342),(−4−8−126)}S = \left\{ \begin{pmatrix} 1 \\ 3 \\ 4 \\ 2 \end{pmatrix}, \begin{pmatrix} -4 \\ -8 \\ -12 \\ 6 \end{pmatrix} \right\}?

In geometric terms, we are asking whether the point (1,4,1,2)(1,4,1,2) lies on the plane through the origin parallel to the two vectors in SS. Let AA be the matrix whose columns are the members of SS, and reduce the augmented matrix (A∣b)(A|\mathbf{b}) to row-echelon form:

(1−413−844−121262)→R2=R2−3R1R3=R3−4R1R4=R4−2R1(1−4104104−30140)→R3=R3−R2R4=R4−72R2(1−4104100−400−72)→R4=R4−78R3(1−4104100−4000).\left(\begin{array}{cc|c} 1 & -4 & 1 \\ 3 & -8 & 4 \\ 4 & -12 & 1 \\ 2 & 6 & 2 \end{array}\right) \xrightarrow{\substack{R_2 = R_2 - 3R_1 \\ R_3 = R_3 - 4R_1 \\ R_4 = R_4 - 2R_1}} \left(\begin{array}{cc|c} 1 & -4 & 1 \\ 0 & 4 & 1 \\ 0 & 4 & -3 \\ 0 & 14 & 0 \end{array}\right) \xrightarrow{\substack{R_3 = R_3 - R_2 \\ R_4 = R_4 - \frac{7}{2}R_2}} \left(\begin{array}{cc|c} 1 & -4 & 1 \\ 0 & 4 & 1 \\ 0 & 0 & -4 \\ 0 & 0 & -\frac{7}{2} \end{array}\right) \xrightarrow{R_4 = R_4 - \frac{7}{8}R_3} \left(\begin{array}{cc|c} 1 & -4 & 1 \\ 0 & 4 & 1 \\ 0 & 0 & -4 \\ 0 & 0 & 0 \end{array}\right).

The third row reads 0=−40 = -4, which is impossible; the right-hand column is a leading column, so the system has no solution. Therefore b\mathbf{b} does not belong to span(S)\text{span}(S).

Example. Find conditions which are necessary and sufficient for a vector b∈R3\mathbf{b} \in \mathbb{R}^3 to belong to the span of S={v1,v2,v3}S = \{\mathbf{v}_1, \mathbf{v}_2, \mathbf{v}_3\}, where

v1=(123),v2=(11−1),v3=(−105).\mathbf{v}_1 = \begin{pmatrix} 1 \\ 2 \\ 3 \end{pmatrix}, \quad \mathbf{v}_2 = \begin{pmatrix} 1 \\ 1 \\ -1 \end{pmatrix}, \quad \mathbf{v}_3 = \begin{pmatrix} -1 \\ 0 \\ 5 \end{pmatrix}.

Hence determine whether v=(21−1)∈span(S)\mathbf{v} = \begin{pmatrix} 2 \\ 1 \\ -1 \end{pmatrix} \in \text{span}(S), and give a geometric interpretation of the span.

This time we keep a general right hand side b\mathbf{b} and row-reduce:

(11−1b1210b23−15b3)→R2=R2−2R1R3=R3−3R1(11−1b10−12b2−2b10−48b3−3b1)→R3=R3−4R2(11−1b10−12b2−2b10005b1−4b2+b3).\left(\begin{array}{ccc|c} 1 & 1 & -1 & b_1 \\ 2 & 1 & 0 & b_2 \\ 3 & -1 & 5 & b_3 \end{array}\right) \xrightarrow{\substack{R_2 = R_2 - 2R_1 \\ R_3 = R_3 - 3R_1}} \left(\begin{array}{ccc|c} 1 & 1 & -1 & b_1 \\ 0 & -1 & 2 & b_2 - 2b_1 \\ 0 & -4 & 8 & b_3 - 3b_1 \end{array}\right) \xrightarrow{R_3 = R_3 - 4R_2} \left(\begin{array}{ccc|c} 1 & 1 & -1 & b_1 \\ 0 & -1 & 2 & b_2 - 2b_1 \\ 0 & 0 & 0 & 5b_1 - 4b_2 + b_3 \end{array}\right).

The last row says 0=5b1−4b2+b30 = 5b_1 - 4b_2 + b_3, so the system has a solution if and only if

5b1−4b2+b3=0,\boxed{5b_1 - 4b_2 + b_3 = 0,}

and this is the condition for b∈span(S)\mathbf{b} \in \text{span}(S). To test v\mathbf{v}, substitute its components into the condition;

5(2)−4(1)+(−1)=10−4−1=5≠0,\begin{align*} 5(2) - 4(1) + (-1) &= 10 - 4 - 1 \\ &= 5 \\ &\neq 0, \end{align*}

so v∉span(S)\mathbf{v} \notin \text{span}(S). Geometrically, the condition is the Cartesian equation 5x1−4x2+x3=05x_1 - 4x_2 + x_3 = 0 of a plane through the origin with normal (5−41)\begin{pmatrix} 5 \\ -4 \\ 1 \end{pmatrix}; the span of the three vectors is exactly this plane. Notice how the span of three vectors collapsed to a plane rather than filling all of R3\mathbb{R}^3 — this is a preview of linear dependence, coming in 6.5.

As a sanity check, each of v1,v2,v3\mathbf{v}_1, \mathbf{v}_2, \mathbf{v}_3 belongs to the span and therefore should satisfy the condition itself; for v1\mathbf{v}_1 we get 5(1)−4(2)+3=05(1) - 4(2) + 3 = 0 as expected, and you can check the other two.

Example. Determine whether or not the set S={v1,v2,v3,v4}S = \{\mathbf{v}_1, \mathbf{v}_2, \mathbf{v}_3, \mathbf{v}_4\} is a spanning set for R3\mathbb{R}^3, where

v1=(123),v2=(11−1),v3=(−105),v4=(235).\mathbf{v}_1 = \begin{pmatrix} 1 \\ 2 \\ 3 \end{pmatrix}, \quad \mathbf{v}_2 = \begin{pmatrix} 1 \\ 1 \\ -1 \end{pmatrix}, \quad \mathbf{v}_3 = \begin{pmatrix} -1 \\ 0 \\ 5 \end{pmatrix}, \quad \mathbf{v}_4 = \begin{pmatrix} 2 \\ 3 \\ 5 \end{pmatrix}.

SS is a spanning set for R3\mathbb{R}^3 if and only if the system Ax=bA\mathbf{x} = \mathbf{b} has a solution for every b∈R3\mathbf{b} \in \mathbb{R}^3. Row-reducing the augmented matrix,

(11−12b12103b23−155b3)→R2=R2−2R1R3=R3−3R1(11−12b10−12−1b2−2b10−48−1b3−3b1)→R3=R3−4R2(11−12b10−12−1b2−2b100035b1−4b2+b3).\left(\begin{array}{cccc|c} 1 & 1 & -1 & 2 & b_1 \\ 2 & 1 & 0 & 3 & b_2 \\ 3 & -1 & 5 & 5 & b_3 \end{array}\right) \xrightarrow{\substack{R_2 = R_2 - 2R_1 \\ R_3 = R_3 - 3R_1}} \left(\begin{array}{cccc|c} 1 & 1 & -1 & 2 & b_1 \\ 0 & -1 & 2 & -1 & b_2 - 2b_1 \\ 0 & -4 & 8 & -1 & b_3 - 3b_1 \end{array}\right) \xrightarrow{R_3 = R_3 - 4R_2} \left(\begin{array}{cccc|c} 1 & 1 & -1 & 2 & b_1 \\ 0 & -1 & 2 & -1 & b_2 - 2b_1 \\ 0 & 0 & 0 & 3 & 5b_1 - 4b_2 + b_3 \end{array}\right).

The last row now has the leading entry 33 in the fourth column, so the right-hand column is non-leading no matter what b\mathbf{b} is; the system always has a solution. Hence every b∈R3\mathbf{b} \in \mathbb{R}^3 belongs to span(S)\text{span}(S), and SS is a spanning set for R3\mathbb{R}^3. Compare this with the previous example; the extra vector v4\mathbf{v}_4 is what saved us from the plane.

Note that the third column of the row-echelon form is non-leading, and the system would still be solvable for every b\mathbf{b} if that column were deleted. This means v3\mathbf{v}_3 can be dropped and {v1,v2,v4}\{\mathbf{v}_1, \mathbf{v}_2, \mathbf{v}_4\} still spans R3\mathbb{R}^3. In general:

If the iith column of the row-echelon form is non-leading, then deleting vi\mathbf{v}_i from SS leaves the span unchanged.

Example. (Spans outside Rn\mathbb{R}^n) Find conditions on the coefficients of p∈P3(R)p \in \mathbb{P}_3(\mathbb{R}) so that p∈span(1+x,1−x2)p \in \text{span}(1 + x, 1 - x^2).

Let p(x)=b0+b1x+b2x2+b3x3p(x) = b_0 + b_1x + b_2x^2 + b_3x^3. Then p∈span(1+x,1−x2)p \in \text{span}(1+x, 1-x^2) if and only if there exist λ1,λ2∈R\lambda_1, \lambda_2 \in \mathbb{R} such that, for all x∈Rx \in \mathbb{R},

p(x)=λ1(1+x)+λ2(1−x2)=(λ1+λ2)+λ1x−λ2x2.\begin{align*} p(x) &= \lambda_1(1 + x) + \lambda_2(1 - x^2) \\ &= (\lambda_1 + \lambda_2) + \lambda_1 x - \lambda_2 x^2. \end{align*}

Two polynomials are equal for all xx if and only if all their corresponding coefficients are equal, so comparing coefficients of 1,x,x2,x31, x, x^2, x^3:

λ1+λ2=b0,λ1=b1,−λ2=b2,0=b3.\begin{align*} \lambda_1 + \lambda_2 &= b_0, \\ \lambda_1 &= b_1, \\ -\lambda_2 &= b_2, \\ 0 &= b_3. \end{align*}

The augmented matrix reduces as

(11b010b10−1b200b3)→R2=R2−R1(11b00−1b1−b00−1b200b3)→R3=R3−R2(11b00−1b1−b000b0−b1+b200b3).\left(\begin{array}{cc|c} 1 & 1 & b_0 \\ 1 & 0 & b_1 \\ 0 & -1 & b_2 \\ 0 & 0 & b_3 \end{array}\right) \xrightarrow{R_2 = R_2 - R_1} \left(\begin{array}{cc|c} 1 & 1 & b_0 \\ 0 & -1 & b_1 - b_0 \\ 0 & -1 & b_2 \\ 0 & 0 & b_3 \end{array}\right) \xrightarrow{R_3 = R_3 - R_2} \left(\begin{array}{cc|c} 1 & 1 & b_0 \\ 0 & -1 & b_1 - b_0 \\ 0 & 0 & b_0 - b_1 + b_2 \\ 0 & 0 & b_3 \end{array}\right).

The system has a solution if and only if b0−b1+b2=0b_0 - b_1 + b_2 = 0 and b3=0b_3 = 0, so these are the conditions for pp to belong to span(1+x,1−x2)\text{span}(1+x, 1-x^2). The method is identical to the Rm\mathbb{R}^m case; comparing coefficients is what converts polynomials into columns of numbers.

Example. (Exam-style twist: an unknown inside the vector) For which value(s) of kk does b=(1k3)\mathbf{b} = \begin{pmatrix} 1 \\ k \\ 3 \end{pmatrix} belong to span((111),(012))\text{span}\left(\begin{pmatrix} 1 \\ 1 \\ 1 \end{pmatrix}, \begin{pmatrix} 0 \\ 1 \\ 2 \end{pmatrix}\right)?

Set up the augmented matrix exactly as before; the unknown kk simply rides along in the right-hand column.

(10111k123)→R2=R2−R1R3=R3−R1(10101k−1022)→R3=R3−2R2(10101k−1004−2k).\left(\begin{array}{cc|c} 1 & 0 & 1 \\ 1 & 1 & k \\ 1 & 2 & 3 \end{array}\right) \xrightarrow{\substack{R_2 = R_2 - R_1 \\ R_3 = R_3 - R_1}} \left(\begin{array}{cc|c} 1 & 0 & 1 \\ 0 & 1 & k - 1 \\ 0 & 2 & 2 \end{array}\right) \xrightarrow{R_3 = R_3 - 2R_2} \left(\begin{array}{cc|c} 1 & 0 & 1 \\ 0 & 1 & k - 1 \\ 0 & 0 & 4 - 2k \end{array}\right).

The system is consistent if and only if

4−2k=0k=2.\begin{align*} 4 - 2k &= 0 \\ k &= 2. \end{align*}

Therefore b∈span(S)\mathbf{b} \in \text{span}(S) exactly when k=2k = 2, in which case back substitution gives λ2=k−1=1\lambda_2 = k - 1 = 1 and λ1=1\lambda_1 = 1, i.e. b=v1+v2\mathbf{b} = \mathbf{v}_1 + \mathbf{v}_2. The decision here is realising that a condition question and a membership question are the same computation; you row-reduce with the unknown in the augmented column and force consistency at the end.

6.5 Linear independence#

Suppose that v1,v2\mathbf{v}_1, \mathbf{v}_2 are non-zero vectors. We saw in first year that span(v1,v2)\text{span}(\mathbf{v}_1, \mathbf{v}_2) represents a plane if v1\mathbf{v}_1 and v2\mathbf{v}_2 are not parallel, but only a line if they are parallel. Similarly, for three non-zero vectors in R3\mathbb{R}^3, span(v1,v2,v3)\text{span}(\mathbf{v}_1, \mathbf{v}_2, \mathbf{v}_3) represents
i) a line if the three vectors are all parallel,
ii) a plane if they are coplanar, or
iii) the whole of R3\mathbb{R}^3 otherwise.

Linear independence is the machinery that makes this "collapsing span" behaviour precise in any vector space.

Note

Definition 1
Suppose that S={v1,…,vn}S = \{\mathbf{v}_1, \dots, \mathbf{v}_n\} is a subset of a vector space. The set SS is a linearly independent set if the only values of the scalars λ1,λ2,…,λn\lambda_1, \lambda_2, \dots, \lambda_n for which

λ1v1+⋯+λnvn=0\lambda_1\mathbf{v}_1 + \cdots + \lambda_n\mathbf{v}_n = \mathbf{0}

are λ1=λ2=⋯=λn=0\lambda_1 = \lambda_2 = \cdots = \lambda_n = 0.

Note

Definition 2
The set S={v1,…,vn}S = \{\mathbf{v}_1, \dots, \mathbf{v}_n\} is a linearly dependent set if it is not a linearly independent set; that is, if there exist scalars λ1,…,λn\lambda_1, \dots, \lambda_n, not all zero, such that

λ1v1+⋯+λnvn=0.\lambda_1\mathbf{v}_1 + \cdots + \lambda_n\mathbf{v}_n = \mathbf{0}.

Basically, choosing every scalar to be zero always produces 0\mathbf{0}, so that tells you nothing; independence says this trivial choice is the only way to produce 0\mathbf{0}. A dependent set carries redundancy — some vector in it can be manufactured out of the others, so it contributes nothing new to the span. The zero linear combination always exists; the entire question is whether it is unique.

Example. Show that the vectors (1234)\begin{pmatrix} 1 \\ 2 \\ 3 \\ 4 \end{pmatrix} and (−3−6−95)\begin{pmatrix} -3 \\ -6 \\ -9 \\ 5 \end{pmatrix} form a linearly independent set.

Applying the definition, we look for scalars λ1,λ2\lambda_1, \lambda_2 such that λ1v1+λ2v2=0\lambda_1\mathbf{v}_1 + \lambda_2\mathbf{v}_2 = \mathbf{0}. Comparing components gives four equations:

λ1−3λ2=0,2λ1−6λ2=0,3λ1−9λ2=0,4λ1+5λ2=0.\begin{align*} \lambda_1 - 3\lambda_2 &= 0, \\ 2\lambda_1 - 6\lambda_2 &= 0, \\ 3\lambda_1 - 9\lambda_2 &= 0, \\ 4\lambda_1 + 5\lambda_2 &= 0. \end{align*}

Each of the first three equations says exactly the same thing, namely λ1=3λ2\lambda_1 = 3\lambda_2. Substituting into the fourth,

4(3λ2)+5λ2=017λ2=0λ2=0,\begin{align*} 4(3\lambda_2) + 5\lambda_2 &= 0 \\ 17\lambda_2 &= 0 \\ \lambda_2 &= 0, \end{align*}

and hence λ1=3(0)=0\lambda_1 = 3(0) = 0. The only solution is the zero one, so the two vectors form a linearly independent set.

Example. (Geometric meaning for pairs) Two non-zero vectors in Rn\mathbb{R}^n are parallel if and only if they form a linearly dependent set.

Suppose first that {v1,v2}\{\mathbf{v}_1, \mathbf{v}_2\} are parallel, so v2=λv1\mathbf{v}_2 = \lambda\mathbf{v}_1 for some non-zero λ∈R\lambda \in \mathbb{R}. Rearranging gives λv1−v2=0\lambda\mathbf{v}_1 - \mathbf{v}_2 = \mathbf{0}, and the coefficient of v2\mathbf{v}_2 is −1≠0-1 \neq 0, so the set is linearly dependent.

Conversely, if the set is dependent then λ1v1+λ2v2=0\lambda_1\mathbf{v}_1 + \lambda_2\mathbf{v}_2 = \mathbf{0} with not both scalars zero. Without loss of generality λ1≠0\lambda_1 \neq 0, so

v1=−λ2λ1v2,\mathbf{v}_1 = -\frac{\lambda_2}{\lambda_1}\mathbf{v}_2,

which shows v1\mathbf{v}_1 is a scalar multiple of v2\mathbf{v}_2; also λ2≠0\lambda_2 \neq 0 (otherwise v1\mathbf{v}_1 would be 0\mathbf{0}), so the multiple is non-zero and the vectors are parallel.

Example. It is easy to verify, component by component, that

3(121)+2(1−12)+(−1)(547)=(000),3\begin{pmatrix} 1 \\ 2 \\ 1 \end{pmatrix} + 2\begin{pmatrix} 1 \\ -1 \\ 2 \end{pmatrix} + (-1)\begin{pmatrix} 5 \\ 4 \\ 7 \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \\ 0 \end{pmatrix},

so by Definition 2 this set of three vectors is linearly dependent. Notice that no two of the three vectors are parallel. For three or more vectors, checking pairs is not enough — dependence of a triple means coplanarity, and a single non-zero combination summing to 0\mathbf{0} is all it takes.

6.5.1 Solving problems about linear independence#

Just as span questions became existence questions for Ax=bA\mathbf{x} = \mathbf{b}, independence questions become uniqueness questions for the homogeneous system Ax=0A\mathbf{x} = \mathbf{0}.

Note

Proposition 1
If S={a1,…,an}S = \{\mathbf{a}_1, \dots, \mathbf{a}_n\} is a set of vectors in Rm\mathbb{R}^m and AA is the m×nm \times n matrix whose columns are the vectors a1,…,an\mathbf{a}_1, \dots, \mathbf{a}_n, then the set SS is linearly dependent if and only if the system Ax=0A\mathbf{x} = \mathbf{0} has at least one non-zero solution x∈Rn\mathbf{x} \in \mathbb{R}^n.

Proof. Since Ax=x1a1+⋯+xnanA\mathbf{x} = x_1\mathbf{a}_1 + \cdots + x_n\mathbf{a}_n, a non-zero solution of Ax=0A\mathbf{x} = \mathbf{0} is precisely a choice of scalars, not all zero, making the linear combination equal to 0\mathbf{0}; this is word for word the definition of linear dependence. ■\blacksquare

In practice, since row operations never change a zero right-hand column, we can drop the augmented column entirely and just reduce AA to a row-echelon form UU. Then

all columns of U leading  ⟺  S independent,some column non-leading  ⟺  S dependent.\boxed{\text{all columns of } U \text{ leading} \iff S \text{ independent}, \qquad \text{some column non-leading} \iff S \text{ dependent}.}

Example. Is the set S={(1324),(−2−102),(0012)}S = \left\{ \begin{pmatrix} 1 \\ 3 \\ 2 \\ 4 \end{pmatrix}, \begin{pmatrix} -2 \\ -1 \\ 0 \\ 2 \end{pmatrix}, \begin{pmatrix} 0 \\ 0 \\ 1 \\ 2 \end{pmatrix} \right\} a linearly independent set?

Let AA be the matrix whose columns are the vectors in SS, and reduce:

(1−203−10201422)→R2=R2−3R1R3=R3−2R1R4=R4−4R1(1−200500410102)→R3=R3−45R2R4=R4−2R2(1−20050001002)→R4=R4−2R3(1−20050001000).\begin{pmatrix} 1 & -2 & 0 \\ 3 & -1 & 0 \\ 2 & 0 & 1 \\ 4 & 2 & 2 \end{pmatrix} \xrightarrow{\substack{R_2 = R_2 - 3R_1 \\ R_3 = R_3 - 2R_1 \\ R_4 = R_4 - 4R_1}} \begin{pmatrix} 1 & -2 & 0 \\ 0 & 5 & 0 \\ 0 & 4 & 1 \\ 0 & 10 & 2 \end{pmatrix} \xrightarrow{\substack{R_3 = R_3 - \frac{4}{5}R_2 \\ R_4 = R_4 - 2R_2}} \begin{pmatrix} 1 & -2 & 0 \\ 0 & 5 & 0 \\ 0 & 0 & 1 \\ 0 & 0 & 2 \end{pmatrix} \xrightarrow{R_4 = R_4 - 2R_3} \begin{pmatrix} 1 & -2 & 0 \\ 0 & 5 & 0 \\ 0 & 0 & 1 \\ 0 & 0 & 0 \end{pmatrix}.

There are no non-leading columns, so the only solution of Ax=0A\mathbf{x} = \mathbf{0} is x=0\mathbf{x} = \mathbf{0}, and hence SS is linearly independent.

Example. Suppose v1=(123)\mathbf{v}_1 = \begin{pmatrix} 1 \\ 2 \\ 3 \end{pmatrix}, v2=(11−1)\mathbf{v}_2 = \begin{pmatrix} 1 \\ 1 \\ -1 \end{pmatrix}, v3=(−105)\mathbf{v}_3 = \begin{pmatrix} -1 \\ 0 \\ 5 \end{pmatrix} and v4=(235)\mathbf{v}_4 = \begin{pmatrix} 2 \\ 3 \\ 5 \end{pmatrix} (the same set that spanned R3\mathbb{R}^3 in 6.4.2).
a) Prove that S={v1,v2,v3,v4}S = \{\mathbf{v}_1, \mathbf{v}_2, \mathbf{v}_3, \mathbf{v}_4\} is a linearly dependent set.
b) Find all possible ways of writing 0\mathbf{0} as a linear combination of the vectors in SS.
c) Find a linearly independent subset of SS with the same span as SS.

a) We already reduced this matrix in 6.4.2:

A=(11−1221033−155)⟶U=(11−120−12−10003).A = \begin{pmatrix} 1 & 1 & -1 & 2 \\ 2 & 1 & 0 & 3 \\ 3 & -1 & 5 & 5 \end{pmatrix} \longrightarrow U = \begin{pmatrix} 1 & 1 & -1 & 2 \\ 0 & -1 & 2 & -1 \\ 0 & 0 & 0 & 3 \end{pmatrix}.

The third column of UU is non-leading, so Ax=0A\mathbf{x} = \mathbf{0} has infinitely many solutions, and in particular non-zero ones. Therefore SS is linearly dependent. (Alternatively: four vectors could never be independent in R3\mathbb{R}^3; see Theorem 3 of 6.6.2 later.)

b) Back substitution with x3=λx_3 = \lambda free: the third row gives 3x4=03x_4 = 0, so x4=0x_4 = 0; the second row gives

−x2+2λ−0=0x2=2λ;\begin{align*} -x_2 + 2\lambda - 0 &= 0 \\ x_2 &= 2\lambda; \end{align*}

and the first row gives

x1+2λ−λ+0=0x1=−λ.\begin{align*} x_1 + 2\lambda - \lambda + 0 &= 0 \\ x_1 &= -\lambda. \end{align*}

Hence every way of writing 0\mathbf{0} is of the form

λ(−v1+2v2+v3)+0v4=0,λ∈R.\lambda(-\mathbf{v}_1 + 2\mathbf{v}_2 + \mathbf{v}_3) + 0\mathbf{v}_4 = \mathbf{0}, \quad \lambda \in \mathbb{R}.

c) Choosing λ=1\lambda = 1 gives −v1+2v2+v3=0-\mathbf{v}_1 + 2\mathbf{v}_2 + \mathbf{v}_3 = \mathbf{0}, i.e.

v3=v1−2v2,\mathbf{v}_3 = \mathbf{v}_1 - 2\mathbf{v}_2,

so v3\mathbf{v}_3 is redundant and span(v1,v2,v4)=span(S)\text{span}(\mathbf{v}_1, \mathbf{v}_2, \mathbf{v}_4) = \text{span}(S). Removing the third column from AA and reducing,

(1122133−15)⟶(1120−1−1003),\begin{pmatrix} 1 & 1 & 2 \\ 2 & 1 & 3 \\ 3 & -1 & 5 \end{pmatrix} \longrightarrow \begin{pmatrix} 1 & 1 & 2 \\ 0 & -1 & -1 \\ 0 & 0 & 3 \end{pmatrix},

which has no non-leading columns, so {v1,v2,v4}\{\mathbf{v}_1, \mathbf{v}_2, \mathbf{v}_4\} is a linearly independent subset of SS with the same span as SS.

Example. (Polynomials) Show that the set {1+x,2−x}\{1 + x, 2 - x\} is linearly independent in P(R)\mathbb{P}(\mathbb{R}).

Suppose that λ1(1+x)+λ2(2−x)=0\lambda_1(1 + x) + \lambda_2(2 - x) = 0 for all x∈Rx \in \mathbb{R}. Expanding,

(λ1+2λ2)+(λ1−λ2)x=0,(\lambda_1 + 2\lambda_2) + (\lambda_1 - \lambda_2)x = 0,

and since a polynomial is the zero polynomial only when every coefficient vanishes,

λ1+2λ2=0,λ1−λ2=0.\begin{align*} \lambda_1 + 2\lambda_2 &= 0, \\ \lambda_1 - \lambda_2 &= 0. \end{align*}

Subtracting the second equation from the first gives 3λ2=03\lambda_2 = 0, so λ2=0\lambda_2 = 0 and then λ1=0\lambda_1 = 0. The only solution is the zero one; the set is linearly independent.

Example. Is the set {1+x,2−x,−1+2x}\{1 + x, 2 - x, -1 + 2x\} a linearly independent subset of P(R)\mathbb{P}(\mathbb{R})?

Suppose λ1(1+x)+λ2(2−x)+λ3(−1+2x)=0\lambda_1(1 + x) + \lambda_2(2 - x) + \lambda_3(-1 + 2x) = 0 for all x∈Rx \in \mathbb{R}. Comparing coefficients,

λ1+2λ2−λ3=0,λ1−λ2+2λ3=0.\begin{align*} \lambda_1 + 2\lambda_2 - \lambda_3 &= 0, \\ \lambda_1 - \lambda_2 + 2\lambda_3 &= 0. \end{align*}

This is a homogeneous system of two equations in three unknowns, so its row-echelon form

(12−10−33)\begin{pmatrix} 1 & 2 & -1 \\ 0 & -3 & 3 \end{pmatrix}

must have a non-leading column (the third). There are therefore non-zero solutions, and the set is linearly dependent. Back substitution with λ3=1\lambda_3 = 1 gives λ2=1\lambda_2 = 1 and λ1=−1\lambda_1 = -1, and indeed

−1(1+x)+1(2−x)+1(−1+2x)=0for all x∈R.-1(1 + x) + 1(2 - x) + 1(-1 + 2x) = 0 \quad \text{for all } x \in \mathbb{R}.

Although finding the explicit combination was not required, it is a very cheap way to check your row reduction.

Example. (Out of the box: functions) Show that {sin⁡x,cos⁡x}\{\sin x, \cos x\} is a linearly independent subset of the vector space of real-valued functions on [−π,π][-\pi, \pi], but that {1,sin⁡2x,cos⁡2x}\{1, \sin^2 x, \cos^2 x\} is linearly dependent.

For functions, the equation λ1f1+⋯+λnfn=0\lambda_1 f_1 + \cdots + \lambda_n f_n = 0 must hold for all xx, and this gives two lines of attack:

  • to prove independence, plug in enough specific xx values to force all the scalars to zero;
  • to prove dependence, produce a known identity connecting the functions.

For {sin⁡x,cos⁡x}\{\sin x, \cos x\}: suppose λ1sin⁡x+λ2cos⁡x=0\lambda_1\sin x + \lambda_2\cos x = 0 for all x∈[−π,π]x \in [-\pi, \pi]. Substituting x=0x = 0,

λ1sin⁡0+λ2cos⁡0=0λ2=0,\begin{align*} \lambda_1\sin 0 + \lambda_2\cos 0 &= 0 \\ \lambda_2 &= 0, \end{align*}

and substituting x=π2x = \frac{\pi}{2},

λ1sin⁡π2+λ2cos⁡π2=0λ1=0.\begin{align*} \lambda_1\sin\tfrac{\pi}{2} + \lambda_2\cos\tfrac{\pi}{2} &= 0 \\ \lambda_1 &= 0. \end{align*}

Both scalars are forced to zero, so the set is linearly independent.

For {1,sin⁡2x,cos⁡2x}\{1, \sin^2 x, \cos^2 x\}: the Pythagorean identity rearranges to

(−1)⋅1+1⋅sin⁡2x+1⋅cos⁡2x=0for all x,(-1)\cdot 1 + 1\cdot\sin^2 x + 1\cdot\cos^2 x = 0 \quad \text{for all } x,

which is a linear combination with scalars −1,1,1-1, 1, 1 (not all zero) equal to the zero function. The set is linearly dependent. A set of functions can look completely unrelated and still be dependent through an identity — trig sets like this one are a classic exam trap.

6.5.2 Uniqueness and linear independence#

The following theorem is one of the main reasons linear independence matters.

Note

Theorem 2 (Uniqueness of Linear Combinations)
Let SS be a finite, non-empty set of vectors in a vector space and let v\mathbf{v} be a vector which can be written as a linear combination of SS. Then the values of the scalars in the linear combination for v\mathbf{v} are unique if and only if SS is a linearly independent set.

Basically, an independent set gives every vector in its span exactly one "recipe"; a dependent set gives infinitely many recipes for anything it can make at all.

Proof. It is easier to prove the equivalent statement: the scalars are non-unique if and only if SS is linearly dependent. Suppose v\mathbf{v} has two different expressions

v=λ1v1+⋯+λnvnandv=μ1v1+⋯+μnvn.\mathbf{v} = \lambda_1\mathbf{v}_1 + \cdots + \lambda_n\mathbf{v}_n \quad \text{and} \quad \mathbf{v} = \mu_1\mathbf{v}_1 + \cdots + \mu_n\mathbf{v}_n.

Subtracting the second from the first,

(λ1−μ1)v1+⋯+(λn−μn)vn=0,(\lambda_1 - \mu_1)\mathbf{v}_1 + \cdots + (\lambda_n - \mu_n)\mathbf{v}_n = \mathbf{0},

and since the two expressions differ, at least one coefficient λj−μj\lambda_j - \mu_j is non-zero; hence SS is dependent. Conversely, if SS is dependent then there are scalars α1,…,αn\alpha_1, \dots, \alpha_n, not all zero, with α1v1+⋯+αnvn=0\alpha_1\mathbf{v}_1 + \cdots + \alpha_n\mathbf{v}_n = \mathbf{0}, and adding this "hidden zero" onto any expression for v\mathbf{v} produces a genuinely different second expression,

v=(λ1+α1)v1+⋯+(λn+αn)vn.■\mathbf{v} = (\lambda_1 + \alpha_1)\mathbf{v}_1 + \cdots + (\lambda_n + \alpha_n)\mathbf{v}_n. \quad \blacksquare

Example. With S={v1,v2,v3,v4}S = \{\mathbf{v}_1, \mathbf{v}_2, \mathbf{v}_3, \mathbf{v}_4\} the linearly dependent set from the previous section, show that b=(77−4)\mathbf{b} = \begin{pmatrix} 7 \\ 7 \\ -4 \end{pmatrix} belongs to span(S)\text{span}(S), and check that the linear combination for b\mathbf{b} is not unique.

Reduce the augmented matrix (A∣b)(A|\mathbf{b}):

(11−127210373−155−4)→R2=R2−2R1R3=R3−3R1(11−1270−12−1−70−48−1−25)→R3=R3−4R2(11−1270−12−1−700033).\left(\begin{array}{cccc|c} 1 & 1 & -1 & 2 & 7 \\ 2 & 1 & 0 & 3 & 7 \\ 3 & -1 & 5 & 5 & -4 \end{array}\right) \xrightarrow{\substack{R_2 = R_2 - 2R_1 \\ R_3 = R_3 - 3R_1}} \left(\begin{array}{cccc|c} 1 & 1 & -1 & 2 & 7 \\ 0 & -1 & 2 & -1 & -7 \\ 0 & -4 & 8 & -1 & -25 \end{array}\right) \xrightarrow{R_3 = R_3 - 4R_2} \left(\begin{array}{cccc|c} 1 & 1 & -1 & 2 & 7 \\ 0 & -1 & 2 & -1 & -7 \\ 0 & 0 & 0 & 3 & 3 \end{array}\right).

The right-hand column is non-leading, so a solution exists and b∈span(S)\mathbf{b} \in \text{span}(S); but the third column is also non-leading, so there are infinitely many solutions and hence infinitely many expressions for b\mathbf{b} as a linear combination of SS. Explicitly, back substitution with x3=λx_3 = \lambda gives x4=1x_4 = 1, x2=6+2λx_2 = 6 + 2\lambda and x1=−1−λx_1 = -1 - \lambda, so

(77−4)=(−1−λ)v1+(6+2λ)v2+λv3+v4for every λ∈R.\begin{pmatrix} 7 \\ 7 \\ -4 \end{pmatrix} = (-1 - \lambda)\mathbf{v}_1 + (6 + 2\lambda)\mathbf{v}_2 + \lambda\mathbf{v}_3 + \mathbf{v}_4 \quad \text{for every } \lambda \in \mathbb{R}.

If we drop v3\mathbf{v}_3 (the vector belonging to the non-leading column) and use the independent set {v1,v2,v4}\{\mathbf{v}_1, \mathbf{v}_2, \mathbf{v}_4\} instead, the combination becomes unique; setting λ=0\lambda = 0 above,

(77−4)=−v1+6v2+v4.\begin{pmatrix} 7 \\ 7 \\ -4 \end{pmatrix} = -\mathbf{v}_1 + 6\mathbf{v}_2 + \mathbf{v}_4.

6.5.3 Spans and linear independence#

We have seen concrete examples of spans collapsing when the spanning vectors are dependent. The general results are collected here; they are the bridge into bases and dimension in 6.6.

Note

Theorem 3
A set of vectors SS is a linearly independent set if and only if no vector in SS can be written as a linear combination of the other vectors in SS, that is, if and only if no vector in SS is in the span of the other vectors in SS.

Equivalently: SS is dependent if and only if at least one vector in SS is in the span of the others. This is really just a restatement of the definition; if λ1v1+⋯+λnvn=0\lambda_1\mathbf{v}_1 + \cdots + \lambda_n\mathbf{v}_n = \mathbf{0} with some λi≠0\lambda_i \neq 0, we can solve for vi\mathbf{v}_i in terms of the rest, and conversely if vi=μ1v1+⋯+μi−1vi−1+μi+1vi+1+⋯+μnvn\mathbf{v}_i = \mu_1\mathbf{v}_1 + \cdots + \mu_{i-1}\mathbf{v}_{i-1} + \mu_{i+1}\mathbf{v}_{i+1} + \cdots + \mu_n\mathbf{v}_n then moving vi\mathbf{v}_i across gives a non-trivial combination equal to 0\mathbf{0} (its coefficient is −1-1).

Example. For the dependent set {v1,v2,v3,v4}\{\mathbf{v}_1, \mathbf{v}_2, \mathbf{v}_3, \mathbf{v}_4\} from 6.5.1 we found v3=v1−2v2\mathbf{v}_3 = \mathbf{v}_1 - 2\mathbf{v}_2, so v3∈span(v1,v2)\mathbf{v}_3 \in \text{span}(\mathbf{v}_1, \mathbf{v}_2). Rearranging the same relation also gives v1∈span(v2,v3)\mathbf{v}_1 \in \text{span}(\mathbf{v}_2, \mathbf{v}_3) and v2∈span(v1,v3)\mathbf{v}_2 \in \text{span}(\mathbf{v}_1, \mathbf{v}_3). However v4\mathbf{v}_4 is not in the span of the other three (its coefficient in every dependence relation was 00). Geometrically: v1,v2,v3\mathbf{v}_1, \mathbf{v}_2, \mathbf{v}_3 all lie in one plane, and v4\mathbf{v}_4 sticks out of it. A dependent set does not mean that every vector is redundant — only that at least one is.

Note

Theorem 4
If SS is a finite subset of a vector space VV and the vector v\mathbf{v} is in VV, then

span(S∪{v})=span(S)if and only ifv∈span(S).\text{span}(S \cup \{\mathbf{v}\}) = \text{span}(S) \quad \text{if and only if} \quad \mathbf{v} \in \text{span}(S).

Basically, adding a vector you could already build changes nothing; adding a vector you could not build genuinely enlarges the span. Combining Theorems 3 and 4:

If SS is linearly dependent, you can drop at least one vector from SS without changing the span; if SS is linearly independent, dropping any vector strictly shrinks the span.

In formal terms:

Note

Theorem 5
Suppose that SS is a finite subset of a vector space. The span of every proper subset of SS is a proper subspace of span(S)\text{span}(S) if and only if SS is a linearly independent set.

Example. For our running set, span(v1,v2,v3,v4)=span(v1,v2,v4)=R3\text{span}(\mathbf{v}_1, \mathbf{v}_2, \mathbf{v}_3, \mathbf{v}_4) = \text{span}(\mathbf{v}_1, \mathbf{v}_2, \mathbf{v}_4) = \mathbb{R}^3, and {v1,v2,v4}\{\mathbf{v}_1, \mathbf{v}_2, \mathbf{v}_4\} is linearly independent; dropping any further vector leaves only a plane, not all of R3\mathbb{R}^3, exactly as Theorem 5 predicts.

One more result, needed for the construction of bases in the next section.

Note

Theorem 6
If SS is a finite linearly independent subset of a vector space VV and v\mathbf{v} is in VV but not in span(S)\text{span}(S), then S∪{v}S \cup \{\mathbf{v}\} is a linearly independent set.

Proof. Let S={v1,…,vn}S = \{\mathbf{v}_1, \dots, \mathbf{v}_n\} and suppose, for contradiction, that S∪{v}S \cup \{\mathbf{v}\} is dependent, so

λv+λ1v1+⋯+λnvn=0\lambda\mathbf{v} + \lambda_1\mathbf{v}_1 + \cdots + \lambda_n\mathbf{v}_n = \mathbf{0}

with the scalars not all zero. If λ=0\lambda = 0 then some λi≠0\lambda_i \neq 0, contradicting the independence of SS. So λ≠0\lambda \neq 0, and dividing through by λ\lambda expresses v\mathbf{v} as a linear combination of SS, contradicting v∉span(S)\mathbf{v} \notin \text{span}(S). Either way we hit a contradiction, so S∪{v}S \cup \{\mathbf{v}\} must be independent. ■\blacksquare

6.6 Basis and dimension#

We have now met the two key properties a set of vectors can have: spanning (it can build everything) and linear independence (it builds things in only one way). A set with both properties is the best of both worlds — every vector in the space gets exactly one recipe — and such sets are so important that they get their own name.

6.6.1 Bases#

Note

Definition 1
A set of vectors BB in a vector space VV is called a basis for VV if:

  1. BB is a linearly independent set, and
  2. BB is a spanning set for VV (that is, span(B)=V\text{span}(B) = V).

(We exclude the vector space consisting of only the zero vector from this discussion.)

Basically, a basis is a minimal coordinate grid for VV; big enough to reach everything, with no redundant directions. Too few vectors and you cannot span; too many and you lose independence.

Example. The set {e1,…,en}\{\mathbf{e}_1, \dots, \mathbf{e}_n\} of standard basis vectors is a linearly independent spanning set for Rn\mathbb{R}^n (we saw both properties earlier), so it is a basis — the standard basis for Rn\mathbb{R}^n. Each vector a=(a1⋮an)\mathbf{a} = \begin{pmatrix} a_1 \\ \vdots \\ a_n \end{pmatrix} is the unique linear combination a1e1+⋯+anena_1\mathbf{e}_1 + \cdots + a_n\mathbf{e}_n.

Example. Show that the set S={(210),(−101),(01−1)}S = \left\{ \begin{pmatrix} 2 \\ 1 \\ 0 \end{pmatrix}, \begin{pmatrix} -1 \\ 0 \\ 1 \end{pmatrix}, \begin{pmatrix} 0 \\ 1 \\ -1 \end{pmatrix} \right\} is a basis for R3\mathbb{R}^3.

Let AA be the matrix with the members of SS as columns and reduce (A∣b)(A|\mathbf{b}) for a general b\mathbf{b}:

(2−10b1101b201−1b3)→R1↔R2(101b22−10b101−1b3)→R2=R2−2R1(101b20−1−2b1−2b201−1b3)→R3=R3+R2(101b20−1−2b1−2b200−3b1−2b2+b3).\left(\begin{array}{ccc|c} 2 & -1 & 0 & b_1 \\ 1 & 0 & 1 & b_2 \\ 0 & 1 & -1 & b_3 \end{array}\right) \xrightarrow{R_1 \leftrightarrow R_2} \left(\begin{array}{ccc|c} 1 & 0 & 1 & b_2 \\ 2 & -1 & 0 & b_1 \\ 0 & 1 & -1 & b_3 \end{array}\right) \xrightarrow{R_2 = R_2 - 2R_1} \left(\begin{array}{ccc|c} 1 & 0 & 1 & b_2 \\ 0 & -1 & -2 & b_1 - 2b_2 \\ 0 & 1 & -1 & b_3 \end{array}\right) \xrightarrow{R_3 = R_3 + R_2} \left(\begin{array}{ccc|c} 1 & 0 & 1 & b_2 \\ 0 & -1 & -2 & b_1 - 2b_2 \\ 0 & 0 & -3 & b_1 - 2b_2 + b_3 \end{array}\right).

For every b∈R3\mathbf{b} \in \mathbb{R}^3 the right-hand column is non-leading, so Ax=bA\mathbf{x} = \mathbf{b} always has a solution and span(S)=R3\text{span}(S) = \mathbb{R}^3. Moreover, the left side has no non-leading columns, so the only solution for b=0\mathbf{b} = \mathbf{0} is x=0\mathbf{x} = \mathbf{0} and SS is linearly independent. Hence SS is a basis for R3\mathbb{R}^3. One row reduction answers both basis conditions at once — never do two separate reductions.

Since a basis spans, every vector can be written as a linear combination of it; since a basis is independent, that combination is unique (Theorem 2 of 6.5.2). In summary:

Note

Unique representation property
Let B={v1,…,vn}B = \{\mathbf{v}_1, \dots, \mathbf{v}_n\} be a basis for a vector space VV over F\mathbb{F}. Every vector v∈V\mathbf{v} \in V can be written uniquely as

v=λ1v1+⋯+λnvn,λ1,…,λn∈F.\mathbf{v} = \lambda_1\mathbf{v}_1 + \cdots + \lambda_n\mathbf{v}_n, \quad \lambda_1, \dots, \lambda_n \in \mathbb{F}.

Example. Write b=(−105)\mathbf{b} = \begin{pmatrix} -1 \\ 0 \\ 5 \end{pmatrix} as the unique linear combination of the ordered basis {v1=(123),v2=(11−1)}\left\{ \mathbf{v}_1 = \begin{pmatrix} 1 \\ 2 \\ 3 \end{pmatrix}, \mathbf{v}_2 = \begin{pmatrix} 1 \\ 1 \\ -1 \end{pmatrix} \right\} of span(v1,v2)\text{span}(\mathbf{v}_1, \mathbf{v}_2).

The scalars are the solution of Ax=bA\mathbf{x} = \mathbf{b}:

(11−12103−15)→R2=R2−2R1R3=R3−3R1(11−10−120−48)→R3=R3−4R2(11−10−12000).\left(\begin{array}{cc|c} 1 & 1 & -1 \\ 2 & 1 & 0 \\ 3 & -1 & 5 \end{array}\right) \xrightarrow{\substack{R_2 = R_2 - 2R_1 \\ R_3 = R_3 - 3R_1}} \left(\begin{array}{cc|c} 1 & 1 & -1 \\ 0 & -1 & 2 \\ 0 & -4 & 8 \end{array}\right) \xrightarrow{R_3 = R_3 - 4R_2} \left(\begin{array}{cc|c} 1 & 1 & -1 \\ 0 & -1 & 2 \\ 0 & 0 & 0 \end{array}\right).

Back substitution gives

−x2=2x2=−2,x1+(−2)=−1x1=1.\begin{align*} -x_2 &= 2 \\ x_2 &= -2, \\ x_1 + (-2) &= -1 \\ x_1 &= 1. \end{align*}

Therefore b=v1−2v2\mathbf{b} = \mathbf{v}_1 - 2\mathbf{v}_2, and by the unique representation property this is the only such expression.

Example. Let v1=(1−12)\mathbf{v}_1 = \begin{pmatrix} 1 \\ -1 \\ 2 \end{pmatrix}, v2=(213)\mathbf{v}_2 = \begin{pmatrix} 2 \\ 1 \\ 3 \end{pmatrix}, v3=(242)\mathbf{v}_3 = \begin{pmatrix} 2 \\ 4 \\ 2 \end{pmatrix}, v4=(150)\mathbf{v}_4 = \begin{pmatrix} 1 \\ 5 \\ 0 \end{pmatrix} and S={v1,v2,v3,v4}S = \{\mathbf{v}_1, \mathbf{v}_2, \mathbf{v}_3, \mathbf{v}_4\}. Find a subset of SS which is a basis for span(S)\text{span}(S).

Reduce the matrix with the members of SS as columns:

(1221−11452320)→R2=R2+R1R3=R3−2R1(122103660−1−2−2)→R3=R3+13R2(122103660000).\begin{pmatrix} 1 & 2 & 2 & 1 \\ -1 & 1 & 4 & 5 \\ 2 & 3 & 2 & 0 \end{pmatrix} \xrightarrow{\substack{R_2 = R_2 + R_1 \\ R_3 = R_3 - 2R_1}} \begin{pmatrix} 1 & 2 & 2 & 1 \\ 0 & 3 & 6 & 6 \\ 0 & -1 & -2 & -2 \end{pmatrix} \xrightarrow{R_3 = R_3 + \frac{1}{3}R_2} \begin{pmatrix} 1 & 2 & 2 & 1 \\ 0 & 3 & 6 & 6 \\ 0 & 0 & 0 & 0 \end{pmatrix}.

The leading columns are the first and second, so {v1,v2}\{\mathbf{v}_1, \mathbf{v}_2\} spans the same set as SS; and deleting the non-leading columns from the reduction shows {v1,v2}\{\mathbf{v}_1, \mathbf{v}_2\} is independent. Hence {v1,v2}\{\mathbf{v}_1, \mathbf{v}_2\} is a basis for span(S)\text{span}(S) (which is therefore a plane in R3\mathbb{R}^3).

Example. (Orthonormal bases) An orthonormal basis is a basis whose vectors all have length 11 and are mutually orthogonal, like {i,j,k}\{\mathbf{i}, \mathbf{j}, \mathbf{k}\} in R3\mathbb{R}^3. Orthonormality gives a shortcut for finding the scalars in a linear combination; if B={u1,…,un}B = \{\mathbf{u}_1, \dots, \mathbf{u}_n\} is orthonormal and a=x1u1+⋯+xnun\mathbf{a} = x_1\mathbf{u}_1 + \cdots + x_n\mathbf{u}_n, then dotting both sides with ui\mathbf{u}_i kills every term except the iith, so

xi=ui⋅a.\boxed{x_i = \mathbf{u}_i \cdot \mathbf{a}.}

For instance, B={u1,u2,u3}B = \{\mathbf{u}_1, \mathbf{u}_2, \mathbf{u}_3\} with

u1=(120−12),u2=(12012),u3=(0−10)\mathbf{u}_1 = \begin{pmatrix} \tfrac{1}{\sqrt{2}} \\ 0 \\ -\tfrac{1}{\sqrt{2}} \end{pmatrix}, \quad \mathbf{u}_2 = \begin{pmatrix} \tfrac{1}{\sqrt{2}} \\ 0 \\ \tfrac{1}{\sqrt{2}} \end{pmatrix}, \quad \mathbf{u}_3 = \begin{pmatrix} 0 \\ -1 \\ 0 \end{pmatrix}

is an orthonormal basis for R3\mathbb{R}^3, and for a general a=(a1a2a3)\mathbf{a} = \begin{pmatrix} a_1 \\ a_2 \\ a_3 \end{pmatrix},

x1=u1⋅a=12(a1−a3),x2=u2⋅a=12(a1+a3),x3=u3⋅a=−a2,\begin{align*} x_1 &= \mathbf{u}_1 \cdot \mathbf{a} = \tfrac{1}{\sqrt{2}}(a_1 - a_3), \\ x_2 &= \mathbf{u}_2 \cdot \mathbf{a} = \tfrac{1}{\sqrt{2}}(a_1 + a_3), \\ x_3 &= \mathbf{u}_3 \cdot \mathbf{a} = -a_2, \end{align*}

so a=12(a1−a3)u1+12(a1+a3)u2−a2u3\mathbf{a} = \tfrac{1}{\sqrt{2}}(a_1 - a_3)\mathbf{u}_1 + \tfrac{1}{\sqrt{2}}(a_1 + a_3)\mathbf{u}_2 - a_2\mathbf{u}_3; no row reduction needed at all.

Example. The set {1,x,x2,…,xn}\{1, x, x^2, \dots, x^n\} is a basis for Pn(R)\mathbb{P}_n(\mathbb{R}), called the standard basis for Pn(R)\mathbb{P}_n(\mathbb{R}). It spans by the very definition of a polynomial of degree at most nn, and it is independent because λ1+λ2x+⋯+λn+1xn=0\lambda_1 + \lambda_2 x + \cdots + \lambda_{n+1}x^n = 0 for all xx forces every coefficient to be zero.

6.6.2 Dimension#

We keep saying things like "a plane is two-dimensional". The following two theorems let us define dimension properly for any vector space with a finite basis.

Note

Theorem 1
The number of vectors in any spanning set for a vector space VV is always greater than or equal to the number of vectors in any linearly independent set in VV.

Basically, spanning sets are "big" and independent sets are "small", and they can only meet in the middle. (The proof reduces to the fact that a matrix with more rows than columns must produce a zero row in row-echelon form; we omit the details.)

Note

Theorem 2
If a vector space VV has a finite basis, then every basis for VV contains the same number of vectors.

Proof. Let B1B_1 (with mm vectors) and B2B_2 (with nn vectors) be bases for VV. Then m≥nm \geq n by Theorem 1, since B1B_1 spans and B2B_2 is independent; and n≥mn \geq m by the mirror argument. Hence m=nm = n. ■\blacksquare

Since the number of basis vectors does not depend on which basis you picked, the following definition makes sense.

Note

Definition 2
If VV is a vector space with a finite basis, then the dimension of VV, denoted by dim⁡(V)\dim(V), is the number of vectors in any basis for VV. Such a VV is called a finite dimensional vector space.

Standard dimensions worth memorising (each comes from counting the standard basis):

dim⁡(Rn)=n,dim⁡(Pn)=n+1,dim⁡(Mmn)=mn.\boxed{\dim(\mathbb{R}^n) = n, \qquad \dim(\mathbb{P}_n) = n + 1, \qquad \dim(M_{mn}) = mn.}

The +1+1 in dim⁡(Pn)=n+1\dim(\mathbb{P}_n) = n+1 trips everyone up at least once; the basis {1,x,…,xn}\{1, x, \dots, x^n\} has n+1n+1 elements because of the constant term. The space of geometric vectors in physical space has basis {i,j,k}\{\mathbf{i}, \mathbf{j}, \mathbf{k}\} and dimension 33, and we define the dimension of the zero vector space to be 00.

Note

Theorem 3
Suppose that VV is a finite dimensional vector space. Then:
1. the number of vectors in any spanning set for VV is greater than or equal to dim⁡(V)\dim(V);
2. the number of vectors in any linearly independent set in VV is less than or equal to dim⁡(V)\dim(V);
3. if the number of vectors in a spanning set equals dim⁡(V)\dim(V), the set is automatically linearly independent, and hence a basis;
4. if the number of vectors in a linearly independent set equals dim⁡(V)\dim(V), the set is automatically a spanning set, and hence a basis.

Parts 3 and 4 are the workhorses. If you already know the dimension of the space, you only ever need to check one of the two basis conditions — the count does the other half for you.

Example. (Quick-fire applications of Theorem 3)

  • The two vectors (1−1)\begin{pmatrix} 1 \\ -1 \end{pmatrix} and (45)\begin{pmatrix} 4 \\ 5 \end{pmatrix} are non-parallel, hence linearly independent; since dim⁡(R2)=2\dim(\mathbb{R}^2) = 2, part 4 says they form a basis for R2\mathbb{R}^2 with no spanning check needed.
  • A set of three vectors can never span R4\mathbb{R}^4, since dim⁡(R4)=4>3\dim(\mathbb{R}^4) = 4 > 3 (part 1).
  • Any set of 1010 vectors which spans R10\mathbb{R}^{10} is a basis for R10\mathbb{R}^{10} (part 3).
  • Any linearly independent set of 325325 vectors in R325\mathbb{R}^{325} is a basis for R325\mathbb{R}^{325} (part 4).
  • A set of 12001200 vectors in R1209\mathbb{R}^{1209} cannot be a spanning set, as 1200<12091200 < 1209.
  • Four polynomials can never be linearly independent in P2\mathbb{P}_2, since dim⁡(P2)=3\dim(\mathbb{P}_2) = 3 (part 2).

Example. Show that the only subspaces of R3\mathbb{R}^3 are (1) the origin, (2) lines through the origin, (3) planes through the origin, and (4) R3\mathbb{R}^3 itself.

By part 2 of Theorem 3, no subspace of R3\mathbb{R}^3 can have dimension greater than 33, so the only possible dimensions are 0,1,2,30, 1, 2, 3.

  • Dimension 00 is the subspace {0}\{\mathbf{0}\}, i.e. the origin.
  • A subspace of dimension 11 has the form span(v)\text{span}(\mathbf{v}) with v≠0\mathbf{v} \neq \mathbf{0}, which is a line through the origin.
  • A subspace of dimension 22 has the form span(v1,v2)\text{span}(\mathbf{v}_1, \mathbf{v}_2) with {v1,v2}\{\mathbf{v}_1, \mathbf{v}_2\} independent, which is a plane through the origin.
  • A subspace of dimension 33 has a basis of three independent vectors in R3\mathbb{R}^3; by part 4 that basis is a basis for R3\mathbb{R}^3 itself, so the subspace is all of R3\mathbb{R}^3.

This finally answers the question raised at the end of 6.3.

6.6.3 Existence and construction of bases#

Two natural questions: does a basis always exist, and how do we actually compute one? The existence answers are:

Note

Theorem 4
If SS is a finite non-empty subset of a vector space, then SS contains a subset which is a basis for span(S)\text{span}(S). In particular, every non-zero vector space which can be spanned by a finite set has a basis.

Note

Theorem 5
Suppose that VV is a vector space which can be spanned by a finite set of vectors. If SS is a linearly independent subset of VV, then there exists a basis for VV which contains SS as a subset; i.e. every linearly independent set can be extended to a basis.

The ideas behind the proofs are simple. For Theorem 4, keep throwing away redundant vectors (Theorem 5 of 6.5.3 guarantees one exists while the set is dependent) until what remains is independent; the span never changes and the process must stop because SS is finite. For Theorem 5, keep adjoining vectors from outside the current span (Theorem 6 of 6.5.3 says the set stays independent) until it spans; the process cannot outrun the size of a spanning set, by Theorem 1.

Both theorems require the space to be spanned by a finite set. A vector space which cannot be spanned by any finite set is called an infinite dimensional vector space; the space P\mathbb{P} of all polynomials is one (see 6.8.3).

The step-by-step procedures above would be painfully slow, because every step re-tests the whole set. In Rm\mathbb{R}^m we can instead do all the deleting (or all the adding) in one row reduction.

Note

Theorem 6 (Reducing a spanning set to a basis in Rm\mathbb{R}^m)
Suppose that S={v1,…,vn}S = \{\mathbf{v}_1, \dots, \mathbf{v}_n\} is any subset of Rm\mathbb{R}^m and AA is the matrix whose columns are the members of SS. If UU is a row-echelon form for AA and S′S' is created from SS by deleting those vectors which correspond to non-leading columns in UU, then S′S' is a basis for span(S)\text{span}(S).

Take the surviving vectors from AA (the original vectors), not from UU — the row operations destroy the actual columns.

Example. Find a basis for, and the dimension of, the subspace of R4\mathbb{R}^4 spanned by

S={(1122),(2345),(−31−6−2),(1336),(−2−1−4−3)}.S = \left\{ \begin{pmatrix} 1 \\ 1 \\ 2 \\ 2 \end{pmatrix}, \begin{pmatrix} 2 \\ 3 \\ 4 \\ 5 \end{pmatrix}, \begin{pmatrix} -3 \\ 1 \\ -6 \\ -2 \end{pmatrix}, \begin{pmatrix} 1 \\ 3 \\ 3 \\ 6 \end{pmatrix}, \begin{pmatrix} -2 \\ -1 \\ -4 \\ -3 \end{pmatrix} \right\}.

Put the vectors in as columns and reduce:

(12−31−21313−124−63−425−26−3)→R2=R2−R1R3=R3−2R1R4=R4−2R1(12−31−2014210001001441)→R4=R4−R2(12−31−2014210001000020)→R4=R4−2R3(12−31−2014210001000000).\begin{pmatrix} 1 & 2 & -3 & 1 & -2 \\ 1 & 3 & 1 & 3 & -1 \\ 2 & 4 & -6 & 3 & -4 \\ 2 & 5 & -2 & 6 & -3 \end{pmatrix} \xrightarrow{\substack{R_2 = R_2 - R_1 \\ R_3 = R_3 - 2R_1 \\ R_4 = R_4 - 2R_1}} \begin{pmatrix} 1 & 2 & -3 & 1 & -2 \\ 0 & 1 & 4 & 2 & 1 \\ 0 & 0 & 0 & 1 & 0 \\ 0 & 1 & 4 & 4 & 1 \end{pmatrix} \xrightarrow{R_4 = R_4 - R_2} \begin{pmatrix} 1 & 2 & -3 & 1 & -2 \\ 0 & 1 & 4 & 2 & 1 \\ 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 2 & 0 \end{pmatrix} \xrightarrow{R_4 = R_4 - 2R_3} \begin{pmatrix} 1 & 2 & -3 & 1 & -2 \\ 0 & 1 & 4 & 2 & 1 \\ 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 0 \end{pmatrix}.

The third and fifth columns are non-leading, so we delete the third and fifth members of SS and obtain the basis

S′={(1122),(2345),(1336)}S' = \left\{ \begin{pmatrix} 1 \\ 1 \\ 2 \\ 2 \end{pmatrix}, \begin{pmatrix} 2 \\ 3 \\ 4 \\ 5 \end{pmatrix}, \begin{pmatrix} 1 \\ 3 \\ 3 \\ 6 \end{pmatrix} \right\}

for span(S)\text{span}(S), which is therefore 33-dimensional. Do not confuse the dimension of a subspace with the dimension of the space it lives in — span(S)\text{span}(S) is a 33-dimensional subspace of R4\mathbb{R}^4, and this has nothing to do with R3\mathbb{R}^3.

Example. Show that the vectors v1=(012)\mathbf{v}_1 = \begin{pmatrix} 0 \\ 1 \\ 2 \end{pmatrix}, v2=(2−1−2)\mathbf{v}_2 = \begin{pmatrix} 2 \\ -1 \\ -2 \end{pmatrix}, v3=(324)\mathbf{v}_3 = \begin{pmatrix} 3 \\ 2 \\ 4 \end{pmatrix}, v4=(542)\mathbf{v}_4 = \begin{pmatrix} 5 \\ 4 \\ 2 \end{pmatrix} span R3\mathbb{R}^3, and find a basis for R3\mathbb{R}^3 which is a subset of S={v1,v2,v3,v4}S = \{\mathbf{v}_1, \mathbf{v}_2, \mathbf{v}_3, \mathbf{v}_4\}.

Rather than dragging a general b\mathbf{b} through the reduction, we can find a basis for span(S)\text{span}(S) first; if its dimension turns out to be 33, then by Proposition 8 below (or Theorem 3 part 4) the span must be all of R3\mathbb{R}^3.

(02351−1242−242)→R1↔R2(1−12402352−242)→R3=R3−2R1(1−1240235000−6).\begin{pmatrix} 0 & 2 & 3 & 5 \\ 1 & -1 & 2 & 4 \\ 2 & -2 & 4 & 2 \end{pmatrix} \xrightarrow{R_1 \leftrightarrow R_2} \begin{pmatrix} 1 & -1 & 2 & 4 \\ 0 & 2 & 3 & 5 \\ 2 & -2 & 4 & 2 \end{pmatrix} \xrightarrow{R_3 = R_3 - 2R_1} \begin{pmatrix} 1 & -1 & 2 & 4 \\ 0 & 2 & 3 & 5 \\ 0 & 0 & 0 & -6 \end{pmatrix}.

The third column is non-leading, so we delete v3\mathbf{v}_3; the subset B={v1,v2,v4}B = \{\mathbf{v}_1, \mathbf{v}_2, \mathbf{v}_4\} is a basis for span(S)\text{span}(S). But BB is then a linearly independent set of 33 vectors in R3\mathbb{R}^3, so it is also a basis for R3\mathbb{R}^3 itself; in particular SS spans R3\mathbb{R}^3.

Note

Theorem 7 (Extending a linearly independent set to a basis in Rm\mathbb{R}^m)
Suppose that S={v1,…,vn}S = \{\mathbf{v}_1, \dots, \mathbf{v}_n\} is a linearly independent subset of Rm\mathbb{R}^m and AA is the matrix whose columns are the members of SS followed by the standard basis vectors for Rm\mathbb{R}^m. If UU is a row-echelon form for AA and S′S' is created by choosing those columns of AA which correspond to leading columns in UU, then S′S' is a basis for Rm\mathbb{R}^m containing SS as a subset.

The trick: the appended standard basis vectors guarantee that the columns of AA span Rm\mathbb{R}^m, so Theorem 6 applied to this bigger set gives a basis; and because the members of SS come first and are independent, their columns are all leading, so none of them get deleted.

Example. Find a basis for R4\mathbb{R}^4 containing the members of the linearly independent set

S={(124−2),(2510−5)}.S = \left\{ \begin{pmatrix} 1 \\ 2 \\ 4 \\ -2 \end{pmatrix}, \begin{pmatrix} 2 \\ 5 \\ 10 \\ -5 \end{pmatrix} \right\}.

Form the matrix with the members of SS followed by e1,e2,e3,e4\mathbf{e}_1, \mathbf{e}_2, \mathbf{e}_3, \mathbf{e}_4 and reduce:

(1210002501004100010−2−50001)→R2=R2−2R1R3=R3−4R1R4=R4+2R1(12100001−210002−40100−12001)→R3=R3−2R2R4=R4+R2(12100001−2100000−210000101)→R4=R4+12R3(12100001−2100000−2100000121).\begin{pmatrix} 1 & 2 & 1 & 0 & 0 & 0 \\ 2 & 5 & 0 & 1 & 0 & 0 \\ 4 & 10 & 0 & 0 & 1 & 0 \\ -2 & -5 & 0 & 0 & 0 & 1 \end{pmatrix} \xrightarrow{\substack{R_2 = R_2 - 2R_1 \\ R_3 = R_3 - 4R_1 \\ R_4 = R_4 + 2R_1}} \begin{pmatrix} 1 & 2 & 1 & 0 & 0 & 0 \\ 0 & 1 & -2 & 1 & 0 & 0 \\ 0 & 2 & -4 & 0 & 1 & 0 \\ 0 & -1 & 2 & 0 & 0 & 1 \end{pmatrix} \xrightarrow{\substack{R_3 = R_3 - 2R_2 \\ R_4 = R_4 + R_2}} \begin{pmatrix} 1 & 2 & 1 & 0 & 0 & 0 \\ 0 & 1 & -2 & 1 & 0 & 0 \\ 0 & 0 & 0 & -2 & 1 & 0 \\ 0 & 0 & 0 & 1 & 0 & 1 \end{pmatrix} \xrightarrow{R_4 = R_4 + \frac{1}{2}R_3} \begin{pmatrix} 1 & 2 & 1 & 0 & 0 & 0 \\ 0 & 1 & -2 & 1 & 0 & 0 \\ 0 & 0 & 0 & -2 & 1 & 0 \\ 0 & 0 & 0 & 0 & \frac{1}{2} & 1 \end{pmatrix}.

The leading columns are the first, second, fourth and fifth, so we take the corresponding columns of AA and get the basis

S′={(124−2),(2510−5),(0100),(0010)}S' = \left\{ \begin{pmatrix} 1 \\ 2 \\ 4 \\ -2 \end{pmatrix}, \begin{pmatrix} 2 \\ 5 \\ 10 \\ -5 \end{pmatrix}, \begin{pmatrix} 0 \\ 1 \\ 0 \\ 0 \end{pmatrix}, \begin{pmatrix} 0 \\ 0 \\ 1 \\ 0 \end{pmatrix} \right\}

for R4\mathbb{R}^4. Note that the same procedure works even when SS is neither independent nor spanning — you form exactly the same matrix and keep the leading columns — but then the result may not contain all of SS.

Note

Proposition 8
If VV is a finite-dimensional vector space, WW is a subspace of VV and dim⁡(W)=dim⁡(V)\dim(W) = \dim(V), then W=VW = V.

Basically, a subspace cannot have full dimension without being the whole space; a basis for WW is an independent set of dim⁡(V)\dim(V) vectors and so, by Theorem 3 part 4, a basis for all of VV.

Example. (Out of the box: dimension of a solution space) Find a basis for, and the dimension of, the solution space

S={x∈R4:Ax=0},whereA=(120−10012).S = \{\mathbf{x} \in \mathbb{R}^4 : A\mathbf{x} = \mathbf{0}\}, \quad \text{where} \quad A = \begin{pmatrix} 1 & 2 & 0 & -1 \\ 0 & 0 & 1 & 2 \end{pmatrix}.

We showed in 6.3 that solution sets of homogeneous equations are subspaces; now we can measure them. The matrix is already in row-echelon form with leading columns 11 and 33, so x2=λx_2 = \lambda and x4=μx_4 = \mu are free. Back substitution:

x3+2μ=0x3=−2μ,x1+2λ−μ=0x1=−2λ+μ.\begin{align*} x_3 + 2\mu &= 0 \\ x_3 &= -2\mu, \\ x_1 + 2\lambda - \mu &= 0 \\ x_1 &= -2\lambda + \mu. \end{align*}

Hence every solution has the form

x=λ(−2100)+μ(10−21),\mathbf{x} = \lambda\begin{pmatrix} -2 \\ 1 \\ 0 \\ 0 \end{pmatrix} + \mu\begin{pmatrix} 1 \\ 0 \\ -2 \\ 1 \end{pmatrix},

so S=span((−2100),(10−21))S = \text{span}\left( \begin{pmatrix} -2 \\ 1 \\ 0 \\ 0 \end{pmatrix}, \begin{pmatrix} 1 \\ 0 \\ -2 \\ 1 \end{pmatrix} \right). These two vectors are linearly independent (look at the second and fourth components; any combination equal to 0\mathbf{0} forces λ=0\lambda = 0 and μ=0\mu = 0), so they form a basis and dim⁡(S)=2\dim(S) = 2. In general,

dim⁡{x:Ax=0}=number of non-leading columns of U=number of free parameters.\boxed{\dim\{\mathbf{x} : A\mathbf{x} = \mathbf{0}\} = \text{number of non-leading columns of } U = \text{number of free parameters}.}

Example. (Out of the box: dimension of a polynomial subspace) Find a basis for, and the dimension of,

S={p∈P3(R):p(1)=0}.S = \{p \in \mathbb{P}_3(\mathbb{R}) : p(1) = 0\}.

Write p(x)=a0+a1x+a2x2+a3x3p(x) = a_0 + a_1x + a_2x^2 + a_3x^3. The condition p(1)=0p(1) = 0 says

a0+a1+a2+a3=0a0=−a1−a2−a3,\begin{align*} a_0 + a_1 + a_2 + a_3 &= 0 \\ a_0 &= -a_1 - a_2 - a_3, \end{align*}

so every p∈Sp \in S can be rewritten as

p(x)=(−a1−a2−a3)+a1x+a2x2+a3x3=a1(x−1)+a2(x2−1)+a3(x3−1).\begin{align*} p(x) &= (-a_1 - a_2 - a_3) + a_1x + a_2x^2 + a_3x^3 \\ &= a_1(x - 1) + a_2(x^2 - 1) + a_3(x^3 - 1). \end{align*}

Hence S=span(x−1,x2−1,x3−1)S = \text{span}(x - 1, x^2 - 1, x^3 - 1). For independence, suppose λ1(x−1)+λ2(x2−1)+λ3(x3−1)=0\lambda_1(x - 1) + \lambda_2(x^2 - 1) + \lambda_3(x^3 - 1) = 0 for all xx; the coefficient of x3x^3 gives λ3=0\lambda_3 = 0, the coefficient of x2x^2 gives λ2=0\lambda_2 = 0, and the coefficient of xx gives λ1=0\lambda_1 = 0. So {x−1,x2−1,x3−1}\{x - 1, x^2 - 1, x^3 - 1\} is a basis for SS and dim⁡(S)=3\dim(S) = 3.

Notice the pattern; dim⁡(P3)=4\dim(\mathbb{P}_3) = 4, and imposing one linear condition knocked the dimension down by exactly one. Basically, each independent linear constraint costs one dimension — the same thing happened in the solution space example (44 unknowns, 22 equations, dimension 22).

6.7 Coordinate vectors#

This section is marked [X] — it is MATH1241/extension material.

Any basis BB for a finite-dimensional vector space VV gives every vector a unique linear combination. If we also fix an order on the basis vectors, then the list of scalars in that combination becomes an unambiguous label for the vector.

Note

Definition 1
Let VV be an nn-dimensional vector space and let the ordered set of vectors B={v1,…,vn}B = \{\mathbf{v}_1, \dots, \mathbf{v}_n\} be a basis for VV. If

v=x1v1+⋯+xnvn,\mathbf{v} = x_1\mathbf{v}_1 + \cdots + x_n\mathbf{v}_n,

then the vector

[v]B=(x1⋮xn)[\mathbf{v}]_B = \begin{pmatrix} x_1 \\ \vdots \\ x_n \end{pmatrix}

is called the coordinate vector of v\mathbf{v} with respect to the ordered basis BB.

Basically, once you fix an ordered basis, every vector in any nn-dimensional vector space — polynomials, matrices, functions — gets relabelled as a column vector in Fn\mathbb{F}^n, and then all of our matrix machinery applies to it. The order of the basis matters; shuffling the basis vectors shuffles the coordinates.

Example. With respect to the ordered basis B={(013−1),(25−31),(4−102),(−6214)}B = \left\{ \begin{pmatrix} 0 \\ 1 \\ 3 \\ -1 \end{pmatrix}, \begin{pmatrix} 2 \\ 5 \\ -3 \\ 1 \end{pmatrix}, \begin{pmatrix} 4 \\ -1 \\ 0 \\ 2 \end{pmatrix}, \begin{pmatrix} -6 \\ 2 \\ 1 \\ 4 \end{pmatrix} \right\} of R4\mathbb{R}^4, a vector v\mathbf{v} has coordinate vector [v]B=(1−342)[\mathbf{v}]_B = \begin{pmatrix} 1 \\ -3 \\ 4 \\ 2 \end{pmatrix}. Find v\mathbf{v}.

This direction is pure arithmetic; the coordinates are the scalars, so

v=1(013−1)−3(25−31)+4(4−102)+2(−6214)=(−2−141412).\mathbf{v} = 1\begin{pmatrix} 0 \\ 1 \\ 3 \\ -1 \end{pmatrix} - 3\begin{pmatrix} 2 \\ 5 \\ -3 \\ 1 \end{pmatrix} + 4\begin{pmatrix} 4 \\ -1 \\ 0 \\ 2 \end{pmatrix} + 2\begin{pmatrix} -6 \\ 2 \\ 1 \\ 4 \end{pmatrix} = \begin{pmatrix} -2 \\ -14 \\ 14 \\ 12 \end{pmatrix}.

Going the other way (vector to coordinates) requires solving a linear system, as in the example in 6.6.1 where we wrote b=(−105)\mathbf{b} = \begin{pmatrix} -1 \\ 0 \\ 5 \end{pmatrix} in terms of {v1,v2}\{\mathbf{v}_1, \mathbf{v}_2\}; there we found b=v1−2v2\mathbf{b} = \mathbf{v}_1 - 2\mathbf{v}_2, which in this language says [b]B=(1−2)[\mathbf{b}]_B = \begin{pmatrix} 1 \\ -2 \end{pmatrix} with respect to the ordered basis {v1,v2}\{\mathbf{v}_1, \mathbf{v}_2\} of span(v1,v2)\text{span}(\mathbf{v}_1, \mathbf{v}_2).

Example. (A non-standard polynomial basis) You are given the ordered basis B={1+x,x+x2,1+x2}B = \{1 + x, x + x^2, 1 + x^2\} for P2(R)\mathbb{P}_2(\mathbb{R}). Find the coordinate vector of p(x)=1−x2p(x) = 1 - x^2 with respect to BB.

We need scalars α1,α2,α3\alpha_1, \alpha_2, \alpha_3 such that, for all xx,

1−x2=α1(1+x)+α2(x+x2)+α3(1+x2).1 - x^2 = \alpha_1(1 + x) + \alpha_2(x + x^2) + \alpha_3(1 + x^2).

Expanding and comparing coefficients of 1,x,x21, x, x^2:

α1+α3=1,α1+α2=0,α2+α3=−1.\begin{align*} \alpha_1 + \alpha_3 &= 1, \\ \alpha_1 + \alpha_2 &= 0, \\ \alpha_2 + \alpha_3 &= -1. \end{align*}

From the second equation α2=−α1\alpha_2 = -\alpha_1; substituting into the third,

−α1+α3=−1,\begin{align*} -\alpha_1 + \alpha_3 &= -1, \end{align*}

and adding this to the first equation,

2α3=0α3=0,\begin{align*} 2\alpha_3 &= 0 \\ \alpha_3 &= 0, \end{align*}

so α1=1\alpha_1 = 1 and α2=−1\alpha_2 = -1. Therefore [p]B=(1−10)[p]_B = \begin{pmatrix} 1 \\ -1 \\ 0 \end{pmatrix}. (With respect to the standard basis {1,x,x2}\{1, x, x^2\} the coordinate vector is just the coefficients (10−1)\begin{pmatrix} 1 \\ 0 \\ -1 \end{pmatrix} — no working needed at all.)

Example. (Order trap in R2\mathbb{R}^2) Find [v]B[\mathbf{v}]_B for v=(37)\mathbf{v} = \begin{pmatrix} 3 \\ 7 \end{pmatrix} with respect to the ordered basis B={(11),(1−1)}B = \left\{ \begin{pmatrix} 1 \\ 1 \end{pmatrix}, \begin{pmatrix} 1 \\ -1 \end{pmatrix} \right\}.

Setting x1(11)+x2(1−1)=(37)x_1\begin{pmatrix} 1 \\ 1 \end{pmatrix} + x_2\begin{pmatrix} 1 \\ -1 \end{pmatrix} = \begin{pmatrix} 3 \\ 7 \end{pmatrix} gives

x1+x2=3,x1−x2=7.\begin{align*} x_1 + x_2 &= 3, \\ x_1 - x_2 &= 7. \end{align*}

Adding the equations,

2x1=10x1=5,\begin{align*} 2x_1 &= 10 \\ x_1 &= 5, \end{align*}

so x2=3−5=−2x_2 = 3 - 5 = -2 and [v]B=(5−2)[\mathbf{v}]_B = \begin{pmatrix} 5 \\ -2 \end{pmatrix}. With the reversed ordered basis B′={(1−1),(11)}B' = \left\{ \begin{pmatrix} 1 \\ -1 \end{pmatrix}, \begin{pmatrix} 1 \\ 1 \end{pmatrix} \right\} the answer flips to (−25)\begin{pmatrix} -2 \\ 5 \end{pmatrix} — same vector, different label, so always respect the given order.

The reason coordinate vectors are safe to compute with is that they respect all the vector space operations:

Note

Theorem 1
If BB is an ordered basis for a vector space VV over a field F\mathbb{F} and u,v∈V\mathbf{u}, \mathbf{v} \in V and λ∈F\lambda \in \mathbb{F}, then
a) u=v\mathbf{u} = \mathbf{v} if and only if [u]B=[v]B[\mathbf{u}]_B = [\mathbf{v}]_B,
b) [u+v]B=[u]B+[v]B[\mathbf{u} + \mathbf{v}]_B = [\mathbf{u}]_B + [\mathbf{v}]_B,
c) [λv]B=λ[v]B[\lambda\mathbf{v}]_B = \lambda[\mathbf{v}]_B.

Basically nothing is lost in translation between VV and Fn\mathbb{F}^n; adding vectors adds their coordinate vectors, scaling scales them, and equal coordinate vectors mean equal vectors (this last part is exactly the uniqueness of linear combinations from 6.5.2). This is why a question about polynomials or matrices can always be converted into a question about columns of numbers.

6.8 Further important examples of vector spaces#

This section is marked [X] — it is MATH1241/extension material, and regarded as harder than the rest of the chapter.

So far nearly all the worked examples lived in Rn\mathbb{R}^n. Here we apply the whole toolkit — subspaces, spans, independence, bases, dimension, coordinate vectors — to three other families: matrices, real-valued functions, and polynomials. First, a streamlined subspace test.

Note

Theorem 1 (Alternative Subspace Theorem)
A subset SS of a vector space VV over a field F\mathbb{F} is a subspace of VV if and only if SS contains the zero vector and satisfies the closure condition:

if v1,v2∈S, then λ1v1+λ2v2∈S for all λ1,λ2∈F.\text{if } \mathbf{v}_1, \mathbf{v}_2 \in S, \text{ then } \lambda_1\mathbf{v}_1 + \lambda_2\mathbf{v}_2 \in S \text{ for all } \lambda_1, \lambda_2 \in \mathbb{F}.

This is just the Subspace Theorem with the two closure checks merged into one; taking λ1=λ2=1\lambda_1 = \lambda_2 = 1 recovers closure under addition, and taking λ2=0\lambda_2 = 0 recovers closure under scalar multiplication. One line of working instead of two.

6.8.1 Vector spaces of matrices#

Recall from 6.1 that Mmn(R)M_{mn}(\mathbb{R}), the set of all m×nm \times n real matrices, is a vector space over R\mathbb{R} (and Mmn(C)M_{mn}(\mathbb{C}) over C\mathbb{C}).

Example. The set S={A∈M22(R):[A]11=[A]22=1}S = \{A \in M_{22}(\mathbb{R}) : [A]_{11} = [A]_{22} = 1\} is not a subspace of M22(R)M_{22}(\mathbb{R}); the zero matrix has 00s on its diagonal, so 0∉S\mathbf{0} \notin S and we are done in one line.

Example. Prove that the set of n×nn \times n real symmetric matrices is a subspace of Mnn(R)M_{nn}(\mathbb{R}).

Recall that AA is symmetric if A=ATA = A^T. Let SS be the set of n×nn \times n symmetric matrices. The zero matrix is clearly symmetric, so 0∈S\mathbf{0} \in S. Suppose A,B∈SA, B \in S and λ,μ∈R\lambda, \mu \in \mathbb{R}. Using the properties of the transpose and the symmetry of AA and BB,

(λA+μB)T=λAT+μBT=λA+μB,\begin{align*} (\lambda A + \mu B)^T &= \lambda A^T + \mu B^T \\ &= \lambda A + \mu B, \end{align*}

so λA+μB\lambda A + \mu B is symmetric and belongs to SS. By the Alternative Subspace Theorem, SS is a subspace. ■\blacksquare

For 1≤i≤m1 \leq i \leq m and 1≤j≤n1 \leq j \leq n, let EijE_{ij} be the m×nm \times n matrix with every entry 00 except a 11 in the ijijth position. Any matrix A=(aij)A = (a_{ij}) can be written as A=∑i∑jaijEijA = \sum_{i}\sum_{j} a_{ij}E_{ij}, and this combination is 0\mathbf{0} only when every aij=0a_{ij} = 0, so the set {Eij}\{E_{ij}\} is a linearly independent spanning set — the standard basis for MmnM_{mn}. Counting its members confirms dim⁡(Mmn)=mn\dim(M_{mn}) = mn.

Example. Show that the set {(1110),(1102),(1012),(0112)}\left\{ \begin{pmatrix} 1 & 1 \\ 1 & 0 \end{pmatrix}, \begin{pmatrix} 1 & 1 \\ 0 & 2 \end{pmatrix}, \begin{pmatrix} 1 & 0 \\ 1 & 2 \end{pmatrix}, \begin{pmatrix} 0 & 1 \\ 1 & 2 \end{pmatrix} \right\} is a basis for M22M_{22}.

Since dim⁡(M22)=4\dim(M_{22}) = 4 and we have exactly 44 matrices, Theorem 3 part 4 of 6.6.2 says we only need to prove independence. Suppose

λ1(1110)+λ2(1102)+λ3(1012)+λ4(0112)=(0000).\lambda_1\begin{pmatrix} 1 & 1 \\ 1 & 0 \end{pmatrix} + \lambda_2\begin{pmatrix} 1 & 1 \\ 0 & 2 \end{pmatrix} + \lambda_3\begin{pmatrix} 1 & 0 \\ 1 & 2 \end{pmatrix} + \lambda_4\begin{pmatrix} 0 & 1 \\ 1 & 2 \end{pmatrix} = \begin{pmatrix} 0 & 0 \\ 0 & 0 \end{pmatrix}.

Equating corresponding entries gives the homogeneous system with coefficient matrix

(1110110110110222)→R2=R2−R1R3=R3−R1(111000−110−1010222)→R2↔R3(11100−10100−110222)→R4=R4+2R2+2R3(11100−10100−110006).\begin{pmatrix} 1 & 1 & 1 & 0 \\ 1 & 1 & 0 & 1 \\ 1 & 0 & 1 & 1 \\ 0 & 2 & 2 & 2 \end{pmatrix} \xrightarrow{\substack{R_2 = R_2 - R_1 \\ R_3 = R_3 - R_1}} \begin{pmatrix} 1 & 1 & 1 & 0 \\ 0 & 0 & -1 & 1 \\ 0 & -1 & 0 & 1 \\ 0 & 2 & 2 & 2 \end{pmatrix} \xrightarrow{R_2 \leftrightarrow R_3} \begin{pmatrix} 1 & 1 & 1 & 0 \\ 0 & -1 & 0 & 1 \\ 0 & 0 & -1 & 1 \\ 0 & 2 & 2 & 2 \end{pmatrix} \xrightarrow{R_4 = R_4 + 2R_2 + 2R_3} \begin{pmatrix} 1 & 1 & 1 & 0 \\ 0 & -1 & 0 & 1 \\ 0 & 0 & -1 & 1 \\ 0 & 0 & 0 & 6 \end{pmatrix}.

Every column is leading, so the only solution is λ1=λ2=λ3=λ4=0\lambda_1 = \lambda_2 = \lambda_3 = \lambda_4 = 0; the set is independent and hence a basis. Notice that the four columns of the coefficient matrix are exactly the coordinate vectors of the four matrices with respect to the standard basis {E11,E12,E21,E22}\{E_{11}, E_{12}, E_{21}, E_{22}\} — coordinate vectors quietly converted a matrix problem into an R4\mathbb{R}^4 problem.

6.8.2 Vector spaces of real-valued functions#

Let XX be a non-empty set and let R[X]={f:X→R}\mathbb{R}[X] = \{f : X \to \mathbb{R}\} be the set of all real-valued functions on XX, with the usual pointwise operations

(f+g)(x)=f(x)+g(x)and(λf)(x)=λf(x)for all x∈X.(f + g)(x) = f(x) + g(x) \quad \text{and} \quad (\lambda f)(x) = \lambda f(x) \quad \text{for all } x \in X.

Note

Proposition 2
The system (R[X],+,∗,R)(\mathbb{R}[X], +, *, \mathbb{R}) is a vector space over R\mathbb{R}.

The proof is the usual slog through the ten axioms, but nothing is deep; for instance f+gf + g is again a real-valued function on XX because f(x)+g(x)f(x) + g(x) is defined and real for every x∈Xx \in X, giving closure under addition, and each axiom for functions falls back onto the corresponding property of the real numbers. The zero vector is the zero function, which sends every xx to 00.

Calculus is a rich source of subspaces of R[X]\mathbb{R}[X]:

  • C[(a,b)]C[(a, b)], the set of continuous functions on an interval (a,b)(a, b), is a subspace of R[(a,b)]\mathbb{R}[(a,b)]; the zero function is continuous, and λ1f+λ2g\lambda_1 f + \lambda_2 g is continuous whenever ff and gg are (a fact from calculus), so the Alternative Subspace Theorem applies.
  • C(1)[(a,b)]C^{(1)}[(a, b)], the functions with a continuous first derivative, is a subspace of R[(a,b)]\mathbb{R}[(a,b)] by the identical argument (and it is also a subspace of C[(a,b)]C[(a,b)], since differentiable functions are continuous).

Example. Let SS be the subset of R[R]\mathbb{R}[\mathbb{R}] defined by

S={f∈R[R]:d2fdx2−6dfdx+5f=0}.S = \left\{ f \in \mathbb{R}[\mathbb{R}] : \frac{d^2f}{dx^2} - 6\frac{df}{dx} + 5f = 0 \right\}.

Show that SS is a subspace of R[R]\mathbb{R}[\mathbb{R}].

The zero function satisfies the equation, so 0∈S\mathbf{0} \in S. For f1,f2∈Sf_1, f_2 \in S and λ1,λ2∈R\lambda_1, \lambda_2 \in \mathbb{R}, the linearity of differentiation gives

d2dx2(λ1f1+λ2f2)−6ddx(λ1f1+λ2f2)+5(λ1f1+λ2f2)=λ1(d2f1dx2−6df1dx+5f1)+λ2(d2f2dx2−6df2dx+5f2)=λ1⋅0+λ2⋅0=0,\begin{align*} \frac{d^2}{dx^2}(\lambda_1f_1 + \lambda_2f_2) - 6\frac{d}{dx}(\lambda_1f_1 + \lambda_2f_2) + 5(\lambda_1f_1 + \lambda_2f_2) &= \lambda_1\left( \frac{d^2f_1}{dx^2} - 6\frac{df_1}{dx} + 5f_1 \right) + \lambda_2\left( \frac{d^2f_2}{dx^2} - 6\frac{df_2}{dx} + 5f_2 \right) \\ &= \lambda_1 \cdot 0 + \lambda_2 \cdot 0 \\ &= 0, \end{align*}

so λ1f1+λ2f2∈S\lambda_1f_1 + \lambda_2f_2 \in S, and by the Alternative Subspace Theorem SS is a subspace. ■\blacksquare

From the theory of differential equations, the solutions of this ODE are exactly f(x)=λ1e5x+λ2exf(x) = \lambda_1e^{5x} + \lambda_2e^x, so S=span(e5x,ex)S = \text{span}(e^{5x}, e^x) — a 22-dimensional space of functions. This is precisely why the "general solution" of a second order homogeneous linear ODE is written as arbitrary constants times two basis solutions; the solution set is a subspace and you are writing down a basis for it. Subspaces can also be carved out by integrals, e.g. {f∈C[−π,π]:∫−ππf(x)g(x) dx=0}\left\{ f \in C[-\pi, \pi] : \int_{-\pi}^{\pi} f(x)g(x)\,dx = 0 \right\} for a fixed continuous gg is a subspace, since integration is also linear.

Linear independence questions for functions work as in the example of 6.5.1 ({sin⁡x,cos⁡x}\{\sin x, \cos x\} independent, {1,sin⁡2x,cos⁡2x}\{1, \sin^2 x, \cos^2 x\} dependent). One further result is worth knowing: for every nn, the set {sin⁡(kx):k=1,…,n}\{\sin(kx) : k = 1, \dots, n\} is linearly independent — the slick proof multiplies ∑kλksin⁡(kx)=0\sum_k \lambda_k\sin(kx) = 0 by sin⁡(mx)\sin(mx), integrates from 00 to π\pi, and uses

∫0πsin⁡(kx)sin⁡(mx) dx={0k≠mπ2k=m\int_0^{\pi} \sin(kx)\sin(mx)\,dx = \begin{cases} 0 & k \neq m \\ \tfrac{\pi}{2} & k = m \end{cases}

to force λm=0\lambda_m = 0 for each mm (this is an integral version of the orthonormal basis trick from 6.6.1). Since R[R]\mathbb{R}[\mathbb{R}] contains arbitrarily large independent sets, it cannot be spanned by any finite set; it is an infinite dimensional vector space.

6.8.3 Vector spaces of polynomials#

Here the field F\mathbb{F} is always R\mathbb{R} or C\mathbb{C}. A polynomial over F\mathbb{F} is a function p:F→Fp : \mathbb{F} \to \mathbb{F} of the form p(z)=a0+a1z+⋯+anznp(z) = a_0 + a_1z + \cdots + a_nz^n with the ak∈Fa_k \in \mathbb{F}; addition adds corresponding coefficients and scalar multiplication multiplies each coefficient, exactly as for general functions. The key structural fact is:

Note

Proposition 3 (Uniqueness Proposition for Real and Complex Polynomials)
Let p(z)=∑k=0nakzkp(z) = \sum_{k=0}^{n} a_kz^k and q(z)=∑k=0nbkzkq(z) = \sum_{k=0}^{n} b_kz^k be polynomials over F=R\mathbb{F} = \mathbb{R} or C\mathbb{C}. Then p(z)=q(z)p(z) = q(z) for all z∈Fz \in \mathbb{F} if and only if ak=bka_k = b_k for all k=0,1,…,nk = 0, 1, \dots, n.

In particular pp is the zero polynomial (zero for all zz) if and only if every coefficient is zero. This proposition is the licence behind every "compare coefficients" step we have done; it converts an equation between polynomials into a linear system for the coefficients. (It fails over more exotic fields, but we will not meet those here.)

The set P(F)\mathbb{P}(\mathbb{F}) of all polynomials over F\mathbb{F}, with these operations, is a vector space over F\mathbb{F}, and Pn(F)\mathbb{P}_n(\mathbb{F}) is a subspace of it (both seen earlier). The field of scalars has to be compatible with the polynomials though:

Example. The system (P(C),+,∗,R)(\mathbb{P}(\mathbb{C}), +, *, \mathbb{R}) of complex polynomials with real scalars is a vector space, but (P(R),+,∗,C)(\mathbb{P}(\mathbb{R}), +, *, \mathbb{C}) of real polynomials with complex scalars is not; take p(x)=x∈P(R)p(x) = x \in \mathbb{P}(\mathbb{R}) and the scalar i∈Ci \in \mathbb{C}, then ip∉P(R)ip \notin \mathbb{P}(\mathbb{R}), so closure under scalar multiplication fails (all other nine axioms actually hold, which shows how a system can fail by a single axiom).

Example. Let Pn\mathbb{P}_n be the polynomials of degree at most nn over F\mathbb{F}. Show that

S={p∈Pn:p(5)=α}S = \{p \in \mathbb{P}_n : p(5) = \alpha\}

is a subspace of Pn\mathbb{P}_n if and only if α=0\alpha = 0.

If α≠0\alpha \neq 0, the zero polynomial is not in SS (it evaluates to 0≠α0 \neq \alpha at 55), so SS is not a subspace. If α=0\alpha = 0, the zero polynomial is in SS, and for p,q∈Sp, q \in S and λ1,λ2∈F\lambda_1, \lambda_2 \in \mathbb{F},

(λ1p+λ2q)(5)=λ1p(5)+λ2q(5)=λ1⋅0+λ2⋅0=0,\begin{align*} (\lambda_1p + \lambda_2q)(5) &= \lambda_1p(5) + \lambda_2q(5) \\ &= \lambda_1 \cdot 0 + \lambda_2 \cdot 0 \\ &= 0, \end{align*}

so λ1p+λ2q∈S\lambda_1p + \lambda_2q \in S and, by the Alternative Subspace Theorem, SS is a subspace. Therefore SS is a subspace if and only if α=0\alpha = 0; when α=0\alpha = 0, SS is the set of polynomials in Pn\mathbb{P}_n with a root at z=5z = 5.

Example. Does the complex polynomial pp belong to span(p1,p2)\text{span}(p_1, p_2), where

p(z)=4+z+2z2,p1(z)=1+z−z2,p2(z)=2−z?p(z) = 4 + z + 2z^2, \quad p_1(z) = 1 + z - z^2, \quad p_2(z) = 2 - z?

We need scalars x1,x2x_1, x_2 with p=x1p1+x2p2p = x_1p_1 + x_2p_2; comparing coefficients of 1,z,z21, z, z^2 (using the Uniqueness Proposition),

x1+2x2=4,x1−x2=1,−x1=2.\begin{align*} x_1 + 2x_2 &= 4, \\ x_1 - x_2 &= 1, \\ -x_1 &= 2. \end{align*}

The third equation forces x1=−2x_1 = -2, then the second gives x2=x1−1=−3x_2 = x_1 - 1 = -3, but then

x1+2x2=−2−6=−8≠4,x_1 + 2x_2 = -2 - 6 = -8 \neq 4,

so the system is inconsistent and p∉span(p1,p2)p \notin \text{span}(p_1, p_2).

Example. Show that the set S={2+z,−1+z2,z−z2}S = \{2 + z, -1 + z^2, z - z^2\} is a basis for P2\mathbb{P}_2.

Since dim⁡(P2)=3\dim(\mathbb{P}_2) = 3 and SS contains exactly 33 vectors, we only need to check independence (Theorem 3 part 4 again). Suppose x1(2+z)+x2(−1+z2)+x3(z−z2)=0x_1(2 + z) + x_2(-1 + z^2) + x_3(z - z^2) = 0 for all zz. Collecting powers of zz,

(2x1−x2)+(x1+x3)z+(x2−x3)z2=0,(2x_1 - x_2) + (x_1 + x_3)z + (x_2 - x_3)z^2 = 0,

so, comparing coefficients,

2x1−x2=0,x1+x3=0,x2−x3=0.\begin{align*} 2x_1 - x_2 &= 0, \\ x_1 + x_3 &= 0, \\ x_2 - x_3 &= 0. \end{align*}

The second equation gives x3=−x1x_3 = -x_1 and the first gives x2=2x1x_2 = 2x_1; substituting both into the third,

2x1−(−x1)=03x1=0x1=0,\begin{align*} 2x_1 - (-x_1) &= 0 \\ 3x_1 &= 0 \\ x_1 &= 0, \end{align*}

and hence x2=x3=0x_2 = x_3 = 0. The set is linearly independent, and therefore a basis for P2\mathbb{P}_2.

Finally, P\mathbb{P} itself has no finite basis; if a finite set SS of polynomials spanned P\mathbb{P}, there would be a highest-degree polynomial in SS, say of degree NN, and then no polynomial of degree greater than NN could ever be in span(S)\text{span}(S) (linear combinations cannot raise the degree). Hence P\mathbb{P} is infinite dimensional, while

dim⁡(Pn)=n+1.\boxed{\dim(\mathbb{P}_n) = n + 1.}

6.9 A brief review of set and function notation#

This is a quick reference appendix; nothing here is new.

A set is any collection of elements, written with braces, e.g. S={1,4,−7}S = \{1, 4, -7\}. Sets defined by a rule use set-builder notation:

S={x∈Rn:x1≥0,x3≤4}S = \{\mathbf{x} \in \mathbb{R}^n : x_1 \geq 0, x_3 \leq 4\}

reads "the set of vectors x\mathbf{x} in Rn\mathbb{R}^n such that x1≥0x_1 \geq 0 and x3≤4x_3 \leq 4" — the colon is read as "such that" and the comma as "and".

  • Equality. A=BA = B means every element of AA is in BB and every element of BB is in AA; proving equality always means proving both inclusions.
  • Subset. A⊆BA \subseteq B means every element of AA is also an element of BB.
  • Proper subset. AA is a proper subset of BB if A⊆BA \subseteq B and at least one element of BB is not in AA.
  • Intersection. A∩B={x:x∈A and x∈B}A \cap B = \{x : x \in A \text{ and } x \in B\}.
  • Union. A∪B={x:x∈A or x∈B}A \cup B = \{x : x \in A \text{ or } x \in B\}.

The notation f:X→Yf : X \to Y reads "ff is a function from the set XX to the set YY"; it means ff assigns exactly one element f(x)∈Yf(x) \in Y to each x∈Xx \in X. XX is the domain and YY the codomain. Two functions f,g:X→Yf, g : X \to Y are equal if and only if f(x)=g(x)f(x) = g(x) for all x∈Xx \in X (this "for all" is what made the polynomial and function examples in this chapter tick). The operations used throughout the chapter are all defined pointwise:

(f+g)(x)=f(x)+g(x),(λf)(x)=λ(f(x)),(fg)(x)=f(x)g(x),(f∘g)(x)=f(g(x)).\begin{align*} (f + g)(x) &= f(x) + g(x), \\ (\lambda f)(x) &= \lambda\big(f(x)\big), \\ (fg)(x) &= f(x)g(x), \\ (f \circ g)(x) &= f\big(g(x)\big). \end{align*}

Only the first two matter for vector space structure; multiplication and composition of functions are extra operations that vector spaces know nothing about.