chapter 5 subspacesisoptera.lcsc.edu/~hamoon/files/math340s19/applinspiredl...petpics, a pet...

24
Chapter 5 Subspaces PetPics, a pet photography company specializing in portraits, wants to post photos for clients to review, but to protect their artistic work, they only post electronic versions that have copyright text. The text is added to all images, produced by the company, by overwriting, with zeros, in the appropriate pixels, as shown in Figure 5.1. Only pictures that have zeros in these pixels are considered legitimate images. The company also wants to allow clients to make some adjustments to the pictures: the adjustments include brightening/darkening, and adding background or little gures like hearts, owers, or squirrels. It turns out that these operations can all be accomplished by adding other legitimate images and multiplying by scalars, as dened in Chapter 3. It is certainly true that the set of all legitimate images of the company’s standard (m × n)-pixel size is contained in the vector space I m×n of all m × n images, so we could mathematically work in this larger space. But, astute employees of the company who enjoy thinking about linear algebra notice that actually the set of legitimate images satises the 10 properties of a vector space in its own right. Specically, adding any two images with the copyright text (for example, adding a squirrel to the portrait of a golden retriever) produces another image with the same copyright text, and multiplying an image with the copyright text by a scalar (say, to brighten it) still results in an image with the copyright text. Hence, it suces to work with the smaller set of legitimate images, later called a subspace. In fact, very often the sets of objects that we want to focus on are actually only parts (called subsets ) of the larger vector spaces, and it is useful to know when those sets form a vector space separately from the larger vector space. 77

Upload: others

Post on 17-Jul-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Chapter 5 Subspacesisoptera.lcsc.edu/~hamoon/files/Math340S19/ApplInspiredL...PetPics, a pet photography company specializing in portraits, wants to post photos for clients to review,

Chapter 5

Subspaces

PetPics, a pet photography company specializing in portraits, wants to postphotos for clients to review, but to protect their artistic work, they only postelectronic versions that have copyright text. The text is added to all images,produced by the company, by overwriting, with zeros, in the appropriatepixels, as shown in Figure 5.1. Only pictures that have zeros in these pixelsare considered legitimate images.

The company also wants to allow clients to make some adjustments tothe pictures: the adjustments include brightening/darkening, and addingbackground or little figures like hearts, flowers, or squirrels. It turns out thatthese operations can all be accomplished by adding other legitimate imagesand multiplying by scalars, as defined in Chapter 3.

It is certainly true that the set of all legitimate images of the company’sstandard (m×n)-pixel size is contained in the vector space Im×n of all m×nimages, so we could mathematically work in this larger space. But, astuteemployees of the company who enjoy thinking about linear algebra noticethat actually the set of legitimate images satisfies the 10 properties of a vectorspace in its own right. Specifically, adding any two images with the copyrighttext (for example, adding a squirrel to the portrait of a golden retriever)produces another image with the same copyright text, and multiplying animage with the copyright text by a scalar (say, to brighten it) still results inan image with the copyright text. Hence, it suffices to work with the smallerset of legitimate images, later called a subspace.

In fact, very often the sets of objects that we want to focus on are actuallyonly parts (called subsets) of the larger vector spaces, and it is useful to knowwhen those sets form a vector space separately from the larger vector space.

77

Page 2: Chapter 5 Subspacesisoptera.lcsc.edu/~hamoon/files/Math340S19/ApplInspiredL...PetPics, a pet photography company specializing in portraits, wants to post photos for clients to review,

78 CHAPTER 5. SUBSPACES

Figure 5.1: Example Proof photos from PetPics, with copyright text.

Here are some examples of subsets of vector spaces that we have encoun-tered so far.

1. Solution sets of homogeneous linear equations, with n variables, aresubsets of Rn.

2. Radiographs are images with nonnegative values and represent a subsetof the larger vector space of images with the given geometry.

3. The set of even functions on R is a subset of the vector space of func-tions on R.

4. Polynomials of order 3 form a subset of the vector space P5(R).

5. Heat states on a rod in a diffusion welding process (the collection ofwhich is Hm(R)) form a subset of all possible heat states because thetemperature is fixed at the ends of the rod.

6. The set of sequences with exactly 10 nonzero terms is a subset of theset of sequences with a finite number of terms.

Even though operations like vector addition and scalar multiplication onthe subset are typically the same as the operations on the larger parentspaces, we still often wish to work in the smaller more relevant subset ratherthan thinking about the larger ambient space. When does the subset behavelike a vector space in its own right? In general, when is a subset of a vectorspace also a vector space?

Page 3: Chapter 5 Subspacesisoptera.lcsc.edu/~hamoon/files/Math340S19/ApplInspiredL...PetPics, a pet photography company specializing in portraits, wants to post photos for clients to review,

5.1. SUBSETS AND SUBSPACES 79

5.1 Subsets and Subspaces

Let (V,+, ·) be a vector space. In this section we discuss the restrictions on asubset of a vector space that will guarantee the subset is also a vector space.Recall that a subset of V is a set that contains only elements of V . Moreprecisely, we define subset here.

