Print this page and work through it on paper. Revealed answers are never printed, so you can check one question and still print a clean sheet.

  1. Show the solution to question 1

    (a) Diagonalise . Both Gram matrices are , so either will do; take :

    Both eigenvalues are , so . Every direction is stretched by the same factor: indeed is the rotation matrix through , so is times a rotation and sends the unit circle to a circle of radius . Check: . ✓

    (b) A shear. , with trace and determinant , so the characteristic polynomial is and

    Hence and . Two checks: ✓, and ✓.

    Note that both eigenvalues of are , while its singular values are about and . Singular values are the absolute eigenvalues only for symmetric matrices, and a shear is the standard counterexample.

    (c) Rank one, so only one singular value is nonzero. is , so is and is the smaller Gram matrix:

    Its determinant is and its trace is , so the eigenvalues are and : , . This had to happen: the second column of is twice the first, so and exactly one singular value is nonzero. Check: , the sum of the squares of all six entries. ✓

  2. Show the solution to question 2

    (a) Singular values and right singular vectors.

    The Gram matrix is already diagonal, so its unit eigenvectors are (eigenvalue ) and (eigenvalue ), and , . By the ellipsoid theorem the semi-axes of the image ellipse are , and here those are the images of the standard basis vectors: , of length ✓, and , of length ✓. The axis directions are and , which are perpendicular, as they must be.

    (b) The sketch. On one set of axes draw the unit circle and, on it, the points and . The image is an ellipse centred at the origin, tilted : its long axis runs along the line and ends at , its short axis runs along and ends at . Mark as the image of and as the image of , and draw both axes of the ellipse as dashed lines through the origin. The ellipse should enclose the circle without touching it: the smallest stretch is , so every point of the circle is pushed outward. Finally, since , orientation is preserved: travelling counterclockwise from to on the circle corresponds to travelling counterclockwise from (at angle ) to (at angle ) on the ellipse.

    (c) Two checks. For , . Its coordinates in the frame are

    and , so lies on the ellipse ✓ (plot it at roughly ). Area: , and the unit disc's area scaled by is also ✓.

  3. Show the solution to question 3

    Sizes. is , so is , is and is .

    (a) Singular values and . The smaller Gram matrix is ():

    Trace , determinant , so : , , and , . Both are nonzero, so : full column rank.

    For , forces , so . For , forces , so . Thus . Check: , the sum of squared entries of . ✓

    (b) Left singular vectors from the formula, then one from the null space.

    (Norm check on : ✓.) The formula produces only vectors, and there is no at all, since is ; the third column of carries no information about beyond being orthogonal to the first two, which is exactly the statement that it spans . Solve :

    Subtracting gives , and then , so : . Orthogonality check: ✓ and ✓.

    (c) Assemble, check, reduce. has the shape of , a diagonal block with a zero row beneath:

    Entry of is ✓. Entry is ✓.

    The reduced SVD drops and the zero row of ; in outer product form,

  4. Show the solution to question 4

    (a) Dimensions and the two easy bases. First confirm this really is an SVD in outer product form: , , and all four vectors have unit length (, , ). The weights are decreasing, so , and .

    By the four-subspaces theorem: has dimension ; has dimension ; has dimension ; has dimension . The listed 's and 's are already orthonormal bases of the column and row spaces.

    (b) The two null spaces. is the orthogonal complement of in , so it is spanned by any vector perpendicular to and ; the cross product works, and normalising gives

    Check: ✓, ✓.

    is the orthogonal complement of in : means and . Adding and subtracting, and , so

    which are orthogonal to each other and to ✓. (Any orthonormal basis of this plane is acceptable — it is the repeated singular value leaving the choice free.)

    (c) Using the factorisation directly. , and , so

    lies in , so : both and vanish.

    is solvable exactly when , i.e. when , because . For : , so no solution exists. For : it lies in , and since , the vector is a solution. It is not the only one — add anything in — but it is the one of smallest norm, being the one in .

  5. Show the solution to question 5

    (a) The sandwich. Every is positive, so

    and since for each ,

    Taking square roots gives . The left inequality is an equality exactly when , i.e. when : rank-one matrices and the zero matrix. The right inequality is an equality exactly when for every : all nonzero singular values equal. Orthogonal matrices, and more generally scalar multiples of matrices with orthonormal columns, are the examples.

    (b) Submultiplicativity. The definition of as a maximum gives for every (trivially when ). Apply it twice: for any ,

    Divide by and take the maximum over : .

    Strictness: and each have spectral norm , but has norm . The direction stretches most is the direction kills.

    (c) Orthogonal matrices are exactly the matrices with all singular values . If is orthogonal then , whose eigenvalues are all , so every singular value of is . Conversely, if is with all singular values equal to , then and , so the SVD reads , a product of orthogonal matrices and hence orthogonal ().

    Consequently and , which is the right-hand equality case of (a) with . The converse of the first claim fails: has but is singular. The spectral norm reports only the largest stretch and is silent about the others; orthogonality is a statement about all of them.

  6. Show the solution to question 6

    (a) The shear. has eigenvalues , so and and

    The rule of thumb says a condition number near costs about digits; , so solving loses less than one decimal digit. Cross-check: , and indeed is another shear with the same Gram eigenvalues, so ✓.

    (b) Squaring and inverting. From , , which is an orthogonal diagonalisation of a symmetric positive definite matrix; its eigenvalues are positive, and for a symmetric positive definite matrix the eigenvalues are the singular values (the orthogonal diagonalisation is itself an SVD). Hence

    Likewise is an SVD of up to reordering, with singular values , so . Practical consequence: forming the normal equations to solve a least-squares problem squares the condition number, so a matrix that loses digits loses once squared. This is why least-squares software works with directly (via QR or the SVD) rather than with .

    (c) Determinant versus conditioning, and attainment. is symmetric with eigenvalues , namely and , both positive, so those are its singular values and

    has both singular values , so while . The larger determinant belongs to the perfectly conditioned matrix and the tiny determinant to the badly conditioned one, but that is a coincidence of scale, not a rule: has determinant and is also perfectly conditioned. The determinant is the product of the singular values and confuses overall size with the spread between directions; the condition number is a ratio and sees only the spread. Solving can lose about digits.

    Attainment: the eigenvectors of are for and for , and for a symmetric positive definite matrix these serve as both left and right singular vectors. Take , so , and perturb along the weak direction, , so . Then

    so the ratio is exactly ✓. With , a error in becomes a error in : the computed solution is worse than useless.

  7. Show the solution to question 7

    (a) The truncation.

    since . Its rank is one (every column is a multiple of ). The error is

    as the truncation lemma promises. Hence and . Direct check of the Frobenius value from the entries: , so ✓. The two norms agree because the error matrix has rank one.

    (b) Deleting rows is not the same as truncating. has rank one, so it is a legitimate competitor. The error is

    For the spectral norm a lower bound suffices: . So is worse than in both norms. The Eckart–Young theorem says this was inevitable: no matrix of rank at most can come closer to than in either norm. The best rank- approximation zeroes the small singular values, which touches every entry of ; zeroing entries, rows or columns is a different and inferior operation.

    (c) Choosing from an energy target. Squares: , total . Cumulative fractions:

    The first to reach is at , and falls short at , so is the smallest. The errors are and . Check: ✓, the Pythagorean split of the Frobenius norm.

    Storage: the rank- truncation needs numbers against for the matrix itself, a ratio of , so about of the original.

  8. Show the solution to question 8

    Edge cases first. For the only matrix of rank is and , so the formula holds. For the choice is allowed and gives distance . For it is the theorem as stated.

    (a) Singular values move by at most the size of the perturbation. Since has rank at most , it is an admissible for the matrix , so

    using the triangle inequality for the spectral norm (which holds because for every ) and then the truncation lemma. Now exchange roles: and , so the same argument gives . Together, with ,

    This is what makes numerical rank meaningful: if the data carry noise of size , every singular value of the measured matrix lies within of the corresponding singular value of the true matrix, so a singular value far above the noise level is genuine and one below it cannot be distinguished from zero. Pivots in row reduction satisfy no such inequality, which is why they cannot be trusted to measure rank on measured data.

    (b) Pythagoras for the truncation. The expressions and are each of SVD form (orthonormal 's, orthonormal 's, decreasing positive weights), so by the uniqueness theorem their singular values are and respectively. The Frobenius formula then gives

    The geometric content: under the inner product , whose norm is the Frobenius norm, and are orthogonal — indeed because for . Truncation is an orthogonal projection of onto the span of its first outer products, and Pythagoras follows.

    (c) The condition number is a relative distance to singularity. An matrix is singular exactly when its rank is at most . Apply Eckart–Young with (legitimate, as ):

    attained by , which is singular. Therefore

    A matrix is ill-conditioned precisely when it is close to a singular matrix relative to its own size, which is why scaling by a constant changes nothing. For the shear , with , there is a singular matrix within spectral distance , and none closer.

  9. Show the solution to question 9

    (a) The error is in Step 4. Steps 1 to 3 are correct: is not a multiple of ; the projection formula onto a line is applied correctly, with and ; and the solution set of is indeed the line .

    Step 4 confuses two different uniqueness statements. The Penrose conditions say that the matrix is unique. They say nothing about least-squares solutions being unique, and here they are not: is a line, so every minimiser can be shifted along it without changing , which is exactly what Step 3 found. The least-squares theorem for the pseudoinverse says which minimiser is: the one of smallest norm, equivalently the unique minimiser lying in . Choosing picked an arbitrary point of the line, not the closest one to the origin.

    Minimising along the line: , with derivative , zero at . So the correct value is , which is indeed a multiple of ✓.

    (b) The pseudoinverse from an SVD. has trace and determinant , so , : , . (The full-column-rank formula is unavailable, which is presumably why the student avoided it.) The eigenvector for satisfies , i.e. , so and

    Then

    agreeing with (a). Check it is a least-squares solution: ✓, and the residual is orthogonal to since ✓. Norms: , against for the student's answer. Both fit the data equally well; only one is the pseudoinverse solution.

    (c) is a projection, not the identity. would force , i.e. full row rank, and has rank . Computing,

    This is symmetric and idempotent — is itself again — with column space : it is the orthogonal projection onto , which is what always is (write ). Applied to it returns , the projection the student computed by hand in Step 2 ✓. The correct check for a matrix of this shape is the Penrose condition , not .

  10. Show the solution to question 10

    (a) Centre and form the covariance. Means: , . Subtracting from each row,

    The diagonal entries are the sample variances of the two variables and the off-diagonal is their covariance.

    (b) Principal components. has trace and determinant , so : eigenvalues and , hence singular values of are and . For , gives ; for , gives . The variances explained are : and , whose sum ✓. The first component explains

    so a single coordinate along the line (through the mean) captures of the spread.

    (c) Scores, and the reconstruction. The scores are . They have mean zero, so their sample variance is

    — the first-component-maximises-variance theorem in action. Since , , and the rank-one truncation is

    Adding the mean back, the reconstructed points are : each original point has been dropped perpendicularly onto the line . The residual is , with rows , so ✓, which is the sum of the squared distances from the points to the line. That equality is Eckart–Young: no other line through the mean has a smaller total squared distance to the data.

    (d) What forgetting to centre does. Write for the all-ones vector in , so that . Then

    because is the vector of column sums of the centred matrix, which is , and .

    Here , so (direct check from the raw rows: and ✓). Its eigenvalues are , namely and , so the uncentred procedure reports a leading direction with “explained fraction” instead of the true . The extra term is rank one, points along the mean , and has eigenvalue — it measures where the cloud sits, not how it varies, and it dominates whenever the mean is large compared with the spread. In this example the direction happened to survive only because lies along the genuine first component; move the data to have mean and the uncentred leading direction would swing to , the wrong axis entirely.

  11. Show the solution to question 11

    (a) The stretch factor from a square root. is symmetric, so , with eigenvalues , namely and , and eigenvectors and . The positive definite square root acts as and on those eigenspaces:

    Check: ✓, and is positive definite (eigenvalues ). Since , and

    ✓, and ✓. Uniqueness of the polar factors of an invertible matrix says these are the factors.

    (b) The same factors from the SVD. Singular values are and , with , , and

    (The eigenvalue of has become the singular value , and the sign has moved into .) Then

    and , which is the sum computed in (a). Both agree ✓. Sign choices cannot matter: replacing by leaves each product and unchanged, and if a singular value were repeated, summed over its eigenspace would likewise be basis-independent.

    Geometrically swaps the coordinates: it is the reflection across the line , not a rotation. So is “stretch by along and by along , then reflect in the line ”.

    (c) Rotation or reflection, and the distance to . From , . The eigenvalues of are the singular values , so , and since is orthogonal. Hence exactly when . Here , so and is a reflection, in agreement with (b).

    For the distance, and orthogonal invariance of the Frobenius norm give

    Direct check: , whose entries square to ✓. Since is the orthogonal matrix nearest to , no orthogonal matrix lies within Frobenius distance of .

  12. Show the solution to question 12

    (a) The pseudoinverse solution, coordinate by coordinate. By definition , so

    Each component of along is divided by : the smallest singular value is the largest amplifier. Replacing by changes by , and because the are orthonormal,

    the last step being Parseval for the orthonormal basis of . So , with equality when is a multiple of , since then only the term survives and both inequalities are equalities.

    (b) The truncated solution is a pseudoinverse solution for . The truncation is written in SVD form with rank , so its pseudoinverse, by the definition applied to that SVD, is , and

    (Uniqueness via the Penrose conditions guarantees this does not depend on which SVD of we started from.) A perturbation now moves by , and the computation of (a) with replaced by gives

    because every retained exceeds . For at least one of the two inequalities is strict: the first if some with is nonzero (as there), and otherwise the second, since then all of sits in the omitted terms . So the amplification is capped at , a number chosen by the user, however tiny may be.

    (c) The price: a larger residual. Expand . Since ,

    The first is the projection of onto , as it should be. Subtracting from and using orthonormality of the ,

    and the difference is : exactly the part of that lived in the discarded singular directions. Regularisation trades a controlled amount of misfit (bias) for immunity to noise (variance).

    The example. is its own SVD with , , , , and .

    By (a), , and gives : a perturbation of length moved the solution by , which is exactly, the equality case.

    With we have , so and . The same has , so does not move at all — comfortably within the cap from (b).

    Residuals: , while , of squared length , matching (c) with , . The regularised fit misses by in the direction it has chosen not to trust, and in exchange a change in the data no longer produces a change in the answer.

Full solutions sheet →