Professional Documents
Culture Documents
Boyd
October 27 2016
Midterm Exam
Name:
SUNetID: @stanford.edu
1
1. The function φ : R3 → R satisfies
Choose one of the following by circling it. You do not need to justify your answer.
• φ must be linear.
• φ might be linear.
• φ cannot be linear.
makes sense, which of the following statements must be true? (‘Must be true’ means
that it follows with no additional assumptions.) Circle the correct answer for each
statement. You do not need to justify your answer.
2
3. A particular computer (Boyd’s laptop) takes about 0.2 seconds to multiply two 1500 ×
1500 matrices. About how long would you guess the computer would take to multiply
two 3000 × 3000 matrices? Give your prediction (i.e., the time in seconds), and your
(very brief) reasoning.
(a) What can you say about ψ(1, −1)? Either give the value of ψ(1, −1), or state
that it cannot be determined.
(b) What can you say about ψ(2, −2)? Either give the value of ψ(2, −2), or state
that it cannot be determined.
3
5. Equilibrium point for linear dynamical system. Consider a time-invariant linear dy-
namical system with offset, xt+1 = Axt + c, where xt is the state n-vector. We say
that a vector z is an equilibrium point of the linear dynamical system if x1 = z implies
x2 = z, x3 = z, . . . . (In words: If the system starts in state z, it stays in state z.)
Find a matrix F and vector g for which the set of linear equations F z = g characterizes
equilibrium points. (This means: if z is an equilibrium point, then F z = g; conversely
if F z = g, then z is an equilibrium point.) Express F and g in terms of A, c, any
standard matrices or vectors (e.g., I, 1, or 0), and matrix and vector operations.
Remark. Equilibrium points often have interesting interpretations. For example, if
the linear dynamical system describes the population dynamics of a country, with
the vector c denoting immigration (emigration when entries of c are negative), an
equilibrium point is a population distribution that does not change, year to year. In
other words, immigration exactly cancels the changes in population distribution caused
by aging, births, and deaths.
4
6. Norm of linear combination of orthonormal vectors. Suppose {a1 , . . . , ak } is an or-
thonormal set of n-vectors, and x = β1 a1 + · · · + βk ak , where β1 , . . . , βk are scalars.
Express kxk in terms of β = (β1 , . . . , βk ).
−1 ···
1 0 0 0 0
0 −1 1 ··· 0 0 0
.. ..
. .
D= .
.. ..
. .
0 0 0 · · · −1 1 0
0 0 0 ··· 0 −1 1
We let d1 , . . . , dn denote its columns. Circle one of the following two options and give
the appropriate answer below.
• The columns of D are linearly independent. If you choose this option, show why
the columns are linearly independent.
• The columns of D are linearly dependent. If you choose this option, give specific
coefficients β1 , . . . , βn , not all zero, for which β1 d1 + · · · + βn dn = 0.
5
8. Student-course matrix. The Stanford registrar has the complete list of courses taken
by each graduating student over several graduating classes. This data is represented
by an m × n matrix C, with Cij = 1 if student i took class j, and Cij = 0 otherwise,
for i = 1, . . . , m and j = 1, . . . , n. (Thus, there are m students in the data set, and n
different courses. For simplicity, we ignore the possibility that in some circumstances
a student can take a course multiple times.)
Answer each of the questions below in English, with no equations, references to matrices
or vectors, and so on. (You can refer to student i and course j, though.)
6
(Problem 8 continued.)
(d) Suppose you cluster the columns of C T using k-means, with k = 50 (say). What
do you think the results might look like? (Your response can be a bit vague, but
not more than one or two sentences.)
(e) (Continuation of part (d).) Suppose z1 is the cluster representative for group 1.
What does (z1 )143 = 0.01 mean?
7
9. Cross-product. The cross product of two 3-vectors a = (a1 , a2 , a3 ) and x = (x1 , x2 , x3 )
is defined as the vector
a2 x 3 − a3 x 2
a × x = a3 x 1 − a1 x 3 .
a1 x 2 − a2 x 1
The cross product comes up in physics, for example in electricity and magnetism, and
in dynamics of mechanical systems like robots or satellites. (You do not need to know
this.)
Assume a is fixed. Show that the function f (x) = a × x is a linear function of x, by
giving a matrix A that satisfies f (x) = Ax for all x. (You can just give A; you do not
need to verify that a × x = Ax for all x.)
8
10. (a) How are x and Ax related, where A is the 5 × 5 matrix
0 0 0 0 1
1 0 0 0 0
A= 0 1 0 0 0 .
0 0 1 0 0
0 0 0 1 0
(b) What is A5 ? (You can just give the matrix.) Hint. The answer should make
sense, given your answer to part (a).