Definition 5.1.1. Let V and W be sets. We say that W is a subsetof V if every element of W is an element of V and we write W ⊂ Vor W ⊆ V . In the case where W �= V (there are elements of V thatare not in W ), we say that W is a proper subset of V and we writeW � V .

In a vector space context, we always assume the same operations on Was we have defined on V .

Let W be a subset of V . We are interested in subsets that also satisfythe vector space properties (Recall Definition 3.2.1).

Definition 5.1.2. Let (V,+, ·) be a vector space over a field F. IfW ⊆ V , then we say that W is a subspace of (V,+, ·) whenever (W,+, ·)is also a vector space.

Now consider which vector space properties of (V,+, ·) must also be true ofthe subset W . Which properties are not necessarily true? The commutative,associative, and distributive properties still hold because the operation arethe same, the scalars come from the same scalar field, and elements of Wcome from the set V . Therefore, since these properties hold true in V , theyhold true in W . We say that these properties are inherited from V since Vis like a parent set to W . Also, since, we do not change the scalar set whenconsidering a subset, the scalar 1 is still an element of the scalar set. Thistells us that we can determine whether a subset of a vector space is, itself,a vector space, by checking those properties that depend on how the subsetdiffers from the parent vector space. The properties we need to check are

(P1) W is closed under addition.

(P2) W is closed under scalar multiplication.

(P8) W contains the additive identity, denoted 0.

Page 4: Chapter 5 Subspacesisoptera.lcsc.edu/~hamoon/files/Math340S19/ApplInspiredL...PetPics, a pet photography company specializing in portraits, wants to post photos for clients to review,

80 CHAPTER 5. SUBSPACES

(P9) W contains additive inverses.

With careful consideration, we see that (P9) is implied by the other three(see Exercise 9). The following theorem states that we need only test forproperties (P1), (P2), and (P8) in order to determine whether a subset is asubspace.

Theorem 5.1.1. Let (V,+, ·) be a vector space over a field F. Then(W,+, ·) is a subspace of V if and only if 0 ∈ W and W is closed undervector addition and scalar multiplication.

Note: When discussing subspaces, we tend to leave off using the notation(W,+, ·) and write W instead because the operations are understood in thecontext of (V,+, ·).

Remark: In Exercise 10, we see that as long asW is nonempty and satisfiesboth (P1) and (P2), W will automatically satisfy (P8). So why keep thecondition (P8) in Theorem 5.1.1? It turns out that one can often easilydetermine that a subset is not a subspace by showing that the subset doesnot contain the zero vector.

The following two results give convenient ways to check for closure underaddition and scalar multiplication. In other words, if you want to prove that aset is a subspace, it is generally easier to use Theorem 5.1.2 or Corollary 5.1.1.

Theorem 5.1.2. Let (V,+, ·) be a vector space over a field F withoperations of addition (+) and scalar multiplication (·), and Let X bea nonempty subset of V . Then X is closed under both addition andscalar multiplication if and only if for all pairs of vectors x, y ∈ Xand for all scalars α, β ∈ F, α · x+ β · y ∈ X.

Note: Both theorem statements above contain the phrase “if and only if,”which is mathematical language that we will see often in this course. Thisphrase is another way of saying that two statements are equivalent. In The-orem 5.1.2, the statement “X is closed under both addition and scalar mul-

Page 5: Chapter 5 Subspacesisoptera.lcsc.edu/~hamoon/files/Math340S19/ApplInspiredL...PetPics, a pet photography company specializing in portraits, wants to post photos for clients to review,

5.1. SUBSETS AND SUBSPACES 81

tiplication if and only if X has the property that for all x, y ∈ X and for allα, β ∈ F, α · x+ β · y ∈ X” means

• X is closed under both addition and scalar multiplication only if forevery x, y ∈ X and for every α, β ∈ R, α ·x+β ·y ∈ X. In other words,if X is closed under both addition and scalar multiplication, then forall x, y ∈ X and for all α, β ∈ F, α · x+ β · y ∈ X, and

• X is closed under both addition and scalar multiplication if for allx, y ∈ X and for all α, β ∈ F, α · x+ β · y ∈ X. In other words, if forall x, y ∈ X and for all α, β ∈ R, α · x + β · y ∈ X, then X is closedunder both addition and scalar multiplication.

To show something holds true for all elements of a set, we need only assignnames to arbitrary elements and show that the property holds for thoseelements. As they are arbitrary, we know the result must hold for all elementsin the set. In the following proof, watch for this technique when we choosevectors from V and scalars from F.

Proof. (⇒) We first prove the forward direction of the theorem statement:

If X is closed under addition and closed under scalar multiplica-tion, then for all x, y ∈ X and for all α, β ∈ F, α · x+ β · y ∈ X.

