Exam 2
The Unit 2 exam covers sessions 14 through 24 — orthogonality of vectors and subspaces, projections onto subspaces, least squares approximations, Gram-Schmidt and orthonormal bases, and the properties and formulas for determinants. Four multi-part problems test determinants of orthogonal matrices, fitting a line by least squares, projection matrices from Gram-Schmidt, and the determinant as a polynomial via the big formula.
Taking this exam
This exam covers Unit 2 (sessions 14–24): orthogonal vectors and subspaces, projections onto subspaces and projection matrices, least squares, orthonormal bases and Gram-Schmidt, and the properties, formulas, and applications of determinants. Attempt it closed-book under exam conditions before revealing any solutions — every problem here rewards reasoning from the properties, not brute computation. If you get stuck, or once you’re done, watch the unit review video linked above, where a course TA works through problems of exactly this kind.
Problems
Suppose are orthonormal vectors in . Find all possible values for these 3 by 3 determinants and explain your thinking in 1 sentence each.
(a)
(b)
(c) times
Show solution
(a) The determinant of any square matrix with orthonormal columns (an “orthogonal matrix”) is .
(b) Here are two ways you could do this.
(1) The determinant is linear in each column:
(a repeated column kills a determinant, so the extra terms drop out). Both of these determinants are equal — see part (c) — so the total determinant is .
(2) You could also use row reduction (column operations don’t change the determinant, except that a swap flips the sign and a scaling factors out):
Again, whatever is, this determinant will be twice that, so .
(c) The second matrix is an even permutation of the columns of the first matrix (swap , then swap ), so it has the same determinant as the first matrix. Whether the first matrix has determinant or , the product will be .
Suppose we take measurements at the 21 equally spaced times . All measurements are except that at the middle time .
(a) Using least squares, what are the best and to fit those 21 points by a straight line ?
(b) You are projecting the vector onto what subspace? (Give a basis.) Find a nonzero vector perpendicular to that subspace.
Show solution
(a) If the line went exactly through the 21 points, then the 21 equations
would be exactly solvable. Since we can’t solve this equation exactly, we look for a least-squares solution :
So the line of best fit is the horizontal line
(b) We are projecting onto the column space of the matrix above — a basis is the two columns
There are lots of vectors perpendicular to this subspace; one is the error vector
The Gram-Schmidt method produces orthonormal vectors from independent vectors in . Put those vectors into the columns of 5 by 3 matrices and .
(a) Give formulas using and for the projection matrices and onto the column spaces of and .
(b) Is and why? What is times ? What is ?
(c) Suppose is a new vector and are independent. Which of these (if any) is the new Gram-Schmidt vector ? ( and from above)
Show solution
(a) The general projection formula gives
since for a matrix with orthonormal columns.
(b) , because both projections project onto the same subspace — Gram-Schmidt doesn’t change the column space. (Some people did this the hard way, by substituting into the projection formula and simplifying. That also works.)
: the columns of are already in the column space, so projecting them changes nothing.
, because is singular (like all non-identity projections): all vectors orthogonal to the column space of are projected to .
(c) Answer: choice 3,
Subtracting the projection onto the column space leaves the component of perpendicular to ; dividing by its length normalizes it. Choice 1 fails because lies in the subspace rather than perpendicular to it. Choice 2 is tempting, and would be correct if the were replaced by the — but the are not orthogonal!
Suppose a 4 by 4 matrix has the same entry throughout its first row and column. The other 9 numbers could be anything like :
(a) The determinant of is a polynomial in . What is the largest possible degree of that polynomial? Explain your answer.
(b) If those 9 numbers give the identity matrix , what is ? Which values of give ?
Show solution
(a) Every term in the big formula for takes one entry from each row and each column. The ‘s occupy row 1 and column 1, and a term can use at most one entry from row 1 and one from column 1 — so each term contains at most two ‘s, and the determinant has degree 2.
(b) You can find this by cofactor expansion; here’s another way. Factor out of the first column, then subtract each of columns 2, 3, 4 from column 1 — that removes the three ‘s below the top and changes the corner entry to , leaving a triangular matrix:
So
This is zero when or .