Linear Algebra · Solutions
Symmetric Matrices and Quadratic Forms
Work this sheet on paper, showing every step — the method is what is being tested, and the solutions are written so you can check your route rather than just your answer. Name every result you use (“by the Spectral Theorem”, “by Sylvester's criterion”, “by the Rayleigh bound”) and check its hypotheses, above all that the matrix in question really is symmetric. No calculator is needed anywhere: every eigenvalue on this sheet is an integer or a simple surd, and every answer should be left exact. Full worked solutions are on a separate page; each question also has its own reveal, so you can check one answer without seeing the rest.
- 1.Computation
Let and .
- (a)Split as with symmetric and skew-symmetric, and explain why this is the only such splitting.
- (b)For compute , and separately. Then explain — for every , not just this one — why the third number is forced to be zero.
- (c)Compute and , state the size of each, and explain without multiplying anything out why the two products must have the same trace.
Solution
(a) Average with the transpose. , so
is its own transpose, has zero diagonal with , and reproduces entry by entry.
Uniqueness: suppose with symmetric and skew. Transposing, . Adding the two equations gives , subtracting gives . So and are forced to be the matrices above.
(b) Evaluate all three. , so .
, so as well.
, so .
The general reason: is a matrix, hence equal to its own transpose,
so . A skew-symmetric matrix contributes nothing to any quadratic form, which is why for every .
(c) Two Gram matrices. The columns of are and , and is the table of their dot products:
The rows of are , , , and is the table of their dot products:
Both are symmetric, as and guarantee.
Trace: the diagonal of lists the squared lengths of the columns, so is the sum of the squares of all entries of . The diagonal of lists the squared lengths of the rows — the same sum. Hence the traces agree without any multiplication: both equal , and indeed .
- 2.Proof
Let and be symmetric matrices. Prove each statement directly from the definition and the rules for transposes; no eigenvalues are needed.
- (a)Prove that is symmetric if and only if , and give an explicit pair of symmetric matrices whose product is not symmetric.
- (b)Prove that a square matrix satisfies for every if and only if is skew-symmetric.
- (c)Prove that a matrix which is both symmetric and orthogonal satisfies , and exhibit such a matrix other than . What does force the eigenvalues of to be?
Solution
(a) Transpose the product. By the reversal rule, , using and . Therefore
For the example take and , both symmetric. Then
which differ, and is visibly not symmetric (its off-diagonal entries are and ).
(b) Split off the symmetric part. () If , then the matrix equals its own transpose:
so for every .
() Write with symmetric and skew. By the direction just proved, , so the hypothesis says for every . Take : this gives . Take with : expanding, , so . Hence and is skew-symmetric.
(The key step is that a symmetric matrix is determined by its quadratic form — the same argument that shows the matrix of a form is unique.)
(c) Combine the two identities. Orthogonal means ; symmetric means . Substituting the second into the first, .
Example: . It is symmetric, its columns are orthonormal, and while . Geometrically it is the reflection across the line .
Eigenvalues: if with , then , so and . Combined with the Spectral Theorem, with every diagonal entry of equal to : a symmetric orthogonal matrix is exactly a reflection across the eigenspace. For the example, has eigenvalue and has eigenvalue .
- 3.Computation
Let .
- (a)Find the eigenvalues of and check them against the trace and the determinant.
- (b)Find an orthogonal matrix and a diagonal matrix with . Name the result that guarantees you never needed to check that your two eigenvectors are perpendicular — and then check it anyway.
- (c)Multiply out and confirm that it equals . Then describe in one sentence what does to the plane, in terms of the two directions you found.
Solution
(a) Characteristic polynomial. and , so
giving and . Check: and . Both real, as the real-eigenvalue lemma for symmetric matrices promises.
(b) Eigenvectors, then normalise. For : , and the first row says , so . Take , of length : .
For : , and , so . Take : .
The orthogonality lemma — eigenvectors of a symmetric matrix belonging to distinct eigenvalues are orthogonal — guarantees in advance, since . Checking anyway: . No Gram–Schmidt step is needed because each eigenspace is one-dimensional.
, so is orthogonal. (Its determinant is ; replacing by would make a rotation, and either choice is correct.)
(c) Multiply back. First , then with ,
Geometry: stretches the plane by a factor along the direction and by a factor with a flip along the perpendicular direction — a pure stretch along two perpendicular axes, with no shear, which is what the Spectral Theorem says every symmetric matrix does.
- 4.Computation
Let .
- (a)Write , where and are the matrices of the orthogonal projections onto the two eigen-directions. Verify and explicitly.
- (b)Use the decomposition to write down the positive semidefinite square root , and square it to check. Then write down a second symmetric square root of and say why it does not deserve the name .
- (c)Use the decomposition to write down , and check it against the usual formula for the inverse of a matrix.
Solution
(a) Eigenvalues, eigenvectors, projections. and , so : the eigenvalues are and .
For : gives , so . For : gives , so . They are orthogonal, as the lemma requires: .
The projections are the outer products of the unit vectors:
Check the decomposition: .
Check the projection identities: , and
(b) Take square roots of the eigenvalues only. Since for and , any squares to . The positive semidefinite root uses the nonnegative roots and :
Squaring directly: .
A second symmetric square root: flip one sign, . Its square is as well. But it has the eigenvalue , so it is not positive semidefinite; the name is reserved for the unique positive semidefinite root, in the same way that means and not . (There are four symmetric roots altogether, .)
(c) Reciprocals of the eigenvalues. , so
The formula gives , and , . The two agree.
- 5.Computation
Let .
- (a)Write down the symmetric matrix with , and compute .
- (b)Complete the square to write , where are linear expressions in that you must state. Read off the signature and classify the form.
- (c)Exhibit a nonzero vector at which and one at which , computing both values in full from the original polynomial.
- (d)The three coefficients in (b) are not the eigenvalues of . Explain why not, quote the theorem that says the signature nevertheless matches the signs of the eigenvalues, and check that this count is consistent with and .
Solution
(a) Halve the cross terms. The diagonal carries the coefficients of the squares, ; each off-diagonal entry is half the coefficient of the corresponding cross term: , , . So
Expanding along the first row, .
(b) Complete the square in , then in . Gather every term containing : . Hence
Now gather the terms: , so
(A coefficient of rather than is fine: rescaling to would give , and the signs are all that matter.) Two positive squares and one negative: the signature is , and the form is indefinite.
(c) Read a vector off the squares. To make negative kill both positive squares: , . From , ; from , ; from , . So try :
which is exactly , as it should be. For a positive value take : .
(d) Congruence is not similarity. The substitution with (invertible, ) turns into with ; that is, . This is a congruence, not a similarity (), so and need not share eigenvalues — and they do not: , whereas . The eigenvalues of sum to , so they are certainly not .
What congruence does preserve is the inertia. By Sylvester's law of inertia, congruent matrices have the same number of positive, negative and zero eigenvalues, and is congruent to . So has exactly two positive eigenvalues and one negative.
Consistency: the product of the eigenvalues is , which requires an odd number of negative eigenvalues — one or three. Three negatives would give a negative trace, but . So exactly one is negative, matching . As a final check, , agreeing with (a).
- 6.Critique
Two arguments follow. Each contains exactly one false step. For each argument, quote the false step, name the theorem or hypothesis that is being misused, and repair the argument to a correct conclusion with the correct numbers.
- (a)“Let . Its characteristic polynomial is , so the eigenvalues are . For an eigenvector is . For , every row of is , so the eigenspace is the plane , with basis , . Eigenvectors of a symmetric matrix are orthogonal, so are mutually orthogonal; normalising gives , , , and with we have .”
- (b)“Let . Its eigenvalues and are distinct, so is diagonalisable: with and we have . Therefore .”
Solution
(a) The false step is “Eigenvectors of a symmetric matrix are orthogonal, so are mutually orthogonal.” Everything before it is correct: with the all-ones matrix, so the eigenvalues are and (twice), and does have null space .
The lemma being misquoted says that eigenvectors belonging to distinct eigenvalues are orthogonal. It applies to against and (and indeed and ). It says nothing about and , which belong to the same eigenvalue, and in fact . So is not orthogonal — has entry — and the claimed factorisation is false. A quick way to see the damage: the three “projections” should sum to , but their entries sum to .
Repair: run Gram–Schmidt inside the repeated eigenspace, which stays within the plane and so preserves the eigenvector property:
Check: has coordinate sum (so it is still an eigenvector for ), and . Normalising (),
and now , so is correct.
(b) The false step is “.” The diagonalisation itself is right: and , so with the stated and , and .
The formula requires to be orthogonal, so that ; that is available exactly when the matrix is symmetric, by the Spectral Theorem. is not symmetric, its eigenvectors are not orthogonal (), and . Replacing by is simply an error. Two tell-tales in the student's answer: it is symmetric, whereas every power of an upper-triangular matrix is upper-triangular; and its diagonal should be and , not and .
Repair: , so
Sanity check by squaring: , , .
- 7.Sketch
Consider the curve .
A sketch with no working beside it earns nothing here: every axis, length and point you draw must come from an eigenvalue or an eigenvector.
- (a)Write down the matrix of the form, find its eigenvalues, and classify the curve, naming the result that licenses the classification.
- (b)Find unit eigenvectors, write the equation in principal-axis coordinates , and give the exact lengths and directions of the semi-axes. Check that agrees with the direction you found.
- (c)Find the four vertices and the four intercepts with the coordinate axes, exactly. Then sketch the curve, drawing both principal axes as dashed lines through the origin and labelling every vertex and intercept. Finally, say in one sentence why the curve leans into the first and third quadrants rather than the second and fourth.
Solution
(a) Matrix and eigenvalues. With , and the cross coefficient halved to ,
so and the eigenvalues are and . Both positive, and the right-hand side is positive, so by the classification of central conics (a corollary of the principal axes theorem) the curve is an ellipse. The discriminant test agrees: .
(b) Principal axes. For : gives , so . For : gives , so . (Orthogonal, as the lemma requires: .)
With , , the principal axes theorem turns the equation into
The semi-axis along has length ; the semi-axis along has length . So the major axis (length ) points along , the eigenvector of the smaller eigenvalue — a large eigenvalue means a short axis, because that direction climbs to the level fastest.
Angle check: . The direction has , and the double-angle formula gives . The formula and the eigenvector agree: the minor axis sits about below the -axis, the major axis about above it.
(c) Vertices, intercepts, sketch. The vertices are the ends of the semi-axes:
Check one of each on the original equation: at , ; at , .
Intercepts: on , gives ; on , gives .
The sketch: draw the dashed line through the origin with slope (the major axis) and the dashed line with slope (the minor axis), perpendicular to each other. Mark the two major vertices at distance from the origin along the first line and the two minor vertices at distance along the second, and draw the ellipse through all four, tangent to the perpendicular direction at each. Mark the intercepts and and confirm the curve passes through them. Note that the intercepts are not the extreme points of the ellipse: the curve pokes slightly beyond them, to and , before turning back. (Those extremes come from asking when the equation, read as a quadratic in one variable, has a double root.)
Why it leans into quadrants I and III: the cross term is negative where and have the same sign, so in those quadrants the form grows more slowly and a point can travel farther from the origin before reaching the level . In eigenvalue language, the smaller eigenvalue belongs to , which points into quadrant I, and the semi-axis there is the longer one, .
- 8.Computation
Let , and let be its matrix.
- (a)Write down and find its eigenvalues without expanding a determinant, by expressing in terms of and the all-ones matrix . Check with the trace.
- (b)Find the maximum and the minimum of on the unit sphere , and describe the complete set of points at which each is attained. Then evaluate the Rayleigh quotient at and confirm that it lies between the two.
- (c)The maximum of over the unit sphere is a different number from the maximum of . Find it, say where it is attained, and explain why it is not .
Solution
(a) Spot the structure. Halving each cross coefficient to ,
has rank , so is an eigenvalue with a two-dimensional eigenspace, the plane ; and every row of sums to , so . Since has the same eigenvectors with eigenvalues , the eigenvalues of are on and (twice) on the plane . Ordered: , . Check: .
(b) Extreme values are eigenvalues. By the Rayleigh theorem, the maximum of on the unit sphere is and the minimum is .
Where attained: the minimum at the unit eigenvectors for , namely . Check: . The maximum is attained at every unit vector in the eigenspace for — the whole great circle , — since for such , . Nowhere else: in principal coordinates with , and this equals only when . Spot check: at , .
Rayleigh quotient at : and , so
which does lie in , as the bound requires.
(c) Lengths see , forms see . , and is symmetric with the same eigenvectors as and eigenvalues : . Applying the Rayleigh theorem to , the maximum of on the unit sphere is , so
attained at . Directly: , which has length , and dividing by gives .
It is not because the length of does not care about the sign of the stretch: the direction is scaled by , which makes the form as negative as possible but makes the image as long as possible. The maximum of the form is ; the maximum of is , the spectral norm. (For the same reason the minimum of on the sphere is , not .)
- 9.Computation
Let , where is a real parameter.
- (a)Using Sylvester's criterion, find every for which is positive definite.
- (b)Show that is never negative definite, and prove that it is indefinite for every outside the range found in (a), endpoints excluded. A sign argument with the trace and the determinant is enough.
- (c)At the endpoint , write as a sum of two squares, deduce that is positive semidefinite but not positive definite, and find a nonzero vector at which the form is zero. Explain why that vector had to be an eigenvector, and for which eigenvalue.
Solution
(a) Three leading minors. for every . . Expanding along the first row,
Sylvester's criterion asks for all three to be positive: and . The second implies the first, so is positive definite exactly when , that is
(b) Never negative definite; indefinite outside. A negative definite matrix has every diagonal entry negative, since . Here for every , so is never negative definite.
Now let . Then . The determinant is the product of the three (real) eigenvalues, so an odd number of them — one or three — are negative. Three negative eigenvalues would give a negative trace, but . So exactly one eigenvalue is negative and at least one is positive, and is indefinite: the form takes both signs.
(For the record the eigenvalues are and , with eigenvectors and , which confirms everything above — but the sign argument needed none of that.)
(c) The endpoint. At ,
as expanding the right-hand side confirms: . A sum of squares is never negative, so is positive semidefinite. It is not positive definite because the sum vanishes at a nonzero vector: both squares are zero when and , for instance at
Why must be an eigenvector: by the Rayleigh theorem the minimum of the form over unit vectors is , which is here since the form is never negative; the unit vector gives the value , so and attains the minimum. In principal coordinates the form is , and it can equal only if all the weight sits on eigenvalues equal to — so lies in the eigenspace for . Direct check:
This is consistent with : at the threshold one eigenvalue is exactly zero, which is what Sylvester's criterion failing by equality, rather than by sign, means.
- 10.Computation
Let and .
- (a)Compute the Cholesky factor of , column by column, and verify . What does the success of the algorithm tell you about , and by which theorem?
- (b)Solve using only : two triangular solves and no elimination on itself.
- (c)Read off the pivots of and from . Then show, using the trace, that the pivots are not the eigenvalues of , and say which single quantity the pivots and the eigenvalues do share.
- (d)Replace the entry by a parameter . For which does the Cholesky algorithm succeed? Interpret the threshold value of in terms of definiteness, and identify the quantity under the final square root as a Schur complement.
Solution
(a) Column by column. Column : , then and .
Column : , then
Column : .
Every quantity under a square root was positive, so the algorithm produced a lower-triangular with positive diagonal. By the Cholesky theorem — a symmetric matrix is positive definite if and only if it factors as with such an — is positive definite.
(b) Two triangular solves. Since , solve forwards and then backwards.
Forward: gives ; gives ; gives , so . Thus .
Backward, with : gives ; gives ; gives , so . Hence
Check against directly: .
(c) Pivots and determinant. The Cholesky diagonal holds the square roots of the pivots, so the pivots are , and
equivalently the product of the pivots, . (Direct check: .) The leading minors , , confirm the pivot ratios , , .
The pivots are not the eigenvalues: the eigenvalues sum to , whereas the pivots sum to . What the two triples share is their product: both multiply to . (All three eigenvalues are positive too, but they are the roots of a cubic that does not factor nicely, and nothing here needs them.)
(d) The threshold. Columns and do not involve , so are unchanged, and the last step becomes . The algorithm succeeds exactly when .
Interpretation: , while the first two leading minors stay and . For all three are positive and is positive definite; at the matrix is singular with the form still — positive semidefinite, and Cholesky fails by hitting (a zero on the diagonal is not allowed); for the determinant is negative, so an odd number of eigenvalues are negative, while rules out all three being negative; hence is indefinite.
Schur complement: the number is , where is the leading block and is the rest of the third column. Indeed and . The final pivot is always the Schur complement of the block above it, and positive definiteness of is exactly positive definiteness of together with positivity of that complement.
- 11.Proof
Throughout, is a real symmetric matrix with eigenvalues and an orthonormal eigenbasis . You may quote the Spectral Theorem and the Rayleigh bounds .
- (a)Prove that every diagonal entry satisfies .
- (b)Prove that if a unit vector attains the maximum, , then is an eigenvector: . (Write and examine exactly when a weighted average of the eigenvalues can equal the largest of them.)
- (c)Deduce that if , then every other entry of the first row and of the first column of is zero.
- (d)Now let be a positive semidefinite matrix with some diagonal entry . Prove that the entire -th row and -th column of are zero.
Solution
(a) Test the form on a standard basis vector. , because is the -th column of and dotting with picks out its -th entry. Since , the Rayleigh bounds give .
(b) When does an average equal the maximum? Let , orthogonal by the Spectral Theorem, and write , so has and . The hypothesis therefore reads
using . Every term is a product of two nonnegative numbers, so a sum of zero forces every term to be zero: for each . Hence whenever . Let ; then , and
(The same argument with in place of shows that a unit vector attaining the minimum is an eigenvector for ; alternatively, apply the result to , whose largest eigenvalue is .)
(c) The first basis vector attains the maximum. If then with , so by (b) . But is the first column of ; so the first column is , i.e. for all . By symmetry , so the first row is zero off the diagonal too.
(d) A zero on the diagonal of a semidefinite matrix. Positive semidefinite means for all , so in particular the minimum on the unit sphere, , is . By (a), . Hence , and attains the minimum of the form.
Apply (b) to : its largest eigenvalue is , and equals it, so , that is . The -th column of is therefore zero, and by symmetry so is the -th row.
This is the semidefinite version of the fact that the largest entry of a positive definite matrix sits on the diagonal: for a semidefinite matrix, a zero diagonal entry wipes out its whole row and column, which is why a covariance matrix with a zero variance in some coordinate has zero covariance between that coordinate and every other.
- 12.Proof
Let be a positive definite matrix, let , and define . Put .
- (a)Prove the identity by expanding the right-hand side, and say exactly where the symmetry of is used.
- (b)Deduce that is the unique global minimiser of and that the minimum value is . Explain what this adds to what the second derivative test would tell you.
- (c)Check with and : verify that is positive definite, find , evaluate directly from the definition of , and compare with (b).
- (d)Let be an matrix with linearly independent columns and . Show that equals for suitable and , verify that this is positive definite, and conclude that the least-squares problem has a unique solution, given by the normal equations. Where exactly does the independence of the columns enter?
Solution
(a) Expand and compare. Expanding the right-hand side,
The two middle terms are equal: is a matrix, so it equals its transpose , and this is where symmetry is used — turns that into . So the middle terms combine to . Now , so and . The right-hand side is therefore
On the other side, , so , which is exactly the expression just found.
(Positive definiteness was also used silently in writing at all: if then , which forces , so is invertible — equivalently, none of its eigenvalues is zero.)
(b) Positive definiteness finishes it. Put . By (a), , which is for every by the definition of positive definiteness, and only at . So for every : is the unique global minimiser, and the minimum value is
What this adds: the gradient of is and its Hessian is , so the second derivative test says only that is a strict local minimum. The identity in (a) is exact, with no error term, so it upgrades local to global and gives uniqueness and the minimum value for free. (It also shows why matters: grows at least quadratically away from in every direction.)
(c) A worked instance. Leading minors and , so is positive definite by Sylvester's criterion. , so
(Check: .) Directly from the definition, with ,
Formula from (b): . They agree, and for instance and , as the theorem requires.
(d) Least squares is this problem in disguise. Expand the squared norm:
where the two cross terms and were combined because each is the transpose of the other and both are scalars. With and this is
is symmetric, and for any , , with equality only when . Independence of the columns enters exactly here: it says only for , so the form is strictly positive on nonzero vectors and is positive definite (this is the test for positive definiteness: is positive definite exactly when has independent columns, here with ).
By (b), — a positive constant times plus a constant — has the unique global minimiser , which is precisely the solution of the normal equations . If the columns were dependent, would be singular (only semidefinite), the identity in (a) could not even be written, and the minimiser would not be unique: adding any with to a minimiser leaves the residual, and hence , unchanged.