Suppose X is closed under addition and scalar multiplication, and thatx and y are in V and α and β are in F. Since X is closed under scalarmultiplication, we know that αx and βy are in X. But then since X is alsoclosed under addition, we conclude that αx + βy is in X. Since this is truefor all α, β ∈ F and x, y ∈ X, we conclude that X has the property that forall x, y ∈ X and for all α, β ∈ F, α · x+ β · y ∈ X.

(⇐) Next we prove the backward direction of the theorem statement:

If for all x, y ∈ X and for all α, β ∈ F, α · x+ β · y ∈ X, then Xis closed under addition and closed under scalar multiplication.

Suppose X has the property that for all x, y ∈ X and for all α, β ∈ F,α · x + β · y ∈ X. Now let x ∈ X and α ∈ F, and fix β = 0 ∈ F and y = 0,the zero vector. Then αx + βy = αx + 0 = αx is in X. Hence X is closedunder scalar multiplication. Finally, let x, y ∈ X and α = β = 1. Then wecan also conclude that αx+βy = 1x+1y = x+ y is in X, and so X is closedunder addition.

Page 6: Chapter 5 Subspacesisoptera.lcsc.edu/~hamoon/files/Math340S19/ApplInspiredL...PetPics, a pet photography company specializing in portraits, wants to post photos for clients to review,

82 CHAPTER 5. SUBSPACES

It is often even simpler to check the conditions for the following similarresult1, whose proof is in the exercises.

Corollary 5.1.1. Consider a set of objects X, scalars in R, and op-eration + (addition) and · (scalar multipication) defined on X. ThenX is closed under both addition and scalar multiplication if and only ifα · x+ y ∈ X for all x, y ∈ X and each α ∈ R.

5.2 Examples

Every vector space (V,+, ·) has the following two subspaces (and many vectorspaces have many more subspaces).

Theorem 5.2.1. Let (V,+, ·) be a vector space. Then V is itself asubspace of (V,+, ·).

Proof. Since every set is a subset of itself, the result follows from Defini-tion 5.1.2.

Theorem 5.2.2. Let (V,+, ·) be a vector space. Then the set {0} is asubspace of (V,+, ·).

Proof. See Exercise 13.

Example 5.2.1. Recall Example 4.4.2 from the last chapter. Let V ∈ R3 bethe set of all solutions to the equation x1 + 3x2 − x3 = 0. V is a subspace ofR3, with the standard operations.

More generally, as we saw in the last chapter, the set of solutions to anyhomogeneous linear equation with n variables is a subspace of (Rn,+, ·).

1A corollary is a result whose proof follows from a theorem; in this case Corollary 5.1.1is a corollary to Theorem 5.1.2.

Page 7: Chapter 5 Subspacesisoptera.lcsc.edu/~hamoon/files/Math340S19/ApplInspiredL...PetPics, a pet photography company specializing in portraits, wants to post photos for clients to review,

5.2. EXAMPLES 83

Example 5.2.2. Consider the coordinate axes as a subset of the vector spaceR2. That is, let T ⊂ R2 be defined by

T = {x = (x1, x2) ∈ R2|x1 = 0 or x2 = 0}.

T is not a subspace of (R2,+, ·), because although 0 is in T , making T �= ∅,T does not have the property that for all x, y ∈ T and for all α, β ∈ R,α · x + β · y ∈ T . To verify this, we need only to produce one example ofvectors x, y in T and scalars α, β in R so that αx + βy is not in T . Noticethat x = (0, 1), y = (1, 0) are elements of T and α = β = 1 are in R. Since1 ·x+1 ·y = (1, 1) which is not in T , T does not satisfy the subspace property.(Notice, there are many other vectors and scalars that we could have chosento show how this subspace property is not satisfied.)

Remark: The example produced above is called a counterexample.

Example 5.2.3. Consider W = {(a, b, c) ∈ R3 | c = 0}. W is a subspace ofR3, with the standard operations. See Exercise 5.

Example 5.2.4. Consider the set of images

V = {I| I is of the form below and a, b, c ∈ R}.

I =

c− a2a

a

c+ b

b+ 2c

c

b

b

a− b

a

a+ b

a− c

a

Page 8: Chapter 5 Subspacesisoptera.lcsc.edu/~hamoon/files/Math340S19/ApplInspiredL...PetPics, a pet photography company specializing in portraits, wants to post photos for clients to review,

84 CHAPTER 5. SUBSPACES

V is a subspace of the space of images with the same geometric configu-ration.

Proof. Let V be defined as above. To show this result, we will show that Vsatisfies Theorem 5.1.1. We can see that the set of images V is a subset ofthe vector space of all images with the same geometric configuration.

Next, notice that V is nonempty since the 0 image (the image with a =b = c = 0) is in the set V . Now, we need to show that the set is closed underscalar multiplication and addition. Let α ∈ R, be scalars and let I1, I2 ∈ V .I1 is described by the three real numbers a1, b1, c1, and I2 is described by thethree real numbers a2, b2, c2.

I1 =

c1 − a12a1

a1

c1 + b1

b1 + 2c1

c1

b1

b1

a1 − b1

