3 pts \(\det(A)=40\).
Solution
For this \(2\times2\) matrix,
Thus,
This page is meant to give you quick access to problems and their solutions. Refer to the original exam PDF, linked above, for test-taking instructions and formatting. Note that we’ve kept the problem text identical, which is why you may see things like “write your answer in the box below” despite there not being a box on this page.
Let
Each part below is independent. Find the value of \(\alpha\) that satisfies the given condition.
3 pts \(\det(A)=40\).
For this \(2\times2\) matrix,
Thus,
3 pts \(\text{rank}(A)=1\).
Since \(A\) is a nonzero \(2\times2\) matrix, it has rank \(1\) exactly when its determinant is \(0\). Therefore,
For this value, the second column is \(3/2\) times the first column.
4 pts \(A^{-1}=\begin{bmatrix}3/2&-1\\-1&3/4\end{bmatrix}\).
The inverse formula gives
Matching the top-left entry gives
Substituting \(\alpha=8\) gives all four entries of the specified inverse.
Let
4 pts Find \(BB^T\).
The entries of \(BB^T\) are the dot products of the rows of \(B\). The three rows are mutually orthogonal, and their squared lengths are
Hence,
6 pts Find \(B^{-1}\). Fully simplify each entry. Hint: Use part (a), not \(\det(B)\) or a \(3\times3\) inverse formula. If \(BB^T=C\), what is \(B^{-1}\)?
Let \(C=BB^T\). Since \(C\) is invertible,
Thus, \(B^{-1}=B^TC^{-1}\). Using part (a),
Let \(X=CR\), where \(a,b\) are unknown scalars. Furthermore, suppose that
4 pts Determine the following values.
\(\text{rank}(X)=\) ______
\(\dim(\text{nullsp}(X))=\) ______
The columns of \(C\) are independent, and the rows of \(R\) are independent. This CR factorization therefore has \(\text{rank}(X)=2\). Since \(X\) has five columns, rank-nullity gives \(\dim(\text{nullsp}(X))=5-2=3\).
8 pts Find \(a\) and \(b\).
Let \(\vec v\) be the given vector in \(\text{nullsp}(X)\). Then \(CR\vec v=\vec0\). Since the columns of \(C\) are linearly independent, this requires \(R\vec v=\vec0\). Therefore,
It follows that \(\boxed{a=-4,\ b=4}\).
4 pts Which of the following choices of columns of \(X\) form a basis for \(\text{colsp}(X)\)? Select all that apply.
Columns 1 and 2
Columns 1 and 5
Columns 2 and 3
Columns 3 and 4
Columns 4 and 5
Columns 1, 2, and 3
Because \(C\) has linearly independent columns, we can check independence using the corresponding columns of \(R\), with \(a=-4\) and \(b=4\). Columns \(1\) and \(5\) are scalar multiples, as are columns \(3\) and \(4\). Each remaining listed pair is independent.
Since \(\text{rank}(X)=2\), the valid bases are columns 1 and 2, columns 2 and 3, and columns 4 and 5. Three columns cannot form a basis for this two-dimensional space.
Let
2 pts Find \(A\vec v\).
Multiplying by \(A\) cycles the first three components and negates the fourth:
2 pts What is the smallest positive integer \(k\) such that \(A^k=I\)?
The first three components return to their original positions after a multiple of \(3\) applications of \(A\). The fourth returns to its original sign after an even number of applications. The smallest positive integer divisible by both \(3\) and \(2\) is \(\boxed{k=6}\).
6 pts Give one basis for \(\text{nullsp}(A-I)\).
A vector is in \(\text{nullsp}(A-I)\) exactly when \(A\vec x=\vec x\). Componentwise,
Thus, \(x_1=x_2=x_3\) and \(x_4=0\). Every vector in the null space is a multiple of \(\begin{bmatrix}1\\1\\1\\0\end{bmatrix}\), so one basis is
Recall,
6 pts Applying \(A\) to a vector \(\vec x\) changes its components by the amounts shown below:
4 pts Find \(m\). Your answer should be a number with no variables.
Applying \(A\) rearranges the first three components, so their sum does not change. Their changes must therefore sum to zero:
2 pts For this value of \(m\), how many vectors \(\vec x\) satisfy \(A\vec x-\vec x=\begin{bmatrix}m\\-3\\5\\2\end{bmatrix}\)?
There are infinitely many solutions. One particular solution is \(\begin{bmatrix}0\\3\\-2\\-1\end{bmatrix}\). Adding any vector in \(\text{nullsp}(A-I)\) preserves the product with \(A-I\), giving
Let
We would like to find orthogonal unit vectors \(\vec q_1,\vec q_2\in\mathbb R^4\) such that
6 pts Find one possible \(\vec q_2\).
Let \(\vec x_2\) be the second column of \(X\). Remove its component in the direction of \(\vec q_1\):
Since \(|\vec u_2|=\sqrt{4+1+4}=3\), one answer is
This is a unit vector orthogonal to \(\vec q_1\). The first column of \(X\) is \(3\vec q_1\), and its second column is \(6\vec q_1+3\vec q_2\), so the two unit vectors span \(\text{colsp}(X)\). The negative of this \(\vec q_2\) is also valid.
For the remaining parts, suppose \(Q\) has orthonormal columns \(\vec q_1,\vec q_2\in\mathbb R^4\). You do not need your answer to part (a). Let
and suppose \(\vec y\in\mathbb R^4\) satisfies
2 pts Is \(\vec y\in\text{colsp}(Q)\)?
Impossible to tell. The vector \(\vec y_0=3\vec q_1+\vec q_2\) is in \(\text{colsp}(Q)\) and has the specified product with \(Q^T\).
There are also nonzero vectors \(\vec r\) orthogonal to \(\text{colsp}(Q)\), since this is a two-dimensional subspace of \(\mathbb R^4\). Then \(\vec y_0+\vec r\) is outside \(\text{colsp}(Q)\) but has the same product with \(Q^T\), because \(Q^T\vec r=\vec0\). Both possibilities are consistent with the information given.
Recall that \(Q\) has orthonormal columns, and
4 pts Which choice gives both the vector \(\vec w^\ast\) that minimizes \(|\vec y-Z\vec w|^2\) and the resulting projection, \(\vec p=Z\vec w^\ast\)?
A. \(\vec w^\ast=\begin{bmatrix}3\\1\end{bmatrix},\quad \vec p=3\vec q_1+\vec q_2\)
B. \(\vec w^\ast=\begin{bmatrix}2\\1\end{bmatrix},\quad \vec p=3\vec q_1+\vec q_2\)
C. \(\vec w^\ast=\begin{bmatrix}3\\1\end{bmatrix},\quad \vec p=4\vec q_1+2\vec q_2\)
D. \(\vec w^\ast=\begin{bmatrix}2\\1\end{bmatrix},\quad \vec p=2\vec q_1+\vec q_2\)
E. \(\vec w^\ast=\begin{bmatrix}1\\2\end{bmatrix},\quad \vec p=3\vec q_1+\vec q_2\)
B. Adding and subtracting the columns of \(Z\) recovers \(2\vec q_1\) and \(2\vec q_2\), so \(Z\) and \(Q\) have the same column space. Hence,
But \(Z\vec w=(w_1+w_2)\vec q_1+(w_1-w_2)\vec q_2\). Independence of \(\vec q_1,\vec q_2\) therefore requires
\(Q^T\vec y\) gives coefficients in \(Q\)’s columns, while \(\vec w^\ast\) gives coefficients in \(Z\)’s columns.
4 pts Identify whether each statement is true or false.
2 pts For every \(\vec x\in\mathbb R^2\), \(Q^TQ\vec x=\vec x\).
True. Orthonormal columns give \(Q^TQ=I_2\), so \(Q^TQ\vec x=\vec x\) for every \(\vec x\in\mathbb R^2\).
2 pts \(QQ^T\) is invertible.
False. \(QQ^T\) is \(4\times4\), and its columns lie in the two-dimensional space \(\text{colsp}(Q)\). Its rank is at most \(2\), so it is not invertible.
Suppose we’d like to fit a multiple linear regression model to predict the daily electricity use of household \(i\), \(y_i\), in kilowatt-hours.
For each household \(i\), the feature vector is \(\vec x_i=\begin{bmatrix}x_i^{(1)}\\x_i^{(2)}\end{bmatrix}\), where:
\(x_i^{(1)}\) is the number of residents.
\(x_i^{(2)}\) is \(2\) if the household uses a heat pump and \(0\) if it uses gas heating.
Our model is
The dataset below has two unknown values, \(a\) and \(b\).
| \(i\) | Residents (\(x_i^{(1)}\)) | Heating source (\(x_i^{(2)}\)) | Electricity use (\(y_i\)) |
|---|---|---|---|
| 1 | 2 | \(a\) | 12 |
| 2 | 5 | 2 | 30 |
| 3 | 2 | 2 | 16 |
| 4 | 4 | 0 | \(b\) |
| 5 | 3 | 0 | 16 |
4 pts Write the design matrix \(X\). Your answer should be a matrix in terms of \(a\) and constants.
The intercept contributes a column of ones, followed by the residents and heating-source features:
Recall, our model is \(h(\vec x_i)=w_0+w_1x_i^{(1)}+w_2x_i^{(2)}\), where \(x_i^{(1)}\) is the number of residents and \(x_i^{(2)}\) is \(2\) for a heat pump and \(0\) for gas heating.
| \(i\) | Residents (\(x_i^{(1)}\)) | Heating source (\(x_i^{(2)}\)) | Electricity use (\(y_i\)) |
|---|---|---|---|
| 1 | 2 | \(a\) | 12 |
| 2 | 5 | 2 | 30 |
| 3 | 2 | 2 | 16 |
| 4 | 4 | 0 | \(b\) |
| 5 | 3 | 0 | 16 |
10 pts The parameter vector that minimizes mean squared error is \(\vec w^\ast=\begin{bmatrix}3\\4\\3\end{bmatrix}\).
Find \(a\) and \(b\). Your answers should be numbers with no variables.
Hint: What properties must the error vector satisfy?
The predictions and errors are
At a least-squares solution, \(\vec e\) is orthogonal to every column of \(X\). Orthogonality to the intercept column gives
Orthogonality to the residents column gives
Substituting \(b=17+3a\) into the second equation gives \(6a=0\). Thus,
These values give \(\vec e=\begin{bmatrix}1\\1\\-1\\-2\\1\end{bmatrix}\), which is also orthogonal to the heating-source column: \(2(1)+2(-1)=0\). All the normal equations are satisfied.
Let \(\vec x\in\mathbb R^2\), and consider
6 pts
2 pts Which of the following is the fully simplified expression for \(\nabla f(\vec x)\)?
The third expression is correct.
4 pts Justify your answer.
Let \(g(\vec x)=\vec x^TA\vec x-1\), so \(f(\vec x)=g(\vec x)^2\). Since \(A\) is symmetric,
The chain rule gives
4 pts Identify whether each statement is true or false. Hint: There is no need to think about second partial derivatives.
2 pts \(f\) is convex.
False. Consider
Both satisfy \(\vec x^TA\vec x=1\), so \(f(\vec u)=f(\vec v)=0\).
Their midpoint is \(\vec0\), but
This violates the defining inequality for a convex function.
2 pts \(f\) attains its global minimum at exactly one vector.
False. Since \(f\) is a square, it is always nonnegative. The two vectors from part (i) both attain \(0\), so the global minimizer is not unique.
Recall, \(\vec x\in\mathbb R^2\) and
8 pts We run gradient descent on \(f\) twice, starting from the same unknown vector \(\vec x^{(0)}\).
With step size \(\alpha=\frac14\), the first iteration gives \(\vec x^{(1)}=\frac14\begin{bmatrix}-14\\1\end{bmatrix}\).
With step size \(\alpha=\frac34\), the first iteration gives \(\vec x^{(1)}=\frac14\begin{bmatrix}-54\\11\end{bmatrix}\).
Find \(\vec x^{(0)}\). Your answer should be a vector with no variables. You can answer this part without using your answer to part (a).
Let \(\vec g=\nabla f(\vec x^{(0)})\). Both runs have the same gradient at their starting point. The update rule gives
Multiply the first equation by \(3\) and subtract the second to eliminate \(\vec g\):
Therefore,