CalcPath
ProgressProblem setsFeedback
← Question sheet

Linear Algebra · Solutions

Symmetric Matrices and Quadratic Forms

12 questions · about 107 minutes

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. 1.Computation

    Let M=​213​507​−134​​ and A=​120​−103​​.

    1. (a)Split M as S+K with S symmetric and K skew-symmetric, and explain why this is the only such splitting.
    2. (b)For x=⟨1,1,1⟩ compute xTMx, xTSx and xTKx separately. Then explain — for every x, not just this one — why the third number is forced to be zero.
    3. (c)Compute ATA and AAT, 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. MT=​25−1​103​374​​, so

    S=21​(M+MT)=21​​462​6010​2108​​=​231​305​154​​,K=21​(M−MT)=​0−22​202​−2−20​​.

    S is its own transpose, K has zero diagonal with kji​=−kij​, and S+K reproduces M entry by entry.

    Uniqueness: suppose M=S′+K′ with S′ symmetric and K′ skew. Transposing, MT=S′−K′. Adding the two equations gives 2S′=M+MT, subtracting gives 2K′=M−MT. So S′ and K′ are forced to be the matrices above.

    (b) Evaluate all three. Mx=⟨2+5−1, 1+0+3, 3+7+4⟩=⟨6,4,14⟩, so xTMx=6+4+14=24.

    Sx=⟨6,8,10⟩, so xTSx=24 as well.

    Kx=⟨0+2−2, −2+0−2, 2+2+0⟩=⟨0,−4,4⟩, so xTKx=0−4+4=0.

    The general reason: xTKx is a 1×1 matrix, hence equal to its own transpose,

    xTKx=(xTKx)T=xTKTx=−xTKx,

    so 2xTKx=0. A skew-symmetric matrix contributes nothing to any quadratic form, which is why xTMx=xTSx for every x.

    (c) Two Gram matrices. The columns of A are c1​=⟨1,2,0⟩ and c2​=⟨−1,0,3⟩, and ATA is the 2×2 table of their dot products:

    ATA=(c1​⋅c1​c2​⋅c1​​c1​⋅c2​c2​⋅c2​​)=(5−1​−110​).

    The rows of A are ⟨1,−1⟩, ⟨2,0⟩, ⟨0,3⟩, and AAT is the 3×3 table of their dot products:

    AAT=​22−3​240​−309​​.

    Both are symmetric, as (ATA)T=ATA and (AAT)T=AAT guarantee.

    Trace: the diagonal of ATA lists the squared lengths of the columns, so tr(ATA) is the sum of the squares of all entries of A. The diagonal of AAT lists the squared lengths of the rows — the same sum. Hence the traces agree without any multiplication: both equal 1+1+4+0+0+9=15, and indeed 5+10=15=2+4+9.

  2. 2.Proof

    Let S and T be symmetric n×n matrices. Prove each statement directly from the definition AT=A and the rules for transposes; no eigenvalues are needed.

    1. (a)Prove that ST is symmetric if and only if ST=TS, and give an explicit pair of symmetric 2×2 matrices whose product is not symmetric.
    2. (b)Prove that a square matrix M satisfies xTMx=0 for every x∈Rn if and only if M is skew-symmetric.
    3. (c)Prove that a matrix which is both symmetric and orthogonal satisfies A2=I, and exhibit such a 2×2 matrix other than ±I. What does A2=I force the eigenvalues of A to be?

    Solution

    (a) Transpose the product. By the reversal rule, (ST)T=TTST=TS, using ST=S and TT=T. Therefore

    ST is symmetric⟺(ST)T=ST⟺TS=ST.

    For the example take S=(12​21​) and T=(10​0−1​), both symmetric. Then

    ST=(12​−2−1​),TS=(1−2​2−1​),

    which differ, and ST is visibly not symmetric (its off-diagonal entries are −2 and 2). ■

    (b) Split off the symmetric part. (⇐) If MT=−M, then the 1×1 matrix xTMx equals its own transpose:

    xTMx=(xTMx)T=xTMTx=−xTMx,

    so 2xTMx=0 for every x.

    (⇒) Write M=S+K with S=21​(M+MT) symmetric and K=21​(M−MT) skew. By the direction just proved, xTKx=0, so the hypothesis says xTSx=0 for every x. Take x=ei​: this gives sii​=0. Take x=ei​+ej​ with i=j: expanding, sii​+sjj​+sij​+sji​=2sij​=0, so sij​=0. Hence S=0 and M=K 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 ATA=I; symmetric means AT=A. Substituting the second into the first, A2=AA=ATA=I. ■

    Example: A=(01​10​). It is symmetric, its columns are orthonormal, and A2=I while A=±I. Geometrically it is the reflection across the line y=x.

    Eigenvalues: if Av=λv with v=0, then v=A2v=λ2v, so λ2=1 and λ=±1. Combined with the Spectral Theorem, A=QΛQT with every diagonal entry of Λ equal to ±1: a symmetric orthogonal matrix is exactly a reflection across the +1 eigenspace. For the example, ⟨1,1⟩ has eigenvalue 1 and ⟨1,−1⟩ has eigenvalue −1.

  3. 3.Computation

    Let A=(22​2−1​).

    1. (a)Find the eigenvalues of A and check them against the trace and the determinant.
    2. (b)Find an orthogonal matrix Q and a diagonal matrix Λ with A=QΛQT. Name the result that guarantees you never needed to check that your two eigenvectors are perpendicular — and then check it anyway.
    3. (c)Multiply out QΛQT and confirm that it equals A. Then describe in one sentence what A does to the plane, in terms of the two directions you found.

    Solution

    (a) Characteristic polynomial. trA=1 and detA=−2−4=−6, so

    det(A−λI)=λ2−λ−6=(λ−3)(λ+2),

    giving λ1​=3 and λ2​=−2. Check: 3+(−2)=1=trA and 3⋅(−2)=−6=detA. Both real, as the real-eigenvalue lemma for symmetric matrices promises.

    (b) Eigenvectors, then normalise. For λ=3: A−3I=(−12​2−4​), and the first row says −x+2y=0, so x=2y. Take ⟨2,1⟩, of length 5​: q1​=5​1​⟨2,1⟩.

    For λ=−2: A+2I=(42​21​), and 2x+y=0, so y=−2x. Take ⟨1,−2⟩: q2​=5​1​⟨1,−2⟩.

    The orthogonality lemma — eigenvectors of a symmetric matrix belonging to distinct eigenvalues are orthogonal — guarantees q1​⊥q2​ in advance, since 3=−2. Checking anyway: ⟨2,1⟩⋅⟨1,−2⟩=2−2=0. No Gram–Schmidt step is needed because each eigenspace is one-dimensional.

    Q=5​1​(21​1−2​),Λ=(30​0−2​).

    QTQ=51​(4+12−2​2−21+4​)=I, so Q is orthogonal. (Its determinant is −1; replacing q2​ by −q2​ would make Q a rotation, and either choice is correct.)

    (c) Multiply back. First QΛ=5​1​(63​−24​), then with QT=5​1​(21​1−2​),

    QΛQT=51​(12−26+4​6+43−8​)=51​(1010​10−5​)=(22​2−1​)=A.

    Geometry: A stretches the plane by a factor 3 along the direction ⟨2,1⟩ and by a factor 2 with a flip along the perpendicular direction ⟨1,−2⟩ — a pure stretch along two perpendicular axes, with no shear, which is what the Spectral Theorem says every symmetric matrix does.

  4. 4.Computation

    Let B=(8−2​−25​).

    1. (a)Write B=λ1​P1​+λ2​P2​, where P1​ and P2​ are the matrices of the orthogonal projections onto the two eigen-directions. Verify P1​+P2​=I and P1​P2​=0 explicitly.
    2. (b)Use the decomposition to write down the positive semidefinite square root B1/2, and square it to check. Then write down a second symmetric square root of B and say why it does not deserve the name B1/2.
    3. (c)Use the decomposition to write down B−1, and check it against the usual formula for the inverse of a 2×2 matrix.

    Solution

    (a) Eigenvalues, eigenvectors, projections. trB=13 and detB=40−4=36, so λ2−13λ+36=(λ−9)(λ−4): the eigenvalues are 9 and 4.

    For λ=9: B−9I=(−1−2​−2−4​) gives x=−2y, so q1​=5​1​⟨2,−1⟩. For λ=4: B−4I=(4−2​−21​) gives y=2x, so q2​=5​1​⟨1,2⟩. They are orthogonal, as the lemma requires: 2−2=0.

    The projections are the outer products of the unit vectors:

    P1​=q1​q1T​=51​(4−2​−21​),P2​=q2​q2T​=51​(12​24​).

    Check the decomposition: 9P1​+4P2​=51​(36+4−18+8​−18+89+16​)=(8−2​−25​)=B.

    Check the projection identities: P1​+P2​=51​(50​05​)=I, and

    P1​P2​=251​(4−4−2+2​8−8−4+4​)=0.

    (b) Take square roots of the eigenvalues only. Since Pj​Pk​=0 for j=k and Pk2​=Pk​, any αP1​+βP2​ squares to α2P1​+β2P2​. The positive semidefinite root uses the nonnegative roots 9​=3 and 4​=2:

    B1/2=3P1​+2P2​=51​(12+2−6+4​−6+43+8​)=51​(14−2​−211​).

    Squaring directly: 251​(196+4−28−22​−28−224+121​)=251​(200−50​−50125​)=(8−2​−25​)=B.

    A second symmetric square root: flip one sign, 3P1​−2P2​=51​(12−2−6−4​−6−43−8​)=(2−2​−2−1​). Its square is (4+4−4+2​−4+24+1​)=B as well. But it has the eigenvalue −2<0, so it is not positive semidefinite; the name B1/2 is reserved for the unique positive semidefinite root, in the same way that 9​ means 3 and not −3. (There are four symmetric roots altogether, ±3P1​±2P2​.)

    (c) Reciprocals of the eigenvalues. B−1=91​P1​+41​P2​, so

    B−1=51​(94​+41​−92​+21​​−92​+21​91​+1​)=51​(3625​185​​185​910​​)=(365​181​​181​92​​).

    The 2×2 formula gives B−1=detB1​(52​28​)=361​(52​28​), and 362​=181​, 368​=92​. The two agree.

  5. 5.Computation

    Let Q(x,y,z)=x2+5y2+3z2+4xy−2xz+2yz.

    1. (a)Write down the symmetric matrix A with Q(x)=xTAx, and compute detA.
    2. (b)Complete the square to write Q=±u2±v2±w2, where u,v,w are linear expressions in x,y,z that you must state. Read off the signature (p,q) and classify the form.
    3. (c)Exhibit a nonzero vector at which Q<0 and one at which Q>0, computing both values in full from the original polynomial.
    4. (d)The three coefficients in (b) are not the eigenvalues of A. 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 detA and trA.

    Solution

    (a) Halve the cross terms. The diagonal carries the coefficients of the squares, 1,5,3; each off-diagonal entry is half the coefficient of the corresponding cross term: a12​=2, a13​=−1, a23​=1. So

    A=​12−1​251​−113​​.

    Expanding along the first row, detA=1⋅(15−1)−2⋅(6+1)+(−1)⋅(2+5)=14−14−7=−7.

    (b) Complete the square in x, then in y. Gather every term containing x: x2+4xy−2xz=(x+2y−z)2−(2y−z)2=(x+2y−z)2−4y2+4yz−z2. Hence

    Q=(x+2y−z)2+(5−4)y2+(2+4)yz+(3−1)z2=(x+2y−z)2+y2+6yz+2z2.

    Now gather the y terms: y2+6yz=(y+3z)2−9z2, so

    Q=(x+2y−z)2+(y+3z)2−7z2=u2+v2−7w2,u=x+2y−z, v=y+3z, w=z.

    (A coefficient of −7 rather than −1 is fine: rescaling w to 7​z would give −w′2, and the signs are all that matter.) Two positive squares and one negative: the signature is (p,q)=(2,1), and the form is indefinite.

    (c) Read a vector off the squares. To make Q negative kill both positive squares: u=v=0, w=1. From w=1, z=1; from v=0, y=−3; from u=0, x=−2y+z=7. So try ⟨7,−3,1⟩:

    Q(7,−3,1)=49+45+3+4(7)(−3)−2(7)(1)+2(−3)(1)=97−84−14−6=−7,

    which is exactly −7w2, as it should be. For a positive value take ⟨1,0,0⟩: Q=1>0.

    (d) Congruence is not similarity. The substitution y=⟨u,v,w⟩=Px with P=​100​210​−131​​ (invertible, detP=1) turns Q into yTDy with D=diag(1,1,−7); that is, A=PTDP. This is a congruence, not a similarity (PT=P−1), so A and D need not share eigenvalues — and they do not: trA=1+5+3=9, whereas 1+1−7=−5. The eigenvalues of A sum to 9, so they are certainly not 1,1,−7.

    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 A=PTDP is congruent to D. So A has exactly two positive eigenvalues and one negative.

    Consistency: the product of the eigenvalues is detA=−7<0, which requires an odd number of negative eigenvalues — one or three. Three negatives would give a negative trace, but trA=9>0. So exactly one is negative, matching (2,1). As a final check, detA=det(PT)detDdetP=1⋅(−7)⋅1=−7, agreeing with (a).

  6. 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.

    1. (a)“Let A=​211​121​112​​. Its characteristic polynomial is −(λ−4)(λ−1)2, so the eigenvalues are 4,1,1. For λ=4 an eigenvector is v1​=⟨1,1,1⟩. For λ=1, every row of A−I is (1  1  1), so the eigenspace is the plane x+y+z=0, with basis w1​=⟨1,−1,0⟩, w2​=⟨0,1,−1⟩. Eigenvectors of a symmetric matrix are orthogonal, so v1​,w1​,w2​ are mutually orthogonal; normalising gives q1​=v1​/3​, q2​=w1​/2​, q3​=w2​/2​, and with Q=[q1​ q2​ q3​] we have A=Qdiag(4,1,1)QT.”
    2. (b)“Let M=(20​13​). Its eigenvalues 2 and 3 are distinct, so M is diagonalisable: with P=(10​11​) and D=diag(2,3) we have M=PDP−1. Therefore M5=PD5PT=(275243​243243​).”

    Solution

    (a) The false step is “Eigenvectors of a symmetric matrix are orthogonal, so v1​,w1​,w2​ are mutually orthogonal.” Everything before it is correct: A=I+J with J the all-ones matrix, so the eigenvalues are 1+3=4 and 1+0=1 (twice), and A−I=J does have null space x+y+z=0.

    The lemma being misquoted says that eigenvectors belonging to distinct eigenvalues are orthogonal. It applies to v1​ against w1​ and w2​ (and indeed 1−1+0=0 and 0+1−1=0). It says nothing about w1​ and w2​, which belong to the same eigenvalue, and in fact w1​⋅w2​=0−1+0=−1=0. So Q is not orthogonal — QTQ has (2,3) entry q2​⋅q3​=−21​ — and the claimed factorisation is false. A quick way to see the damage: the three “projections” qk​qkT​ should sum to I, but their (1,1) entries sum to 31​+21​+0=65​.

    Repair: run Gram–Schmidt inside the repeated eigenspace, which stays within the plane and so preserves the eigenvector property:

    w2′​=w2​−w1​⋅w1​w2​⋅w1​​w1​=⟨0,1,−1⟩+21​⟨1,−1,0⟩=⟨21​,21​,−1⟩ ∥ ⟨1,1,−2⟩.

    Check: ⟨1,1,−2⟩ has coordinate sum 0 (so it is still an eigenvector for 1), and ⟨1,1,−2⟩⋅⟨1,−1,0⟩=0. Normalising (∥⟨1,1,−2⟩∥=6​),

    Q=​3​1​3​1​3​1​​2​1​−2​1​0​6​1​6​1​−6​2​​​,Λ=diag(4,1,1),

    and now QTQ=I, so A=QΛQT is correct.

    (b) The false step is “M5=PD5PT.” The diagonalisation itself is right: M⟨1,0⟩=2⟨1,0⟩ and M⟨1,1⟩=⟨3,3⟩=3⟨1,1⟩, so M=PDP−1 with the stated P and D, and M5=PD5P−1.

    The formula Am=QΛmQT requires Q to be orthogonal, so that Q−1=QT; that is available exactly when the matrix is symmetric, by the Spectral Theorem. M is not symmetric, its eigenvectors are not orthogonal (⟨1,0⟩⋅⟨1,1⟩=1), and PTP=(11​12​)=I. Replacing P−1 by PT 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 25=32 and 35=243, not 275 and 243.

    Repair: P−1=(10​−11​), so

    M5=PD5P−1=(320​243243​)(10​−11​)=(320​211243​).

    Sanity check by squaring: M2=(40​59​), M4=(160​6581​), M5=M4M=(320​16+195243​)=(320​211243​).

  7. 7.Sketch

    Consider the curve 8x2−4xy+5y2=36.

    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.

    1. (a)Write down the matrix of the form, find its eigenvalues, and classify the curve, naming the result that licenses the classification.
    2. (b)Find unit eigenvectors, write the equation in principal-axis coordinates y1​,y2​, and give the exact lengths and directions of the semi-axes. Check that tan2θ=a−c2b​ agrees with the direction you found.
    3. (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 a=8, c=5 and the cross coefficient −4 halved to b=−2,

    A=(8−2​−25​),trA=13,detA=40−4=36,

    so λ2−13λ+36=(λ−9)(λ−4) and the eigenvalues are 9 and 4. Both positive, and the right-hand side 36 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: ac−b2=detA=36>0.

    (b) Principal axes. For λ=9: (8−9)x−2y=0 gives x=−2y, so q1​=5​1​⟨2,−1⟩. For λ=4: 4x−2y=0 gives y=2x, so q2​=5​1​⟨1,2⟩. (Orthogonal, as the lemma requires: 2−2=0.)

    With x=Qy, Q=[q1​ q2​], the principal axes theorem turns the equation into

    9y12​+4y22​=36,i.e.4y12​​+9y22​​=1.

    The semi-axis along q1​ has length 36/9​=2; the semi-axis along q2​ has length 36/4​=3. So the major axis (length 3) points along ⟨1,2⟩, the eigenvector of the smaller eigenvalue — a large eigenvalue means a short axis, because that direction climbs to the level 36 fastest.

    Angle check: tan2θ=a−c2b​=3−4​. The direction ⟨2,−1⟩ has tanθ=−21​, and the double-angle formula gives tan2θ=1−41​2(−21​)​=−34​. The formula and the eigenvector agree: the minor axis sits about 26.6∘ below the x-axis, the major axis about 63.4∘ above it.

    (c) Vertices, intercepts, sketch. The vertices are the ends of the semi-axes:

    ±2q1​=±⟨5​4​,−5​2​⟩≈±⟨1.79,−0.89⟩,±3q2​=±⟨5​3​,5​6​⟩≈±⟨1.34,2.68⟩.

    Check one of each on the original equation: at ⟨5​4​,−5​2​⟩, 8⋅516​+4⋅58​+5⋅54​=5128+32+20​=36; at ⟨5​3​,5​6​⟩, 8⋅59​−4⋅518​+5⋅536​=572−72+180​=36.

    Intercepts: on y=0, 8x2=36 gives x=±2​3​=±232​​≈±2.12; on x=0, 5y2=36 gives y=±5​6​≈±2.68.

    The sketch: draw the dashed line through the origin with slope 2 (the major axis) and the dashed line with slope −21​ (the minor axis), perpendicular to each other. Mark the two major vertices at distance 3 from the origin along the first line and the two minor vertices at distance 2 along the second, and draw the ellipse through all four, tangent to the perpendicular direction at each. Mark the intercepts (±2.12,0) and (0,±2.68) 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 ∣x∣=5​≈2.24 and ∣y∣=22​≈2.83, 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 −4xy is negative where x and y 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 36. In eigenvalue language, the smaller eigenvalue 4 belongs to ⟨1,2⟩, which points into quadrant I, and the semi-axis there is the longer one, 36/4​=3.

  8. 8.Computation

    Let Q(x,y,z)=−x2−y2−z2−4xy−4xz−4yz, and let A be its matrix.

    1. (a)Write down A and find its eigenvalues without expanding a 3×3 determinant, by expressing A in terms of I and the all-ones matrix J. Check with the trace.
    2. (b)Find the maximum and the minimum of Q on the unit sphere x2+y2+z2=1, and describe the complete set of points at which each is attained. Then evaluate the Rayleigh quotient at ⟨1,2,3⟩ and confirm that it lies between the two.
    3. (c)The maximum of ∥Ax∥ over the unit sphere is a different number from the maximum of xTAx. Find it, say where it is attained, and explain why it is not 1.

    Solution

    (a) Spot the structure. Halving each cross coefficient −4 to −2,

    A=​−1−2−2​−2−1−2​−2−2−1​​=I−2J,J=​111​111​111​​.

    J has rank 1, so 0 is an eigenvalue with a two-dimensional eigenspace, the plane x+y+z=0; and every row of J sums to 3, so J⟨1,1,1⟩=3⟨1,1,1⟩. Since A=I−2J has the same eigenvectors with eigenvalues 1−2μ, the eigenvalues of A are 1−6=−5 on ⟨1,1,1⟩ and 1−0=1 (twice) on the plane x+y+z=0. Ordered: λ1​=λ2​=1, λ3​=−5. Check: trA=−3=1+1−5.

    (b) Extreme values are eigenvalues. By the Rayleigh theorem, the maximum of Q on the unit sphere is λ1​=1 and the minimum is λ3​=−5.

    Where attained: the minimum at the unit eigenvectors for −5, namely ±3​1​⟨1,1,1⟩. Check: Q=−3⋅31​−4⋅3⋅31​=−1−4=−5. The maximum is attained at every unit vector in the eigenspace for 1 — the whole great circle x+y+z=0, x2+y2+z2=1 — since for such x, xTAx=xT(1⋅x)=1. Nowhere else: in principal coordinates Q=y12​+y22​−5y32​ with ∑yk2​=1, and this equals 1 only when y3​=0. Spot check: at 2​1​⟨1,0,−1⟩, Q=−21​−21​−4⋅(−21​)=1.

    Rayleigh quotient at x=⟨1,2,3⟩: xTAx=−(1+4+9)−4(2+3+6)=−14−44=−58 and xTx=14, so

    R(x)=−1458​=−729​≈−4.14,

    which does lie in [−5,1], as the bound λ3​∥x∥2≤xTAx≤λ1​∥x∥2 requires.

    (c) Lengths see ∣λ∣, forms see λ. ∥Ax∥2=(Ax)T(Ax)=xTATAx=xTA2x, and A2 is symmetric with the same eigenvectors as A and eigenvalues λk2​: 25,1,1. Applying the Rayleigh theorem to A2, the maximum of ∥Ax∥2 on the unit sphere is 25, so

    ∥x∥=1max​∥Ax∥=5,

    attained at ±3​1​⟨1,1,1⟩. Directly: A⟨1,1,1⟩=⟨−5,−5,−5⟩, which has length 53​, and dividing by ∥⟨1,1,1⟩∥=3​ gives 5.

    It is not 1 because the length of Ax does not care about the sign of the stretch: the direction ⟨1,1,1⟩ is scaled by −5, which makes the form as negative as possible but makes the image as long as possible. The maximum of the form is λmax​=1; the maximum of ∥Ax∥ is maxk​∣λk​∣=5, the spectral norm. (For the same reason the minimum of ∥Ax∥ on the sphere is mink​∣λk​∣=1, not −5.)

  9. 9.Computation

    Let Ak​=​2k0​k2k​0k2​​, where k is a real parameter.

    1. (a)Using Sylvester's criterion, find every k for which Ak​ is positive definite.
    2. (b)Show that Ak​ is never negative definite, and prove that it is indefinite for every k outside the range found in (a), endpoints excluded. A sign argument with the trace and the determinant is enough.
    3. (c)At the endpoint k=2​, write xTAk​x as a sum of two squares, deduce that A2​​ 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. detA1​=2>0 for every k. detA2​=4−k2. Expanding detA3​ along the first row,

    detAk​=2(4−k2)−k(2k−0)+0=8−4k2=4(2−k2).

    Sylvester's criterion asks for all three to be positive: 4−k2>0 and 2−k2>0. The second implies the first, so Ak​ is positive definite exactly when k2<2, that is

    −2​<k<2​.

    (b) Never negative definite; indefinite outside. A negative definite matrix has every diagonal entry negative, since aii​=eiT​Aei​. Here a11​=2>0 for every k, so Ak​ is never negative definite.

    Now let k2>2. Then detAk​=4(2−k2)<0. 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 trAk​=6>0. So exactly one eigenvalue is negative and at least one is positive, and Ak​ is indefinite: the form takes both signs.

    (For the record the eigenvalues are 2 and 2±2​k, with eigenvectors ⟨1,0,−1⟩ and ⟨1,±2​,1⟩, which confirms everything above — but the sign argument needed none of that.)

    (c) The endpoint. At k=2​,

    xTAx=2x2+22​xy+2y2+22​yz+2z2=(2​x+y)2+(y+2​z)2,

    as expanding the right-hand side confirms: 2x2+22​xy+y2+y2+22​yz+2z2. A sum of squares is never negative, so A2​​ is positive semidefinite. It is not positive definite because the sum vanishes at a nonzero vector: both squares are zero when y=−2​x and y=−2​z, for instance at

    v=⟨1,−2​,1⟩.

    Why v must be an eigenvector: by the Rayleigh theorem the minimum of the form over unit vectors is λmin​, which is ≥0 here since the form is never negative; the unit vector v/∥v∥ gives the value 0, so λmin​=0 and v attains the minimum. In principal coordinates the form is ∑λk​yk2​, and it can equal λmin​ only if all the weight sits on eigenvalues equal to λmin​ — so v lies in the eigenspace for λ=0. Direct check:

    A2​​v=⟨2−2, 2​−22​+2​, −2+2⟩=0.

    This is consistent with detA2​​=0: at the threshold one eigenvalue is exactly zero, which is what Sylvester's criterion failing by equality, rather than by sign, means.

  10. 10.Computation

    Let A=​93−6​350​−6014​​ and b=⟨9,13,8⟩.

    1. (a)Compute the Cholesky factor L of A, column by column, and verify LLT=A. What does the success of the algorithm tell you about A, and by which theorem?
    2. (b)Solve Ax=b using only L: two triangular solves and no elimination on A itself.
    3. (c)Read off the pivots of A and detA from L. Then show, using the trace, that the pivots are not the eigenvalues of A, and say which single quantity the pivots and the eigenvalues do share.
    4. (d)Replace the entry 14 by a parameter t. For which t does the Cholesky algorithm succeed? Interpret the threshold value of t in terms of definiteness, and identify the quantity under the final square root as a Schur complement.

    Solution

    (a) Column by column. Column 1: ℓ11​=9​=3, then ℓ21​=3/3=1 and ℓ31​=−6/3=−2.

    Column 2: ℓ22​=a22​−ℓ212​​=5−1​=2, then

    ℓ32​=ℓ22​a32​−ℓ31​ℓ21​​=20−(−2)(1)​=1.

    Column 3: ℓ33​=a33​−ℓ312​−ℓ322​​=14−4−1​=3.

    L=​31−2​021​003​​,LLT=​93−6​31+4−2+2​−6−2+24+1+9​​=​93−6​350​−6014​​=A.

    Every quantity under a square root was positive, so the algorithm produced a lower-triangular L with positive diagonal. By the Cholesky theorem — a symmetric matrix is positive definite if and only if it factors as LLT with such an L — A is positive definite.

    (b) Two triangular solves. Since A=LLT, solve Ly=b forwards and then LTx=y backwards.

    Forward: 3y1​=9 gives y1​=3; y1​+2y2​=13 gives y2​=5; −2y1​+y2​+3y3​=8 gives −6+5+3y3​=8, so y3​=3. Thus y=⟨3,5,3⟩.

    Backward, with LT=​300​120​−213​​: 3x3​=3 gives x3​=1; 2x2​+x3​=5 gives x2​=2; 3x1​+x2​−2x3​=3 gives 3x1​=3, so x1​=1. Hence

    x=⟨1,2,1⟩.

    Check against A directly: Ax=⟨9+6−6, 3+10+0, −6+0+14⟩=⟨9,13,8⟩=b.

    (c) Pivots and determinant. The Cholesky diagonal holds the square roots of the pivots, so the pivots are ℓkk2​=9,4,9, and

    detA=(detL)2=(3⋅2⋅3)2=182=324,

    equivalently the product of the pivots, 9⋅4⋅9=324. (Direct check: detA=9(70−0)−3(42−0)+(−6)(0+30)=630−126−180=324.) The leading minors 9, 45−9=36, 324 confirm the pivot ratios 9, 36/9=4, 324/36=9.

    The pivots are not the eigenvalues: the eigenvalues sum to trA=9+5+14=28, whereas the pivots sum to 22. What the two triples share is their product: both multiply to detA=324. (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 1 and 2 do not involve a33​, so ℓ11​,ℓ21​,ℓ31​,ℓ22​,ℓ32​ are unchanged, and the last step becomes ℓ33​=t−4−1​=t−5​. The algorithm succeeds exactly when t>5.

    Interpretation: detAt​=9⋅4⋅(t−5)=36(t−5), while the first two leading minors stay 9 and 36. For t>5 all three are positive and At​ is positive definite; at t=5 the matrix is singular with the form still ≥0 — positive semidefinite, and Cholesky fails by hitting 0​ (a zero on the diagonal is not allowed); for t<5 the determinant is negative, so an odd number of eigenvalues are negative, while a11​=9>0 rules out all three being negative; hence At​ is indefinite.

    Schur complement: the number t−5 is a33​−vTA2−1​v, where A2​=(93​35​) is the leading 2×2 block and v=⟨−6,0⟩ is the rest of the third column. Indeed A2−1​=361​(5−3​−39​) and vTA2−1​v=361​⋅5⋅36=5. The final pivot is always the Schur complement of the block above it, and positive definiteness of At​ is exactly positive definiteness of A2​ together with positivity of that complement.

  11. 11.Proof

    Throughout, A is a real symmetric n×n matrix with eigenvalues λ1​≥λ2​≥⋯≥λn​ and an orthonormal eigenbasis q1​,…,qn​. You may quote the Spectral Theorem and the Rayleigh bounds λn​∥x∥2≤xTAx≤λ1​∥x∥2.

    1. (a)Prove that every diagonal entry satisfies λn​≤aii​≤λ1​.
    2. (b)Prove that if a unit vector x attains the maximum, xTAx=λ1​, then x is an eigenvector: Ax=λ1​x. (Write x=Qy and examine exactly when a weighted average of the eigenvalues can equal the largest of them.)
    3. (c)Deduce that if a11​=λ1​, then every other entry of the first row and of the first column of A is zero.
    4. (d)Now let B be a positive semidefinite matrix with some diagonal entry bii​=0. Prove that the entire i-th row and i-th column of B are zero.

    Solution

    (a) Test the form on a standard basis vector. aii​=eiT​Aei​, because Aei​ is the i-th column of A and dotting with ei​ picks out its i-th entry. Since ∥ei​∥=1, the Rayleigh bounds give λn​≤eiT​Aei​≤λ1​. ■

    (b) When does an average equal the maximum? Let Q=[q1​⋯qn​], orthogonal by the Spectral Theorem, and write x=Qy, so y=QTx has ∥y∥=∥x∥=1 and xTAx=yTΛy=∑k​λk​yk2​. The hypothesis xTAx=λ1​ therefore reads

    0=λ1​−k∑​λk​yk2​=λ1​k∑​yk2​−k∑​λk​yk2​=k∑​(λ1​−λk​)yk2​,

    using ∑k​yk2​=1. Every term is a product of two nonnegative numbers, so a sum of zero forces every term to be zero: (λ1​−λk​)yk2​=0 for each k. Hence yk​=0 whenever λk​<λ1​. Let S={k:λk​=λ1​}; then x=∑k∈S​yk​qk​, and

    Ax=k∈S∑​yk​Aqk​=k∈S∑​yk​λ1​qk​=λ1​x.■

    (The same argument with λn​ in place of λ1​ shows that a unit vector attaining the minimum is an eigenvector for λn​; alternatively, apply the result to −A, whose largest eigenvalue is −λn​.)

    (c) The first basis vector attains the maximum. If a11​=λ1​ then e1T​Ae1​=λ1​ with ∥e1​∥=1, so by (b) Ae1​=λ1​e1​. But Ae1​ is the first column of A; so the first column is ⟨λ1​,0,…,0⟩, i.e. ai1​=0 for all i≥2. By symmetry a1i​=ai1​=0, so the first row is zero off the diagonal too. ■

    (d) A zero on the diagonal of a semidefinite matrix. Positive semidefinite means xTBx≥0 for all x, so in particular the minimum on the unit sphere, λn​(B), is ≥0. By (a), λn​(B)≤bii​=0. Hence λn​(B)=0, and ei​ attains the minimum of the form.

    Apply (b) to −B: its largest eigenvalue is −λn​(B)=0, and eiT​(−B)ei​=−bii​=0 equals it, so (−B)ei​=0⋅ei​, that is Bei​=0. The i-th column of B is therefore zero, and by symmetry so is the i-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. 12.Proof

    Let A be a positive definite n×n matrix, let b∈Rn, and define f(x)=21​xTAx−bTx. Put x∗=A−1b.

    1. (a)Prove the identity f(x)−f(x∗)=21​(x−x∗)TA(x−x∗) by expanding the right-hand side, and say exactly where the symmetry of A is used.
    2. (b)Deduce that x∗ is the unique global minimiser of f and that the minimum value is −21​bTA−1b. Explain what this adds to what the second derivative test would tell you.
    3. (c)Check with A=(2−1​−12​) and b=⟨1,4⟩: verify that A is positive definite, find x∗, evaluate f(x∗) directly from the definition of f, and compare with (b).
    4. (d)Let X be an m×n matrix with linearly independent columns and y∈Rm. Show that g(β)=∥y−Xβ∥2 equals 2f(β)+const for suitable A and b, verify that this A 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,

    21​(x−x∗)TA(x−x∗)=21​xTAx−21​xTAx∗−21​(x∗)TAx+21​(x∗)TAx∗.

    The two middle terms are equal: xTAx∗ is a 1×1 matrix, so it equals its transpose (x∗)TATx, and this is where symmetry is used — AT=A turns that into (x∗)TAx. So the middle terms combine to −xTAx∗. Now Ax∗=b, so xTAx∗=xTb=bTx and (x∗)TAx∗=(x∗)Tb=bTx∗. The right-hand side is therefore

    21​xTAx−bTx+21​bTx∗=f(x)+21​bTx∗.

    On the other side, f(x∗)=21​(x∗)TAx∗−bTx∗=21​bTx∗−bTx∗=−21​bTx∗, so f(x)−f(x∗)=f(x)+21​bTx∗, which is exactly the expression just found. ■

    (Positive definiteness was also used silently in writing A−1 at all: if Ax=0 then xTAx=0, which forces x=0, so A is invertible — equivalently, none of its eigenvalues is zero.)

    (b) Positive definiteness finishes it. Put h=x−x∗. By (a), f(x)−f(x∗)=21​hTAh, which is >0 for every h=0 by the definition of positive definiteness, and =0 only at h=0. So f(x)>f(x∗) for every x=x∗: x∗ is the unique global minimiser, and the minimum value is

    f(x∗)=−21​bTx∗=−21​bTA−1b.

    What this adds: the gradient of f is Ax−b and its Hessian is A, so the second derivative test says only that x∗ 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 hTAh≥λmin​∥h∥2 matters: f grows at least quadratically away from x∗ in every direction.)

    (c) A worked instance. Leading minors 2>0 and 4−1=3>0, so A is positive definite by Sylvester's criterion. A−1=31​(21​12​), so

    x∗=A−1b=31​⟨2+4, 1+8⟩=⟨2,3⟩.

    (Check: A⟨2,3⟩=⟨4−3, −2+6⟩=⟨1,4⟩=b.) Directly from the definition, with xTAx=2x12​−2x1​x2​+2x22​,

    f(2,3)=21​(8−12+18)−(2+12)=7−14=−7.

    Formula from (b): −21​bTx∗=−21​(1⋅2+4⋅3)=−7. They agree, and for instance f(0,0)=0>−7 and f(1,1)=21​(2−2+2)−5=−4>−7, as the theorem requires.

    (d) Least squares is this problem in disguise. Expand the squared norm:

    g(β)=(y−Xβ)T(y−Xβ)=yTy−2yTXβ+βTXTXβ,

    where the two cross terms yTXβ and βTXTy were combined because each is the transpose of the other and both are scalars. With A=XTX and b=XTy this is

    g(β)=2[21​βTAβ−bTβ]+∥y∥2=2f(β)+∥y∥2.

    A=XTX is symmetric, and for any β, βTXTXβ=∥Xβ∥2≥0, with equality only when Xβ=0. Independence of the columns enters exactly here: it says Xβ=0 only for β=0, so the form is strictly positive on nonzero vectors and A is positive definite (this is the BTB test for positive definiteness: BTB is positive definite exactly when B has independent columns, here with B=X).

    By (b), g — a positive constant times f plus a constant — has the unique global minimiser β∗=A−1b=(XTX)−1XTy, which is precisely the solution of the normal equations XTXβ=XTy. If the columns were dependent, XTX would be singular (only semidefinite), the identity in (a) could not even be written, and the minimiser would not be unique: adding any z with Xz=0 to a minimiser leaves the residual, and hence g, unchanged.

← Back to the question sheet

CalcPath·Free university mathematics

SubjectsProblem setsProgressFeedbackAbout