a1 + b1

a1 − c1

a1

a1

Page 9: Chapter 5 Subspacesisoptera.lcsc.edu/~hamoon/files/Math340S19/ApplInspiredL...PetPics, a pet photography company specializing in portraits, wants to post photos for clients to review,

5.2. EXAMPLES 85

I2 =

c2 − a22a2

a2

c2 + b2

b2 + 2c2

c2

b2

b2

a2 − b2

a2

a2 + b2

a2 − c2

a2

We can see that αI1+ I2 is also in V because this new image is describedby the three real numbers αa1+a2, αb1+ b2, αc1+ c2, in precisely the correctarrangement as given by the definition of V . Indeed, the pixel intensity inthe pixel on the bottom left of αI1 + I2 is

α(a1 − c1) + a2 − c2 = αa1 + a2 − (αc1 − c2) ∈ R.

Similarly, we can see that each pixel intensity will be a real number.(Try afew yourself to be sure you agree.) Thus V is a subspace of images that arelaid out in the geometric configuration given above.

Notice that this result also means that V is a vector space.

Example 5.2.5. Let V = {ax2 + bx + c | a + b = 2, a + b + c = 0}. Vis a subset of the vector space (P2,+, ·). Notice that the zero vector of P2,0(x) = 0x2 + 0x+ 0, is not in V . So, by Definition 3.2.1, V is not a vectorspace and, therefore, not a subspace of (P2,+, ·). That is, V does not satisfyDefinition 5.1.2.

For the next example, let us first define the transpose of a matrix.

Page 10: Chapter 5 Subspacesisoptera.lcsc.edu/~hamoon/files/Math340S19/ApplInspiredL...PetPics, a pet photography company specializing in portraits, wants to post photos for clients to review,

86 CHAPTER 5. SUBSPACES

Definition 5.2.1. Let A be the r × c matrix given by

A =

a11 a12 . . . a1ca21 a22 . . . a2c...

. . ....

ar1 ar2 . . . arc

.

Then, the transpose of A, denoted AT, is the c× r matrix that is givenby

AT =

a11 a21 . . . ar1a12 a22 . . . ar2...

. . ....

a1c a2c . . . arc

.

In words, AT is the matrix whose rows are made from the columns ofA and whose columns are made from the rows of A.

Example 5.2.6. Let M =�u ∈ M2×2(R) | u = uT

�. That is, M is the

set of all 2 × 2 matrices with real valued entries that are equal to their owntranspose. M is a vector space?

Proof. Let M be defined as above. First, we note that M is a subset of thevector space M2×2(R), with the standard operations. We will show that Msatisfies Theorem 5.1.1. Notice that M contains the zero vector of M2×2(R),the two by two matrix of all zeros. Next, consider two arbitrary vectors uand v in M and arbitrary scalar α in R. We can show that αu+v = (αu+v)T

so that αu+ v is also in M . Indeed, let

u =

�a bc d

�and v =

�e fg h

�.

Page 11: Chapter 5 Subspacesisoptera.lcsc.edu/~hamoon/files/Math340S19/ApplInspiredL...PetPics, a pet photography company specializing in portraits, wants to post photos for clients to review,

5.3. PROPERTIES OF SUBSETS AND SUBSPACES 87

Then since u = uT and v = vT, we know that b = c and f = g. Thus

αu+ v = α ·�

a bb d

�+

�e ff h

=

�αa+ e αb+ fαb+ f αd+ h

=

�αa+ e αb+ fαb+ f αd+ h

�T

= (αu+ v)T.

Thus, M is a vector space (and a subspace of M2×2(R)).

5.3 Properties of Subsets and Subspaces

We now turn to more properties of subspaces and other methods of testingwhether subsets of vector spaces are subspaces.

Theorem 5.3.1. Let W1 and W2 be any two subspaces of a vectorspace (V,+, ·). Then W1 ∩W2 is a subspace of (V,+, ·).

Proof. Let W1 and W2 be subspaces of (V,+, ·). We will show that theintersection ofW1 andW2 is nonempty and closed under scalar multiplicationand vector addition. To show that W1∩W2 is nonempty, we notice that sinceboth W1 and W2 contain the zero vector, so does W1 ∩W2.

Now, let u and v be elements of W1 ∩W2 and let α be a scalar. Since W1

and W2 are closed under addition and scalar multiplication, we know thatα · u+ v is also in both W1 and W2. That is, α · u+ v is in W1 ∩W2, so byCorollary 5.1.1 W1 ∩W2 is closed under addition and scalar multiplication.

Thus, by Theorem 5.1.1, W1 ∩W2 is a subspace of (V,+, ·).

Theorem 5.3.1 provides a new method for determining if a subset is a sub-space. If the subset can be expressed as the intersection of known subspaces,then it also is a subspace.

Page 12: Chapter 5 Subspacesisoptera.lcsc.edu/~hamoon/files/Math340S19/ApplInspiredL...PetPics, a pet photography company specializing in portraits, wants to post photos for clients to review,

