## Description

1. Let z =

”

1

1

#

and w =

”

1

−1

#

.

a) Sketch the subspace spanned by z in R

2

.

b) Sketch the subspace spanned by w in R

2

.

c) Sketch span {z, w} in R

2

.

d) Are z and w orthogonal? Why or why not?

e) Do {z, w} form an orthonormal basis? Why or why not? If not, can you modify

z and w to form an orthonormal basis?

2. Consider the line in R

2 defined by the equation x2 = x1 + 1.

a) Sketch the line in R

2

.

b) Does this line define a subspace of R

2

? Why or why not?

3. You collect ratings of three space-related science fiction movies and two romance movies

from seven friends on a scale of 1-10.

Movie Jake Jennifer Jada Theo Ioan Bo Juanita

Star Trek 4 7 2 8 7 4 2

Pride and Prejudice 9 3 5 6 10 5 5

The Martian 4 8 3 7 6 4 1

Sense and Sensibility 9 2 6 5 9 5 4

Star Wars: Empire Strikes 4 9 2 8 7 4 1

You put this data into a matrix X (available in the file movie.mat) and decide to model

(approximate) as the product of a rank-r taste matrix with orthonormal columns and

a weight matrix. That is, X ≈ TW.

a) What is the rank of X? Relevant Python commands are

numpy.linalg.matrix rank().

b) What are the dimensions of T and W (in terms of r)?

c) You know that each user’s ratings have an average value that is greater than zero

because the scale is 1-10. And you suspect the baseline (average) rating may

differ from user to user. To account for this you decide your first basis vector in

the taste matrix should be

t1 =

1

√

5

1

1

.

.

.

1

Choose w1j so that each element of the vector t1w1j equals the average value j

th

column of X, denoted as X:,j . Find an expression for w1j that depends on t1 and

X:,j .

d) Define wT

1 =

w11 w12 · · · w17

and find the rank-1 approximation to X that

reflects the baseline ratings of each friend, t1wT

1

.

e) Which friend has the highest baseline rating? Which friend has the lowest baseline

rating?

f) Find the residual not modeled by t1wT

1

, that is, X − t1wT

1

.

Do you see any

patterns in the residual? Briefly describe them qualitatively.

This problem is continued in a homework assignment.