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) Lengths and angle. , so ; likewise and . The dot product is , so

    which is negative: the angle is obtuse. Cauchy–Schwarz is comfortably satisfied, , which is why a cosine came out.

    Distance directly. , so and .

    Distance from the three numbers. Expand with linearity and symmetry of the dot product:

    (b) One scalar equation. , which vanishes exactly for and . Check : ✓. Check : ✓. Orthogonality is a single scalar condition; here it happens to be quadratic in , so it has two solutions rather than one.

    (c) Pythagoras. , so . From the entries, and , so .

    Without the entries: and , and because the vectors are orthogonal the Pythagorean theorem gives ✓.

    Meanwhile . There is no contradiction: Pythagoras is a statement about squared lengths. The equation is the equality case of the triangle inequality, which holds only when one vector is a non-negative multiple of the other — and two nonzero orthogonal vectors are as far from parallel as vectors can be.

  2. Show the solution to question 2

    (a) Set up the equations. By the finite test for orthogonal complements — a vector is in if and only if it is orthogonal to each vector of a spanning set of — lies in exactly when and :

    Row-reduce the coefficient matrix: subtracting twice the second row from the first turns into . Pivots sit in columns 1 and 2, so and are free, and :

    A basis of is ; the two are independent because of the and pattern in the free positions. Check all four dot products: , , , ✓.

    Since are not multiples of each other, , and , so ✓, as the dimension theorem for complements requires.

    (b) Two membership tests. and , so . For : but , so — one failed equation is enough.

    To express , read the free positions: the third and fourth entries force and , and indeed ✓.

    (c) The four subspaces. The rows are independent, so , with , . Hence and in ; and in .

    By the fundamental orthogonality relation , and , so — which is exactly the homogeneous system solved in (a).

    means , so is all of : every is reachable and is consistent for every right-hand side. There is no direction in that this matrix cannot reach, so least squares would never be needed for it.

  3. Show the solution to question 3

    (a) Three dot products. , , . The set is orthogonal and every vector is nonzero, so by the theorem that orthogonal sets of nonzero vectors are linearly independent, it is independent; three independent vectors in form a basis.

    Coefficients. In an orthogonal basis . All three denominators equal (, , ). The numerators are

    so , , and . Check: ✓.

    (b) An orthogonal matrix. Each column of has length , and dividing by leaves a zero dot product zero, so the columns are orthonormal. The entry of is the dot product of columns and , hence . Because is square this makes it an orthogonal matrix, and .

    So , whose entries are the dot products of with the columns: . Check: ✓. Lengths: and ✓ — multiplication by a matrix with orthonormal columns preserves length. ( is just the coordinate vector of in the orthonormal basis: each entry is .)

    (c) The missing denominators. The right-hand side is , nine times too large. The formula requires an orthonormal basis. These vectors are orthogonal but each has length , so every coefficient is missing its denominator .

  4. Show the solution to question 4

    (a) Project with the orthogonal basis. and both are nonzero, so they form an orthogonal set, hence an independent one, hence an orthogonal basis of the plane they span. The Orthogonal Decomposition Theorem then gives

    using , , , . Then and, by the Best Approximation Theorem, .

    Checks: and , so by the finite test ✓. Pythagoras: , , , and ✓.

    (b) The complement route. gives and gives , so and : spans , which has dimension . Projecting onto that line,

    and again. The routes must agree by the uniqueness in the Orthogonal Decomposition Theorem: with and can be done in only one way, and the -component of is by definition , which is the projection onto the line through .

    (c) The matrix. With ,

    Then ✓. is visibly symmetric and .

    Finally

    since : it is the projection matrix onto the line , exactly as the theorem on symmetric idempotents promises.

  5. Show the solution to question 5

    (a) Four bases. The second row is three times the first, so and each of the four subspaces is a line.

    , dimension . : , so , dimension . (the second column is twice the first), dimension . : gives , so , dimension .

    Orthogonality: , so ; and , so ✓. In each copy of the dimensions add to .

    (b) The domain. Draw as the line through the origin in direction (slope ) and as the line in direction (slope ); the two are perpendicular. Project onto the row line:

    and does lie in ✓. Draw from the origin to , along the row line to , along the null line to ; is the diagonal of the rectangle they span.

    The codomain. Draw in direction (slope ) and in direction (slope ), again perpendicular. Compute

    So and are the same arrow, , lying on the line, and is a dot at the origin. The picture says: the null-space component of is crushed to zero, the row-space component carries everything, and its image lands in the column space. The row line is carried one-to-one onto the column line ().

    (c) An unreachable target. Project onto :

    Draw to , on the column line, and the short perpendicular leg from to running parallel to . Every vector lies on the line , and does not: it has the nonzero component in the perpendicular direction , which no input can produce. That is what inconsistency looks like.

    For the last part write ; then , and this equals when . So . Check: ✓. (Adding any multiple of gives another vector with the same image; the one in is the shortest of them.)

  6. Show the solution to question 6

    (a) Polarization. Expand both squares using linearity in each slot and symmetry:

    Subtracting, the squared lengths cancel and remains; divide by .

    Length-preserving implies orthogonal. Let be arbitrary. Apply polarization to and , use linearity of , then the hypothesis:

    Now the entry of is the dot product of columns and of , that is , which is if and otherwise. Hence , and since is square this is the definition of an orthogonal matrix. Together with the theorem on matrices with orthonormal columns, this says the orthogonal matrices are exactly the length-preserving ones.

    (b) Bessel. Put and . For each ,

    because orthonormality kills every term with and leaves . As is a combination of the , linearity gives . By the Pythagorean theorem,

    Expanding by the same orthonormality. Therefore

    Equality holds if and only if , if and only if (positive definiteness), if and only if , which lies in the span. Conversely, if is in the span, dotting with gives (the coefficient theorem for orthonormal bases), so , , and equality holds.

    (In the language of projections, is for the span and is the error; Bessel is Pythagoras for that decomposition.)

    (c) Symmetric orthogonal matrices. If and then . Example: , which is symmetric and whose columns are orthonormal; indeed . Geometrically it reflects the plane in the line , and reflecting twice is the identity. (Another: , reflection in the -axis.)

  7. Show the solution to question 7

    (a) Step 1. , with .

    Step 2. , so

    Rescale by to : multiplying by a nonzero scalar changes neither the span nor orthogonality to . Check ✓; note .

    Step 3. and , so

    rescaled to . Checks: ✓ and ✓. (Both projections were subtracted from the original , even though one of them happened to be zero.)

    All three vectors have squared length , so the orthonormal basis is

    (b) Coordinates by dot products. In an orthonormal basis the coefficient of is the dot product with . For : , , , so . For : , , , so . Checks: ✓ and ✓.

    That uses no was guaranteed in advance: the correctness theorem says , so — this is the triangular pattern that becomes the matrix in the factorization. That uses no was not guaranteed; it is the accident discovered in step 3.

    (c) Reversed order. , , and , so

    with ✓. Neither vector appeared in (a): the first output is always a multiple of the first input, so the order matters.

    Third step without computing: is minus its projection onto , so by the correctness theorem lies in , a subspace of dimension . Since and , that vector spans the line, and by the theorem's first claim. Hence is a nonzero multiple of . (Carrying the step out gives exactly .) The two orthogonal bases share no vector, but both span : only the subspace is order-independent.

  8. Show the solution to question 8

    (a) Gram–Schmidt on the columns. and are not proportional, so the columns are independent and the theorem applies. , , . Then and , so

    Check ✓.

    The factors. for : , , . So

    (b) Checks. The rows of are and , so has entries , , , . That is ✓, and the zero below the diagonal is exactly the statement . The diagonal: and ✓, both positive as the theorem requires.

    Multiplying out, column of is ✓ and column is ✓.

    (c) A tall . is ; only square matrices have inverses. Concretely, its two columns span a plane in , so is not onto and no matrix can undo it. What does satisfy is .

    Now , so : the matrix fixes . And , so .

    Since is orthogonal to both columns of , it spans , which has dimension . A matrix that fixes (it fixes , and likewise ) and annihilates is the orthogonal projection onto — which is also what the formula for orthonormal columns says. For the record,

    symmetric with trace , and certainly not .

  9. Show the solution to question 9

    (a) Step 2 — the missing denominators. The principle is right: with orthogonal columns the normal equations decouple and consists of the coefficients of in the orthogonal basis . But that coefficient formula is ; the version with no denominator is for orthonormal vectors only. Here and , so and are too large by exactly those factors. The student's own Step 1 contained the denominators: the normal equations read , which forces .

    Step 3 — a non-check. The statement is true of every least-squares solution of an inconsistent system, so observing it cannot tell a right answer from a wrong one. The check that certifies a least-squares solution is : the residual must be orthogonal to every column. With the student's the residual is and

    which would have exposed Step 2 at once. A cruder detector was also available: the student's error exceeds , yet already achieves error , so no minimiser can do worse than that.

    Step 4 — off by a square root. The least-squares error is the length . The squared length is the quantity being minimised, but the error reported is the norm. (And is built from the wrong in any case.)

    (b) The correct solution. Normal equations: and , so . Then

    The certifying check: ✓. The error is

    Cross-check by the Pythagorean shortcut: and , and ✓.

  10. Show the solution to question 10

    (a) The normal equations. One row per observation, one column per parameter:

    The sums are , , , , , so

    The determinant is , so and

    The fitted line is . Check the first normal equation: ✓.

    (b) Residuals. The fitted values at are , so

    ✓ and ✓. Both come from the normal equations in the form : the first row of is the column of ones, giving , and the second row is the column of -values, giving . The residual is orthogonal to every column of the design matrix.

    Error, directly. , so the least-squares error is .

    Error, by Pythagoras. and , and ✓. The identity holds because .

    (c) A redundant column. The new column has entries , which is twice the -column plus the column of ones: the three columns are linearly dependent. By the lemma on , (now ) is invertible if and only if the columns are independent, so it is singular. The normal equations are still consistent — they always are — but have infinitely many solutions.

    To describe them, rewrite the model as : it is the same family of lines. So the least-squares solutions are exactly the triples with and , the line

    where spans (each row gives ✓).

    The fitted values are , and this depends only on the subspace . Adding a column that already lies in the span of the old ones leaves unchanged, so the projection, the residuals and the error are all identical to (a). The projection is unique even when the coefficient vector is not.

  11. Show the solution to question 11

    (a) Projection shrinks. Write . The first piece lies in . The second lies in : for any ,

    using symmetry and then idempotence. (Equivalently: this is the orthogonal decomposition of , with .) The two pieces are orthogonal, so by the Pythagorean theorem

    and taking square roots gives .

    Equality holds if and only if , i.e. , which places in . Conversely, if then is a decomposition with and , so by uniqueness in the Orthogonal Decomposition Theorem and equality holds.

    (b) A reflection. and . Next . Symmetry: . Orthogonality:

    For , as in (a), so . For the decomposition gives , so . Hence for a general we get : keeps the component in and reverses the component in . It is the reflection of through . Being orthogonal it preserves lengths, which agrees with , and says reflecting twice is the identity. (Along the way: is symmetric and idempotent with , , so it is the projection onto .)

    (c) A Householder reflection. For a line, , so . It is symmetric and orthogonal with , and by (b) it sends while fixing every vector orthogonal to : the reflection in the plane .

    Numerically, , so

    ✓. For : , so , and ✓.

    For use with :

    (Matrix check: , the same.) Lengths: and ✓, as an orthogonal matrix requires.

  12. Show the solution to question 12

    (a) Null spaces. If then , so . Conversely, if , multiply on the left by :

    so by positive definiteness. Hence .

    Column spaces. is and is , so both column spaces live inside and can be compared. By Rank–Nullity applied to the two -column matrices and ,

    and because row rank equals column rank. Every vector of has the form , so . A subspace contained in another of the same finite dimension equals it: .

    Consistency. , and membership in is exactly the statement that has a solution. (The projection proof of the same fact argues through ; this one never mentions a projection.)

    (b) The projection is unique. By the normal-equations theorem, least-squares solutions are exactly the solutions of . Subtracting the two equations, , so by (a), i.e. .

    The same computation read backwards describes the whole set: if is one least-squares solution and , then , so is another; and every other differs from by an element of . The set is the translate . It is a single point exactly when , i.e. when the columns of are independent — which by the lemma on is also exactly when is invertible and .

    (c) Pythagoras for the residual. The normal equations say . Therefore

    so . Since , the Pythagorean theorem gives . (In particular always, as it must be, since is a competitor with error .)

    When the error is as bad as possible. By the identity, if and only if , i.e. . If that holds, then , so . Conversely, if then solves the normal equations, so by (b) every least-squares solution has and the error is . By the fundamental orthogonality relation , so this is the case in which has no component in any direction the columns of can reach: the best the model can do is predict , and it explains nothing.

Full solutions sheet →