88 CHAPTER 5. SUBSPACES

Example 5.3.1. Consider the vector space of functions defined on R, de-noted F . We have shown that the set of even functions on R and the set ofcontinuous functions on R are both subspaces. Thus, by Theorem 5.3.1, theset of continuous even functions on R is also a subspace of F .

Example 5.3.2. The solution set of a single homogeneous equation in nvariables is a subspace of Rn (see Example 4.4.4). By Theorem 5.3.1, theintersection of the solution sets of any k homogeneous equations in n variablesis also subspace of Rn.

The next theorem tells us that the union of subspaces is a subspace onlywhen one subspace is a subset of the other. That is, in general, the union ofsubspaces is not a subspace.

Theorem 5.3.2. Let W1 and W2 be any two subspaces of a vectorspace V . Then W1 ∪W2 is a subspace of V if and only if W1 ⊆ W2 orW2 ⊆ W1.

Proof. (⇐) First, suppose thatW1 ⊆ W2. Then, we know thatW1∪W2 = W2

which is a subspace. Similarly, if W2 ⊆ W1 then W1 ∪W2 = W1 which is asubspace.

(⇒) (by contrapositive) Here we show the contrapositive. That is, assumethat neither subspace (W1 nor W2) contains the other. We will show that theunion, W1 ∪W2, is not a subspace. Since W1 �⊆ W2 and W2 �⊆ W1, we knowthat there is a vector u1 ∈ W1, with u1 �∈ W2 and there is another vectoru2 ∈ W2, with u2 �∈ W1. Since W1 and W2 both contain additive inversesand both are closed, u1 + u2 �∈ W1 and u1 + u2 �∈ W2. So, u1, u2 ∈ W1 ∪W2,but u1 + u2 �∈ W1 ∪W2. Thus, W1 ∪W2 is not closed and is not a subspaceof V .

Example 5.3.3. Consider the sets

W1 =�(a, b, 0, 0) ∈ R4 | a, b ∈ R

�,

W2 =�(0, 0, c, d) ∈ R4 | c, d ∈ R

�.

Both W1 and W2 are subpaces of R4, with the standard operations. By The-orem 5.3.1, W1 ∩ W2 is a subspace of (R4,+, ·). In particular, W1 ∩ W2 =

Page 13: Chapter 5 Subspacesisoptera.lcsc.edu/~hamoon/files/Math340S19/ApplInspiredL...PetPics, a pet photography company specializing in portraits, wants to post photos for clients to review,

5.3. PROPERTIES OF SUBSETS AND SUBSPACES 89

{(0, 0, 0, 0)}. By Theorem 5.3.2, W1 ∪ W2 is not a subspace of R4 becauseW1 �⊆ W2 and W2 �⊆ W1. We can write

W1 ∪W2 =�(a, b, c, d) ∈ R4 | a = b = 0 or c = d = 0

�.

Indeed, u = (1, 2, 0, 0) and v = (0, 0, 2, 4) are in W1 ∪ W2, but u + v =(1, 2, 2, 4) /∈ W1 ∪W2. So, W1 ∪W2 is not closed under addition.

We continue along this path of considering various “operations” we useto combine subspaces will result in another subspace. To do this, we definesum and direct sum of sets. In words, the sum of two sets is the set formedby adding all combinations of pairs of elements, one from each set. We definethis more rigorously in the following definition.

Definition 5.3.1. Let U1 and U2 be sets. We define the sum of U1

and U2, denoted U1 + U2, to be the set {u1 + u2 | u1 ∈ U1, u2 ∈ U2}.

Notice that to add two sets, they need not be the same size. Note alsothat the sum of two sets is a set that can be (but is not necessarily) strictlylarger than each of the two summand sets. This last comment can be seenin Example 5.3.4.

Example 5.3.4. Let U1 = {3, 4, 5}, and U2 = {1, 3}. Then

U1 + U2 ={u1 + u2 | u1 ∈ U1, u2 ∈ U2}= {3 + 1, 3 + 3, 4 + 1, 4 + 3, 5 + 1, 5 + 3}= {4, 5, 6, 7, 8} .

Example 5.3.5. Let U1 be the set of all scalar multiples of image A (seepage 26). Similarly, let U2 be the set of all scalar multiples of image B. Wecan show that U1 + U2 is a subspace of the vector space of 4 × 4 grayscaleimages. (See Exercise 17.)

In both of the previous two examples we notice that the sum of two setscan contain elements that are not elements of either set. This means thatthe sum of two sets is not necessarily equal to the union of the two sets. InExample 5.3.5 the sets U1 and U2 are both subspaces and their sum U1 +U2

is also a subspace. This leads us to consider whether this is always true. Wesee, in the next theorem, that the answer is yes.

Page 14: Chapter 5 Subspacesisoptera.lcsc.edu/~hamoon/files/Math340S19/ApplInspiredL...PetPics, a pet photography company specializing in portraits, wants to post photos for clients to review,

90 CHAPTER 5. SUBSPACES

Theorem 5.3.3. Let W1 and W2 be subspaces of a vector space(V,+, ·). Then W1 +W2 is a subspace of (V,+, ·).

Proof. Let S = W1 +W2. We will show that S contains the zero vector andis closed under addition and scalar multiplication.

SinceW1 andW2 are a subspaces of (V,+, ·), both contain the zero vector.Now, 0 being the additive identity, gives us 0 = 0 + 0 ∈ S.

Let x = x1 + x2 and y = y1 + y2 be arbitrary elements of S with x1, y1 ∈W1 and x2, y2 ∈ W2, and let α be an arbitrary scalar. Notice that, sinceαx1 + y1 ∈ W1 and αx2 + y2 ∈ W2,

αx+ y = (αx1 + y1) + (αx2 + y2) ∈ S.

Thus, by Corollary 5.1.1, S is also closed under scalar multiplication andvector addition. By Theorem 5.1.1, S is a subspace of V .

In words, Theorem 5.3.3 tells us that the sum of subspaces always resultsin a subspace. Of special interest are subspaces of the type considered inExample 5.3.5. That is, we are interested in the sum U1 + U2 for whichU1 ∩ U2 = {0}.

Definition 5.3.2. Let U1 and U2 be subspaces of vector space (V,+, ·)such that U1 ∩ U2 = {0} and V = U1 + U2. We say that V is thedirect sum of U1 and U2 and denote this by V = U1 ⊕ U2.

Remark: Because the direct sum is a special case of the sum of two sets,we know that the direct sum of two subspaces is also a subspace.

Example 5.3.6. Let U1 = {(a, 0) ∈ R2 | a ∈ R} and U2 = {(0, b) ∈ R2 | b ∈ R}.U1 can be represented by the set of all vectors along the x-axis and U2 canbe represented by the set of all vectors along the y-axis. Both U1 and U2 aresubspaces of R2, with the standard operations. And, U1 ⊕ U2 = R2.

Example 5.3.7. Consider the sets

U1 =�ax2 ∈ P2(R) | a ∈ R

�,

Page 15: Chapter 5 Subspacesisoptera.lcsc.edu/~hamoon/files/Math340S19/ApplInspiredL...PetPics, a pet photography company specializing in portraits, wants to post photos for clients to review,

5.4. GEOMETRY OF SUBSPACES OF (RN ,+, ·) 91

U2 = {ax ∈ P2(R) | a ∈ R} ,U3 = {a ∈ P2(R) | a ∈ R} .

We note that each subset is a subspace of (P2(R),+, ·). Notice also thatP2(R) = U1 + U2 + U3. Furthermore, each pair of subsets has the trivialintersection {0}. Thus, we have P2(R) = (U1 ⊕ U2)⊕U3. We typically writeP2(R) = U1 ⊕ U2 ⊕ U3 with the same understanding.

Examples 5.3.6 and 5.3.7 suggest that there might be a way to breakapart a vector space into the direct sum of subspaces. This fact will becomevery useful in later chapters.

5.4 Geometry of Subspaces of (Rn,+, ·)In Chapter 3, we introduced the n-dimensional Euclidean spaces Rn. Onenice aspect of these spaces is that they lend themselves to visualization: thespace R = R1 just looks like a number line, R2 is the xy-plane, and R3 canbe represented with x-, y-, and z-axes as pictured in Figure 5.2. For larger n,the space is harder to visualize, partly because we would have to add moreaxes and most likely because the world we live in is very much like R3. Aswe continue our study of linear algebra, you will start to gain more intuitionabout how to think about these higher dimensional spaces.

We have seen several examples of subspaces of (Rn,+, ·). In this sectionwe explore the geometry of such subspaces.

Theorem 5.4.1. Let L be a line through the origin in Rn. Then L isa subspace of (Rn,+, ·).

Proof. A line through the origin in Rn is determined by any non-zero point(vector) v on the line. It can be represented as the set L = {cv | c ∈ R}. Itis easy to see that L is closed under addition and scalar multiplication, sinceadding any two points on the line results in a point on the line, and all scalarmultiples of points on the line stay on the line. See Figure 5.3.

Algebraically, you can also prove this. Let w1 = c1v and w2 = c2v be twovectors in L and let α be a real number (i.e., scalar). Then

αw1 + w2 = αc1v + c2v = (αc1 + c2)v,

Page 16: Chapter 5 Subspacesisoptera.lcsc.edu/~hamoon/files/Math340S19/ApplInspiredL...PetPics, a pet photography company specializing in portraits, wants to post photos for clients to review,

92 CHAPTER 5. SUBSPACES

R

R2

R3

Figure 5.2: Geometric representations of R1 (dark blue), R2 (light blue), andR3 (pink).

and so L is closed under addition and scalar multiplication.

Also, notice that L is nonempty. Thus, by Theorem 5.1.1, L is a subspaceof (Rn,+, ·).

We know that any line in Rn through the origin is a subspace of (Rn,+, ·).On the other hand, given a vector v in Rn, if v is in some subspace, the entireline containing v must also be in the subspace. We state this result in thenext theorem.

Page 17: Chapter 5 Subspacesisoptera.lcsc.edu/~hamoon/files/Math340S19/ApplInspiredL...PetPics, a pet photography company specializing in portraits, wants to post photos for clients to review,

5.4. GEOMETRY OF SUBSPACES OF (RN ,+, ·) 93

b

c

v

a

β · v

Figure 5.3: Scalar Multiplication in R results in a vector on the same line.

Theorem 5.4.2. Fix n ∈ N. Let v ∈ Rn, and suppose that V is asubspace of (Rn,+, ·) containing v. Then the line containing the originand v is contained in V .

Proof. See Exercise 6.

Now suppose you have two vectors w and v in Rn that do not lie on thesame line through the origin, and that both of these vectors are contained insome subspace V of (Rn,+, ·). What can we say about the geometry of V ?(Another way to ask this is, “what does V look like?”)

We know that w and v lie on the two different lines through the origin,and that both of these lines are contained in V . Can we deduce anythingelse?

Denote by Lv the line containing v. Since V is closed under addition,then for every real number α, αv is on the line Lv and so αv+w must be inV . But this set is just Lv + w, which is the translation of the line Lv by thevector w, as shown in Figure 5.4.

Then we note that for all β ∈ R, βw is also in V , so a similar argumentimplies that the translation of the line Lv by βw is also in V . Hence thecollection of all the translations of the line Lv is in V . This set of lines“sweeps out” the entire plane containing v, w, and 0. (See Figure 5.5.) SoV must contain this plane.

Page 18: Chapter 5 Subspacesisoptera.lcsc.edu/~hamoon/files/Math340S19/ApplInspiredL...PetPics, a pet photography company specializing in portraits, wants to post photos for clients to review,

94 CHAPTER 5. SUBSPACES

v

w

Lv + w

Lv

Figure 5.4: Lv + w is a translation of the line Lv by the vector w.

v

w

Lv

Figure 5.5: The set of lines {Lv + βw | β ∈ R} “sweeps out” a plane.

Page 19: Chapter 5 Subspacesisoptera.lcsc.edu/~hamoon/files/Math340S19/ApplInspiredL...PetPics, a pet photography company specializing in portraits, wants to post photos for clients to review,

5.5. EXERCISES 95

Question: What if a subspace V of (R3,+, ·) contains a plane throughthe origin and another line L not in the plane (see the Figure 5.6). Whatcan you say about the subspace?

Figure 5.6: What does the subspace containing the plane (pink) and line(blue) look like?

5.5 Exercises

Note: In the following exercises, whenever discussing a vector space (V,+, ·)where + and · are the standard operations or clear from the context, we willsimplify notation and write only V .

1. Which of these subsets are subspaces of M2×2(R)? For each that isnot, show the condition that fails.

(a)

��a 00 b

����� a, b ∈ R�

(b)

��a 00 b

����� a+ b = 0

(c)

��a 00 b

����� a+ b = 5

Page 20: Chapter 5 Subspacesisoptera.lcsc.edu/~hamoon/files/Math340S19/ApplInspiredL...PetPics, a pet photography company specializing in portraits, wants to post photos for clients to review,

96 CHAPTER 5. SUBSPACES

(d)

��a c0 b

����� a+ b = 0, c ∈ R�

2. Consider the vector space R2 and the following subsets W . For each,determine if (i) W is closed under vector addition, (ii) W is closedunder scalar multiplication, (iii) W is a subspace of R2. (iv.) SketchW in the xy coordinate plane and illustrate your findings.

(a) W = {(1, 2), (2, 1)}(b) W = {(3a, 2a) ∈ R2 | a ∈ R}(c) W = {(3a− 1, 2a+ 1) ∈ R2 | a ∈ R}(d) W = {(a, b) ∈ R2 | ab ≥ 0}

3. Recall the space P2 of degree two polynomials (see Example 4.2.2). Forwhat scalar values of b is W = {a0 + a1x+ a2x

2 | a0 + 2a1 + a2 = b} asubspace of P2?

4. Recall the space J11 of all bar graphs with 11 bins (see Example ??).We are interested in the bar graphs that have at most one bar with avalue higher than both, or lower than both, of two nearest neighbors.Notice that end bars don’t have two nearest neighbors. (see Figure5.7). Call this subset G.

Figure 5.7: Example of two histograms in G (left and middle) and an exampleof a histogram not in G (right)

(a) Is G a subspace of H?

Page 21: Chapter 5 Subspacesisoptera.lcsc.edu/~hamoon/files/Math340S19/ApplInspiredL...PetPics, a pet photography company specializing in portraits, wants to post photos for clients to review,

5.5. EXERCISES 97

(b) We typically expect grade distributions to follow a bell curve (thushaving a histogram that is a bar graph in G). What does yourconclusion in part 4a say about a course grade distribution ifhomework, lab, and exam grade distributions are elements of G?

5. Is R2 a subspace of R3? Explain.

6. Prove Theorem 5.4.2.

7. Show that the set of all arithmetic combinations of images A,B and C(page 26) is a subspace of the vector space of 4× 4 images.

8. A manufacturing company uses a process called diffusion welding toadjoin several smaller rods into a single longer rod. The diffusion weld-ing process leaves the final rod heated to various temperatures alongthe rod with the ends of the rod having the same temperature. Everya cm along the rod, a machine records the temperature difference fromthe temperature at the ends to get an array of temperatures called aheat state. (See Section 4.1.)

(a) Plot the heat state given below (let the horizontal axis representdistance from the left end of the rod and the vertical axis representthe temperature difference from the ends).

u = (0, 1, 13, 14, 12, 5,−2,−11,−3, 1, 10, 11, 9, 7, 0)

(b) How long is the rod represented by u, the above heat state, ifa = 1 cm?

(c) Give another example of a heat state for the same rod, sampledin the same locations.

(d) Show that the set of all heat states, for this rod, is a vector space.

(e) What are the distinguishing properties of vectors in this vectorspace?

9. Show why a subset of a vector space satisfies (P9) as long as (P2) and(P8) are satisfied. [Hint: Theorem 3.4.4 may be useful.]

10. Show that the remark on page 80 is true. That is, show that a nonemptysubset of a vector space is a subspace if and only if it satisfies properties(P1) and (P2).

Page 22: Chapter 5 Subspacesisoptera.lcsc.edu/~hamoon/files/Math340S19/ApplInspiredL...PetPics, a pet photography company specializing in portraits, wants to post photos for clients to review,

98 CHAPTER 5. SUBSPACES

11. Prove that the set of all differentiable real-valued functions on R is asubspace of F . See Example 4.2.1.

12. Prove that the empty set, ∅, is not a subspace of any vector space.

13. Prove that the set containing only the zero vector of a vector space Vis a subspace of V . How many different ways can you prove this?

14. Give an example that shows the union in Example 5.3.3 is not a sub-space.

15. Consider the sets

W1 =�ax2 + bx+ c ∈ P2(R) | a = c

�,

W2 =�ax2 + bx+ c ∈ P2(R) | a = 2c

�.

Show that both are subspaces of P2. Are W1 ∩ W2 and W1 ∪ W2

subspaces of P2?

16. Prove that if U1 and U2 are subspaces of V such that V = U1 ⊕ U2,then for each v ∈ V there exist unique vectors u1 ∈ U1 and u2 ∈ U2

such that v = u1 + u2.

For exercises 17 through 19, let V be the set of 4 × 4 grayscaleimages and consider the example images on page 26. Let UQ bethe set of all scalar multiples of image Q.

17. Complete Example 5.3.5 by showing, without Theorem 5.3.3, that U1+U2 is a subspace of the vector space of 4× 4 grayscale images.

18. Which of images 1, 2, 3, and 4 are in UA + UB + UC?

19. Show that V �= UA ⊕ UB ⊕ UC .

For exercises 20 through 24, let V = I256×256, the set of 256 × 256grayscale images and consider the two images in Figure 5.8. LetW1 be the set of all scalar multiples of image C1 and W2 be the setof all scalar multiples of image C2. Recall that although the displayrange (or brightness in the displayed images) may be limited, theactual pixel intensities are not.

Page 23: Chapter 5 Subspacesisoptera.lcsc.edu/~hamoon/files/Math340S19/ApplInspiredL...PetPics, a pet photography company specializing in portraits, wants to post photos for clients to review,

5.5. EXERCISES 99

Figure 5.8: Left image: C1, Right image: C2. Here black has a pixel intensityof 0 and white has a pixel intensity of 1.

20. Describe the elements in W1. Using the definition of scalar multiplica-tion on images and vector addition on images, describe how you knowthat W1 is a subspace of V .

21. Describe the elements in W1 + W2. Is W1 + W2 a subspace of V ?Explain.

22. Describe the elements inW1∪W2. IsW1∪W2 a subspace of V ? Explain.

23. Describe the elements inW1∩W2. IsW1∩W2 a subspace of V ? Explain.

24. Describe how you know that V �= W1 ⊕W2.

For Exercises 25 to 28 Let V denote the space of images with hexagonal gridconfiguration shown below.

25. Let H be the subset of V consisting of all images whose outer ring ofpixels all have value zero. Is H a subspace of V ?

Page 24: Chapter 5 Subspacesisoptera.lcsc.edu/~hamoon/files/Math340S19/ApplInspiredL...PetPics, a pet photography company specializing in portraits, wants to post photos for clients to review,

100 CHAPTER 5. SUBSPACES

26. Let K be the subset of V consisting of all images whose center pixelhas value zero. Is K a subspace of V ?

27. What images are included in the set H ∩K? Is H ∩K a subspace ofV ?

28. What images are included in the set H ∪K? Is H ∪K a subspace ofV ?