CalcPath
ProgressProblem setsFeedback
← Question sheet

Linear Algebra · Solutions

Inner Product Spaces

12 questions · about 108 minutes

Work this sheet on paper and show every step: an inner-product computation is checked by its route, not its final number, and the solutions are written so you can compare routes. Name every result you use (“by Cauchy–Schwarz”, “by the Pythagorean theorem”, “by the best-approximation theorem”) and, before you apply a formula that needs an orthogonal or orthonormal basis, say why the basis in your hands qualifies. No calculator is needed anywhere — every answer is an exact fraction, surd or multiple of π. 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

    For each candidate below, decide whether it is an inner product. If it is, verify all four axioms, treating positive definiteness with particular care. If it is not, exhibit a specific vector that breaks a named axiom.

    1. (a)On R2: ⟨x,y⟩=2x1​y1​+x1​y2​+x2​y1​+3x2​y2​.
    2. (b)On R2: ⟨x,y⟩=x1​y1​+2x1​y2​+2x2​y1​+x2​y2​.
    3. (c)On P1​ (polynomials of degree at most 1): ⟨p,q⟩=p(0)q(0)+p′(0)q′(0). Then explain what goes wrong if the same formula is used on P2​, and propose the smallest repair.

    Solution

    (a) An inner product. Symmetry: swapping x and y turns x1​y2​+x2​y1​ into y1​x2​+y2​x1​, the same expression, and the two square terms are visibly symmetric. Additivity and homogeneity in the first slot hold because every term is a product of exactly one coordinate of x with one coordinate of y, and each such product is linear in x. For positive definiteness complete the square:

    ⟨x,x⟩=2x12​+2x1​x2​+3x22​=2(x1​+21​x2​)2+25​x22​.

    A sum of two nonnegative terms, so ⟨x,x⟩≥0; and it is 0 only if x2​=0 and x1​+21​x2​=0, i.e. only if x=0. All four axioms hold.

    (b) Not an inner product. Symmetry and bilinearity hold for the same reasons as in (a), so the only candidate for failure is positive definiteness, and it does fail: with x=(1,−1),

    ⟨x,x⟩=1−2−2+1=−2<0.

    A nonzero vector with negative "squared length" violates axiom 4. (Note ⟨(1,1),(1,1)⟩=6>0, so the form is neither positive nor negative — it is indefinite, and no rescaling rescues it.)

    (c) An inner product on P1​. Evaluation at 0 and differentiation are both linear, so p↦p(0) and p↦p′(0) are linear maps, and ⟨p,q⟩ is a sum of products of one linear functional of p with one of q: bilinear and symmetric. For positivity write p(t)=a+bt; then p(0)=a and p′(0)=b, so

    ⟨p,p⟩=a2+b2≥0,

    with equality only when a=b=0, i.e. p=0. Axiom 4 holds.

    On P2​ the same two numbers no longer determine the polynomial: p(t)=t2 has p(0)=0 and p′(0)=0, so ⟨p,p⟩=0 although p=0. Positive definiteness collapses and we have only a semi-inner product. The smallest repair is to add one more independent functional, for instance ⟨p,q⟩=p(0)q(0)+p′(0)q′(0)+p′′(0)q′′(0): for p=a+bt+ct2 this gives a2+b2+4c2, which vanishes only for p=0. The moral matches the sampling example: a formula is an inner product exactly when the quantities it reads off are enough to pin the vector down.

  2. 2.Computation

    Work in C[0,1] with ⟨f,g⟩=∫01​f(t)g(t)dt, and let f(t)=t2 and g(t)=t.

    1. (a)Compute ∥f∥, ∥g∥ and ⟨f,g⟩, and confirm that the three numbers are consistent with Cauchy–Schwarz.
    2. (b)Compute the distance d(f,g) directly from the definition, and then again from the expansion ∥f−g∥2=∥f∥2−2⟨f,g⟩+∥g∥2. The two routes must agree.
    3. (c)Normalise h=f−g. Then say, without integrating again, what the normalisation of −4h is, and which property of the norm decides it.

    Solution

    (a) Three integrals.

    ∥f∥2=∫01​t4dt=51​,∥g∥2=∫01​t2dt=31​,⟨f,g⟩=∫01​t3dt=41​.

    So ∥f∥=1/5​ and ∥g∥=1/3​. Cauchy–Schwarz demands ∣⟨f,g⟩∣≤∥f∥∥g∥, i.e. 41​≤15​1​. Squaring, 161​≤151​, which is true — and only just, which is reasonable because t and t2 are both increasing on [0,1] and "agree" strongly.

    (b) Distance two ways. Directly, (f−g)(t)=t2−t, so

    d(f,g)2=∫01​(t2−t)2dt=∫01​(t4−2t3+t2)dt=51​−21​+31​=306−15+10​=301​.

    By the expansion, ∥f−g∥2=51​−2⋅41​+31​=51​−21​+31​=301​ as well. Hence d(f,g)=1/30​. Sanity check: ∣t2−t∣≤41​ on [0,1], so the distance must be below 41​, and 1/30​≈0.18 is.

    (c) Normalising. From (b), ∥h∥=1/30​, so

    ∥h∥h​=30​(t2−t).

    For −4h: the norm is homogeneous, ∥cv∥=∣c∣∥v∥, so ∥−4h∥=4∥h∥ and

    ∥−4h∥−4h​=4∥h∥−4h​=−∥h∥h​=−30​(t2−t).

    The absolute value in the homogeneity rule is what makes the sign survive: normalising a vector keeps its direction and forgets only its length, so scaling by a negative number flips the unit vector.

  3. 3.Proof

    Each part is an application of the Cauchy–Schwarz inequality or of one of its corollaries. In every case say which inner product space you are working in and which two vectors you are applying the inequality to.

    1. (a)Let a,b,c be real numbers with a+b+c=1. Prove that a2+b2+c2≥31​, and determine exactly when equality holds.
    2. (b)Suppose ∥u∥=5 and ∥v∥=3 in some inner product space. Find the largest and smallest values that ∥u−v∥ can take, prove your bounds, and give a choice of v (in terms of u) attaining each.
    3. (c)Let f be continuous and strictly positive on [0,1]. Prove that (∫01​f(t)dt)(∫01​f(t)dt​)≥1, and identify the functions for which equality holds.

    Solution

    (a) Work in R3 with the dot product and take u=(a,b,c), v=(1,1,1). Then ⟨u,v⟩=a+b+c=1, ∥u∥2=a2+b2+c2 and ∥v∥=3​. Cauchy–Schwarz gives

    1=∣⟨u,v⟩∣≤∥u∥∥v∥=3​a2+b2+c2​,

    and squaring, a2+b2+c2≥31​. Equality in Cauchy–Schwarz holds exactly when u and v are linearly dependent, i.e. (a,b,c)=λ(1,1,1); the constraint a+b+c=1 then forces λ=31​. So equality holds precisely for a=b=c=31​, and indeed 3⋅91​=31​.

    (b) Upper bound: by the triangle inequality applied to u and −v,

    ∥u−v∥≤∥u∥+∥−v∥=5+3=8.

    Lower bound: by the reverse triangle inequality, ∥u−v∥≥​∥u∥−∥v∥​=2. Both are attained. Take v=53​u: then ∥v∥=53​⋅5=3 and ∥u−v∥=∥52​u∥=2. Take v=−53​u: again ∥v∥=3, and ∥u−v∥=∥58​u∥=8. So the range of possible values is exactly [2,8] (every value between is reached by rotating v continuously from one position to the other, but the question only asks for the extremes).

    (c) Work in C[0,1] with ⟨g,h⟩=∫01​gh. Because f>0 and continuous, both g=f​ and h=1/f​ are continuous, so they are legitimate vectors. Their inner product is

    ⟨g,h⟩=∫01​f(t)​⋅f(t)​1​dt=∫01​1dt=1,

    while ∥g∥2=∫01​f and ∥h∥2=∫01​1/f. Cauchy–Schwarz, ⟨g,h⟩2≤∥g∥2∥h∥2, reads

    1≤(∫01​f)(∫01​f1​),

    which is the claim. Equality holds iff g and h are linearly dependent, i.e. f​=λ/f​ for a constant λ, i.e. f≡λ is constant. Sanity check with f(t)=1+t: the left factor is 23​ and the right is ln2≈0.69, product ≈1.04≥1, and strictly greater because f is not constant.

  4. 4.Computation

    Three short exercises on angle, orthogonality and the parallelogram law.

    1. (a)In M2​(R) with the trace inner product ⟨A,B⟩=tr(ATB), find the angle between A=(11​11​) and the identity matrix I.
    2. (b)In C[0,1] with ⟨f,g⟩=∫01​fg, find the constant c for which u(t)=1+ct is orthogonal to v(t)=t. Then verify the Pythagorean theorem for this u and v by computing all three of ∥u∥2, ∥v∥2 and ∥u+v∥2.
    3. (c)On R2, the function ∥x∥4​=(x14​+x24​)1/4 is a norm (you may assume this). Show that it is not induced by any inner product, and name the theorem that licenses the conclusion.

    Solution

    (a) The trace inner product is the entrywise dot product, so ⟨A,I⟩=1⋅1+1⋅0+1⋅0+1⋅1=2. The norms are ∥A∥=1+1+1+1​=2 and ∥I∥=1+0+0+1​=2​. Therefore

    cosθ=∥A∥∥I∥⟨A,I⟩​=22​2​=2​1​,θ=4π​.

    (Geometrically: as vectors in R4, A=(1,1,1,1) and I=(1,0,0,1), and I is "half of" A in two of the four coordinates.)

    (b) Orthogonality requires

    ⟨1+ct,t⟩=∫01​(t+ct2)dt=21​+3c​=0,so c=−23​.

    With u=1−23​t and v=t:

    ∥u∥2=∫01​(1−3t+49​t2)dt=1−23​+43​=41​,∥v∥2=∫01​t2dt=31​,

    and u+v=1−21​t, so

    ∥u+v∥2=∫01​(1−t+41​t2)dt=1−21​+121​=127​.

    Since 41​+31​=123​+124​=127​, the Pythagorean theorem ∥u+v∥2=∥u∥2+∥v∥2 is confirmed — as it must be, since the cross term 2⟨u,v⟩ was arranged to vanish.

    (c) Every norm induced by an inner product satisfies the parallelogram law ∥u+v∥2+∥u−v∥2=2∥u∥2+2∥v∥2, so a norm that violates it cannot be induced by one. Test u=(1,0), v=(0,1). Then ∥u∥4​=∥v∥4​=1, while u+v=(1,1) and u−v=(1,−1) both have ∥⋅∥4​=(1+1)1/4=21/4, whose square is 2​. So

    ∥u+v∥42​+∥u−v∥42​=22​≈2.83,2∥u∥42​+2∥v∥42​=4.

    The two sides differ, so the parallelogram law fails and ∥⋅∥4​ is not induced by any inner product. Only the 2-norm among the p-norms passes this test, which is why Euclidean geometry is special.

  5. 5.Sketch

    Equip R2 with the weighted inner product ⟨x,y⟩w​=x1​y1​+4x2​y2​, and write ∥⋅∥w​ for the norm it induces. Draw everything on one pair of axes, labelled, and justify each feature with an equation or an inner-product computation. A picture without the computations beside it earns nothing.

    1. (a)Sketch the unit circle {x:∥x∥w​=1} of this inner product, with the ordinary Euclidean unit circle drawn dashed for comparison.
    2. (b)Show that u=(2,1) and v=(2,−1) are orthogonal for ⟨⋅,⋅⟩w​, draw them, and compute the Euclidean angle between them to make clear that they are not perpendicular in the ordinary sense.
    3. (c)Draw the line of all vectors w-orthogonal to (1,1) and, for contrast, the line of all vectors Euclidean-orthogonal to (1,1).
    4. (d)Explain the whole picture at once: find a linear map Φ:R2→R2 with ⟨x,y⟩w​=Φ(x)⋅Φ(y) for all x,y, and say what it does to each of the features drawn in (a)–(c).

    Solution

    (a) The unit "circle" is an ellipse. By definition ∥x∥w2​=⟨x,x⟩w​=x12​+4x22​, so the unit circle is the curve

    x12​+4x22​=1,

    an ellipse centred at the origin crossing the horizontal axis at (±1,0) and the vertical axis at (0,±21​). It lies inside the Euclidean unit circle except at (±1,0), where the two curves touch: a vertical displacement is charged four times as heavily as a horizontal one, so vertical unit vectors are shorter on the page. Draw the ellipse solid and the Euclidean circle dashed.

    (b) A pair that is orthogonal but does not look it.

    ⟨u,v⟩w​=2⋅2+4⋅(1)(−1)=4−4=0,

    so u⊥w​v. Their Euclidean dot product is 2⋅2+1⋅(−1)=3=0; with ∣u∣=∣v∣=5​ the Euclidean angle satisfies cosθ=53​, about 53∘. Draw both arrows from the origin — u rising to the right, v falling to the right, symmetric about the horizontal axis — and label the angle between them arccos53​. Their w-lengths are ∥u∥w​=∥v∥w​=4+4​=22​.

    (c) Two different perpendicular lines. The vector x is w-orthogonal to (1,1) iff x1​+4x2​=0, i.e. iff x2​=−41​x1​: a line through the origin of slope −41​. Euclidean orthogonality to (1,1) is x1​+x2​=0, the line of slope −1. Draw the arrow (1,1) and both lines, labelled by their equations. Notice the w-perpendicular is much flatter: to cancel the heavily-weighted second coordinate you need only a quarter as much of it.

    (d) The stretch that explains everything. Take Φ(x1​,x2​)=(x1​,2x2​). Then

    Φ(x)⋅Φ(y)=x1​y1​+(2x2​)(2y2​)=x1​y1​+4x2​y2​=⟨x,y⟩w​.

    So Φ carries the weighted inner product to the dot product: every w-length, w-angle and w-orthogonality is the Euclidean one after stretching the plane vertically by a factor 2. Equivalently, the sketch is the ordinary Euclidean picture squashed vertically by 21​. Check each feature: Φ sends the ellipse x12​+4x22​=1 onto the unit circle; it sends u=(2,1) and v=(2,−1) to (2,2) and (2,−2), which are visibly perpendicular; and it sends (1,1) to (1,2), whose Euclidean perpendicular direction is (2,−1), which pulls back under Φ−1 to (2,−21​) — slope −41​, exactly the line drawn in (c). Every weighted inner product with positive weights is a Euclidean inner product viewed through such a stretch; that is why none of the theorems of the chapter can tell the two apart.

  6. 6.Computation

    Work in P2​ with ⟨p,q⟩=∫01​p(t)q(t)dt. Keep every coefficient as an exact fraction, and check each new vector against an earlier one before moving on.

    1. (a)Apply Gram–Schmidt to 1,t,t2 (in that order) to produce an orthogonal basis w1​,w2​,w3​, and compute ∥w3​∥2.
    2. (b)Normalise to obtain an orthonormal basis e1​,e2​,e3​ of P2​.
    3. (c)Without any further integration, write down the orthogonal projection of t2 onto P1​ and the distance from t2 to P1​. Explain which feature of the Gram–Schmidt construction makes both immediate.

    Solution

    (a) Gram–Schmidt. Start with w1​=1, and ∥w1​∥2=∫01​1dt=1.

    For w2​: ⟨t,w1​⟩=∫01​tdt=21​, so

    w2​=t−11/2​⋅1=t−21​,∥w2​∥2=∫01​(t−21​)2dt=[3(t−21​)3​]01​=241​+241​=121​.

    For w3​ we need two inner products: ⟨t2,w1​⟩=∫01​t2dt=31​ and

    ⟨t2,w2​⟩=∫01​(t3−21​t2)dt=41​−61​=121​.

    Hence

    w3​=t2−11/3​⋅1−1/121/12​(t−21​)=t2−31​−t+21​=t2−t+61​.

    Check against both earlier vectors: ⟨w3​,1⟩=31​−21​+61​=0 and ⟨w3​,t⟩=41​−31​+121​=123−4+1​=0; orthogonality to t and to 1 gives orthogonality to w2​=t−21​. Good.

    For the norm, the cheapest route uses orthogonality: since w3​=t2−(something in P1​) and w3​⊥P1​,

    ∥w3​∥2=⟨w3​,w3​⟩=⟨w3​,t2⟩=∫01​(t4−t3+61​t2)dt=51​−41​+181​=18036−45+10​=1801​.

    (Expanding (t2−t+61​)2 and integrating term by term gives 51​−21​+94​−61​+361​=1801​ as well.)

    (b) Normalising. e1​=w1​/1=1. Next ∥w2​∥=1/12​=1/(23​), so e2​=23​(t−21​)=3​(2t−1). Finally ∥w3​∥=1/180​=1/(65​), so

    e3​=65​(t2−t+61​)=5​(6t2−6t+1).

    Check: ∫01​5(6t2−6t+1)2dt=5⋅36⋅1801​=1. Three orthonormal vectors in the 3-dimensional space P2​ form an orthonormal basis.

    (c) Projection and distance for free. Gram–Schmidt subtracts from t2 precisely its projection onto span{w1​,w2​}, and that span equals span{1,t}=P1​ by the span property of the algorithm. So the subtracted part is the projection:

    projP1​​(t2)=t2−w3​=t−61​,

    and the leftover w3​ is the residual, which is orthogonal to P1​. By the best-approximation theorem the distance from t2 to P1​ is the length of that residual:

    d(t2,P1​)=∥w3​∥=65​1​=305​​≈0.075.

    Sanity check: t−61​ is the line that best fits the parabola t2 on [0,1] in mean square. It passes through (61​,0) and (1,65​), undershooting at both ends and overshooting in the middle, which is what a balanced fit to a convex curve should do.

  7. 7.Computation

    Work in C[−1,1] with ⟨p,q⟩=∫−11​p(t)q(t)dt. You may take as known that Gram–Schmidt applied to 1,t,t2 produces w0​=1, w1​=t, w2​=t2−31​, with ∥w1​∥2=32​.

    1. (a)Carry out the next Gram–Schmidt step to find w3​, using parity to avoid every integral that must vanish. Rescale so that the result takes the value 1 at t=1; this is the Legendre polynomial P3​.
    2. (b)Find all the roots of P3​ and confirm that they behave as the theorem on roots of orthogonal polynomials predicts. State carefully why that theorem applies to P3​ — in particular why P3​ is orthogonal to every polynomial of degree at most 2, not merely to 1, t and t2−31​.
    3. (c)The two-point Gauss rule ∫−11​f(t)dt≈f(−3​1​)+f(3​1​) uses the roots of P2​ as its nodes and is exact for every polynomial of degree at most 3. Test it on f(t)=t2 and on f(t)=t4, and report the first degree at which it fails.

    Solution

    (a) The step for t3. Gram–Schmidt says

    w3​=t3−∥w0​∥2⟨t3,w0​⟩​w0​−∥w1​∥2⟨t3,w1​⟩​w1​−∥w2​∥2⟨t3,w2​⟩​w2​.

    On the symmetric interval the integral of an odd function is zero. The products t3⋅1=t3 and t3(t2−31​)=t5−31​t3 are odd, so ⟨t3,w0​⟩=⟨t3,w2​⟩=0 without computation. Only the middle term survives:

    ⟨t3,t⟩=∫−11​t4dt=52​,w3​=t3−2/32/5​t=t3−53​t.

    Check: ⟨w3​,t⟩=52​−53​⋅32​=52​−52​=0. Since w3​(1)=1−53​=52​, rescale by 25​:

    P3​(t)=25​(t3−53​t)=25t3−3t​.

    (b) Roots. Factor: P3​(t)=21​t(5t2−3), so the roots are

    t=0,t=±53​​=±515​​≈±0.775.

    Three distinct real roots, all strictly inside (−1,1) — exactly what the theorem promises for a degree-3 polynomial orthogonal to all polynomials of lower degree.

    Why the hypothesis holds: by construction w3​ is orthogonal to each of w0​,w1​,w2​, and by the span property of Gram–Schmidt, span{w0​,w1​,w2​}=span{1,t,t2}=P2​. A vector orthogonal to a spanning set of a subspace is orthogonal to the whole subspace (only the span matters), so w3​, and hence its multiple P3​, is orthogonal to every polynomial of degree at most 2. That is the full hypothesis of the theorem.

    (c) Testing the two-point rule. For f(t)=t2 the exact integral is ∫−11​t2dt=32​, and the rule gives (−3​1​)2+(3​1​)2=31​+31​=32​. Exact, as promised for degree 2≤3. (Degree 3 is exact too, trivially: any odd f integrates to 0 and the rule returns f(−a)+f(a)=0.)

    For f(t)=t4 the exact integral is 52​, but the rule gives 91​+91​=92​. Since 92​=52​, exactness first fails at degree 4, one beyond the guarantee. The pattern — n nodes at the roots of Pn​ give exactness up to degree 2n−1 — is what makes the roots of orthogonal polynomials the sample points of choice in numerical integration, and part (b) is the reason those roots are real, distinct and inside the interval, as sample points must be.

  8. 8.Proof

    Let U and W be subspaces of a finite-dimensional inner product space V. Recall that U+W={u+w:u∈U, w∈W}.

    1. (a)Prove that (U+W)⊥=U⊥∩W⊥. Which hypotheses, if any, does this part actually use?
    2. (b)Deduce that (U∩W)⊥=U⊥+W⊥. Name each theorem you invoke and say where finite-dimensionality enters.
    3. (c)In R3 with the dot product, let U=span{(1,1,1)} and W=span{(1,0,−1)}. Compute (U+W)⊥ and U⊥∩W⊥ separately, confirm they agree, and check the dimensions against the decomposition theorem.

    Solution

    (a) Two inclusions.

    ⊆. Let v∈(U+W)⊥, so ⟨v,x⟩=0 for every x∈U+W. Every u∈U is in U+W (write u=u+0, using 0∈W), so ⟨v,u⟩=0 for all u∈U: v∈U⊥. Symmetrically v∈W⊥. Hence v∈U⊥∩W⊥.

    ⊇. Let v∈U⊥∩W⊥ and let x∈U+W, say x=u+w. By additivity in the second slot,

    ⟨v,u+w⟩=⟨v,u⟩+⟨v,w⟩=0+0=0,

    so v∈(U+W)⊥.

    This part uses only that U and W are subspaces (so that 0∈W and U⊆U+W) and the bilinearity of the inner product. Finite-dimensionality is not used anywhere, and the argument is valid in any inner product space. ■

    (b) Apply (a) to the subspaces U⊥ and W⊥ (each is a subspace, since every orthogonal complement is):

    (U⊥+W⊥)⊥=(U⊥)⊥∩(W⊥)⊥=U∩W,

    where the last equality is the double-complement corollary (X⊥)⊥=X, valid because U and W are finite-dimensional. Now take orthogonal complements of both sides:

    ((U⊥+W⊥)⊥)⊥=(U∩W)⊥.

    The left side is U⊥+W⊥ by the double-complement corollary once more, applied to the finite-dimensional subspace U⊥+W⊥. Hence (U∩W)⊥=U⊥+W⊥. ■

    Finite-dimensionality enters exactly twice, both times through the double complement, which in turn rests on the orthogonal decomposition theorem V=X⊕X⊥. Part (a) needed neither.

    (c) A vector x lies in (U+W)⊥ iff it is orthogonal to a spanning set of U+W, i.e. to both (1,1,1) and (1,0,−1):

    x1​+x2​+x3​=0,x1​−x3​=0.

    From the second, x3​=x1​; substituting, x2​=−2x1​. So (U+W)⊥=span{(1,−2,1)}.

    Separately, U⊥ is the plane x1​+x2​+x3​=0 and W⊥ is the plane x1​−x3​=0; their intersection is the solution set of the same two equations, again span{(1,−2,1)}. The two computations agree, as (a) says they must. (Sanity check: (1,−2,1)⋅(1,1,1)=0 and (1,−2,1)⋅(1,0,−1)=0.)

    Dimensions: (1,1,1) and (1,0,−1) are independent, so dim(U+W)=2, and the decomposition theorem predicts dim(U+W)⊥=3−2=1. Correct. Note also dimU⊥+dimW⊥=2+2=4>3, which is fine: two planes through the origin in R3 always share a line, and that line is the answer.

  9. 9.Computation

    Work in C[−1,1] with ⟨f,g⟩=∫−11​f(t)g(t)dt, and let f(t)=∣t∣. The aim is the polynomial of degree at most 2 that best approximates f in the least-squares sense. Split every integral of ∣t∣ at 0, or use symmetry.

    1. (a)Verify that {1,t,t2−31​} is an orthogonal basis of P2​, record the three squared norms, and explain why the projection formula may not be applied to the basis {1,t,t2} instead.
    2. (b)Compute f^​=projP2​​f, giving the answer as a polynomial in t with exact coefficients.
    3. (c)Compute the minimum error ∥f−f^​∥ exactly, without integrating (f−f^​)2 directly. Then check that the residual f−f^​ is orthogonal to the constant function 1, and compare the error with that of the best constant approximation.

    Solution

    (a) The basis. Pairwise inner products: ⟨1,t⟩=∫−11​tdt=0 and ⟨t,t2−31​⟩=∫−11​(t3−31​t)dt=0, both because the integrand is odd; and

    ⟨1,t2−31​⟩=∫−11​t2dt−31​∫−11​1dt=32​−32​=0.

    Three pairwise orthogonal nonzero vectors are independent, and P2​ has dimension 3, so they form a basis. Squared norms:

    ∥1∥2=2,∥t∥2=32​,​t2−31​​2=∫−11​(t4−32​t2+91​)dt=52​−94​+92​=458​.

    The formula projW​v=∑i​∥wi​∥2⟨v,wi​⟩​wi​ is derived from the orthogonal decomposition and is only valid when the wi​ are pairwise orthogonal. The basis {1,t,t2} is not: ⟨1,t2⟩=32​=0. Applying the formula to it would produce some element of P2​, but not the nearest one, and the residual would fail to be orthogonal to P2​.

    (b) The projection. Three inner products with f(t)=∣t∣, which is even:

    ⟨f,1⟩=2∫01​tdt=1,⟨f,t⟩=0 (odd integrand),⟨f,t2−31​⟩=2∫01​(t3−31​t)dt=2(41​−61​)=61​.

    Therefore

    f^​=21​⋅1+0⋅t+8/451/6​(t2−31​)=21​+1615​(t2−31​)=1615​t2+163​,

    since 61​⋅845​=4845​=1615​ and 21​−4815​=4824−15​=163​. Sanity check: f^​(0)=163​ sits a little above the corner at 0, and f^​(±1)=1618​=89​ a little above the endpoints — a parabola cannot make a corner, so it overshoots at the ends to sink toward it in the middle.

    (c) The error. Since f^​∈P2​ and f−f^​⊥P2​, the Pythagorean theorem gives ∥f∥2=∥f^​∥2+∥f−f^​∥2. Here ∥f∥2=∫−11​t2dt=32​, and by the coordinate formula for an orthogonal basis

    ∥f^​∥2=i∑​∥wi​∥2⟨f,wi​⟩2​=212​+0+8/45(1/6)2​=21​+361​⋅845​=21​+325​=3221​.

    Hence

    ∥f−f^​∥2=32​−3221​=9664−63​=961​,∥f−f^​∥=96​1​=46​1​=246​​≈0.10.

    Residual check: ⟨f−f^​,1⟩=⟨f,1⟩−1615​⟨t2,1⟩−163​⟨1,1⟩=1−1615​⋅32​−163​⋅2=1−85​−83​=0. Good.

    The best constant is the projection onto span{1}, namely ∥1∥2⟨f,1⟩​=21​ (the mean of ∣t∣), with squared error 32​−21​=61​≈0.167. Admitting t contributes nothing, because ∣t∣ is even; admitting t2 cuts the squared error from 61​ to 961​, a factor of 16. That drop is the coefficient 325​ in the Bessel sum above — the energy of ∣t∣ that lives in the P2​ direction.

  10. 10.Critique

    A student, working in C[−π,π] with ⟨f,g⟩=∫−ππ​f(t)g(t)dt and f(t)=t, submits the following.

    Step 1. The functions sint and sin2t are orthogonal in C[−π,π], so Bessel's inequality applies to the set {sint,sin2t}.

    Step 2. Integrating by parts, ⟨f,sint⟩=2π and ⟨f,sin2t⟩=−π.

    Step 3. So the Bessel sum is (2π)2+(−π)2=5π2≈49.3, whereas ∥f∥2=∫−ππ​t2dt=32π3​≈20.7. Since 49.3>20.7, Bessel's inequality is false.

    Bessel's inequality is a theorem. Find the error.

    1. (a)Identify the step that is wrong, state precisely which hypothesis of Bessel's inequality has been ignored, and write down the correct form of the inequality for a set that is orthogonal but not orthonormal.
    2. (b)Verify the two integrals in Step 2 by integration by parts, then compute the correct Bessel sum and confirm that the inequality holds.
    3. (c)Interpret the deficit ∥f∥2−(Bessel sum) as a squared distance, saying to what. Then explain what the deficit tends to as sin3t,sin4t,… are added one by one, and why adding the cosines cosmt as well would change nothing.

    Solution

    (a) Step 1 is the error. Bessel's inequality ∑i​⟨v,ei​⟩2≤∥v∥2 requires the set {ei​} to be orthonormal, not merely orthogonal. Here ∥sint∥2=∥sin2t∥2=π, so neither vector is a unit vector, and the coefficients ⟨f,sinmt⟩ are not the coordinates the theorem is about. Steps 2 and 3 are arithmetically fine; they compute the wrong quantity.

    For an orthogonal set {wi​} of nonzero vectors, normalise first: ei​=wi​/∥wi​∥ gives ⟨v,ei​⟩=⟨v,wi​⟩/∥wi​∥, and Bessel's inequality becomes

    i∑​∥wi​∥2⟨v,wi​⟩2​≤∥v∥2.

    The missing denominators are exactly what inflated the student's sum by a factor of π.

    (b) Checking the integrals. Both integrands tsinmt are even, so integrate over [0,π] and double. With u=t, dv=sinmtdt:

    ∫0π​tsinmtdt=[−mtcosmt​]0π​+m1​∫0π​cosmtdt=−mπcosmπ​+0=mπ(−1)m+1​.

    For m=1 this is π, so ⟨f,sint⟩=2π; for m=2 it is −2π​, so ⟨f,sin2t⟩=−π. Step 2 is correct.

    The correct Bessel sum divides each square by ∥sinmt∥2=π:

    π(2π)2​+π(−π)2​=4π+π=5π≈15.7,

    and 5π≤32π3​ because 5≤32π2​≈6.58. The inequality holds, with room to spare.

    (c) The deficit. Let W=span{sint,sin2t}. The Bessel sum is ∥projW​f∥2, and the Pythagorean theorem gives ∥f∥2=∥projW​f∥2+∥f−projW​f∥2, so the deficit

    32π3​−5π=π(32π2​−5)≈4.96

    is the squared distance from f to W — the least-squares error of the best approximation to t by a combination of sint and sin2t.

    Adding sin3t, sin4t, … enlarges W, so the distance can only decrease, and the Bessel sum grows to ∑m=1N​π⟨f,sinmt⟩2​=∑m=1N​m24π​. By Parseval's identity for the trigonometric system, ∫−ππ​t2dt=π∑m≥1​bm2​ with bm​=2(−1)m+1/m, which is the statement 32π3​=4π∑m≥1​m21​, i.e. ∑1/m2=π2/6. So the Bessel sum tends to ∥f∥2 and the deficit tends to 0: the sines alone capture all the energy of t.

    The cosines add nothing because f(t)=t is odd and cosmt is even, so ⟨f,cosmt⟩=∫−ππ​tcosmtdt=0 for every m≥0: every cosine coordinate of f is zero, and enlarging W by directions in which f has no component leaves the projection, hence the deficit, unchanged.

  11. 11.Proof

    Work in C2 with the standard inner product ⟨z,w⟩=z1​w1​​+z2​w2​​, and let z=(1,i) and w=(i,2).

    1. (a)Compute ⟨z,w⟩ and ⟨w,z⟩, and check that they are conjugates. Then compute ⟨(2+i)z,w⟩ and ⟨z,(2+i)w⟩, and explain why they differ.
    2. (b)Show that ∥z+w∥2=∥z∥2+∥w∥2 even though z and w are not orthogonal, and identify exactly which quantity the Pythagorean identity controls over C.
    3. (c)Let U=2​1​(1i​1−i​). Show that U is unitary by checking its columns, write down U∗, and verify ∥Uz∥=∥z∥ for the vector z above.
    4. (d)Prove: if A is skew-Hermitian (A∗=−A), then ⟨Az,z⟩ is purely imaginary for every z, and consequently every eigenvalue of A is purely imaginary.

    Solution

    (a) Conjugate symmetry and sesquilinearity. Conjugate the second argument:

    ⟨z,w⟩=1⋅i+i⋅2=−i+2i=i,⟨w,z⟩=i⋅1+2⋅i=i−2i=−i=i.

    Conjugate symmetry holds. Scalars come out of the first slot as they are and out of the second slot conjugated:

    ⟨(2+i)z,w⟩=(2+i)i=2i+i2=−1+2i,⟨z,(2+i)w⟩=(2+i)​i=(2−i)i=2i−i2=1+2i.

    They differ because the inner product is linear in the first slot but only conjugate-linear in the second — sesquilinear, not bilinear. Over R the two would coincide.

    (b) Pythagoras without orthogonality. ∥z∥2=∣1∣2+∣i∣2=2 and ∥w∥2=∣i∣2+∣2∣2=5. Also z+w=(1+i,2+i), so

    ∥z+w∥2=∣1+i∣2+∣2+i∣2=2+5=7=∥z∥2+∥w∥2.

    Yet ⟨z,w⟩=i=0, so z and w are not orthogonal. The explanation is the complex expansion ∥z+w∥2=∥z∥2+2Re⟨z,w⟩+∥w∥2: the Pythagorean identity holds iff Re⟨z,w⟩=0, and Re(i)=0. Over C the identity controls only the real part of the inner product, so the converse of the Pythagorean theorem fails.

    (c) A unitary matrix. The columns are c1​=2​1​(1,i) and c2​=2​1​(1,−i). Norms: ∥c1​∥2=21​(1+1)=1 and likewise ∥c2​∥2=1. Inner product, conjugating the second column:

    ⟨c1​,c2​⟩=21​(1⋅1+i⋅(−i)​)=21​(1+i⋅i)=21​(1−1)=0.

    Orthonormal columns are one of the equivalent characterisations of a unitary matrix, so U is unitary. Its adjoint is the conjugate transpose,

    U∗=2​1​(11​−ii​),

    and one can confirm U∗U=21​(1+11−1​1−11+1​)=I. For the norm check, Uz=2​1​(1+i,i−i⋅i)=2​1​(1+i,1+i), so ∥Uz∥2=21​(2+2)=2=∥z∥2, as a unitary matrix guarantees.

    (d) Skew-Hermitian means purely imaginary. Using conjugate symmetry, then the defining property of the adjoint, then A∗=−A:

    ⟨Az,z⟩​=⟨z,Az⟩=⟨A∗z,z⟩=⟨−Az,z⟩=−⟨Az,z⟩.

    A complex number equal to the negative of its own conjugate has zero real part, so ⟨Az,z⟩ is purely imaginary. Now let λ be an eigenvalue with eigenvector z=0, so Az=λz. Then

    ⟨Az,z⟩=⟨λz,z⟩=λ∥z∥2,

    with ∥z∥2>0 real by positive definiteness. A purely imaginary number divided by a positive real is purely imaginary, so λ∈iR. ■

    This is the mirror image of the Hermitian case, where the same three lines give ⟨Az,z⟩​=⟨Az,z⟩ and real eigenvalues. Sanity check: A=(0−1​10​) is real skew-symmetric, hence skew-Hermitian, and its eigenvalues are ±i.

  12. 12.Computation

    Work in P1​ with ⟨p,q⟩=∫01​p(t)q(t)dt, and let D:P1​→P1​ be differentiation, D(a+bt)=b. The goal is the adjoint D∗, defined by ⟨Dp,q⟩=⟨p,D∗q⟩ for all p,q.

    A student argues: "In the basis {1,t} we have D(1)=0 and D(t)=1, so the matrix of D is (00​10​). The matrix of the adjoint is the transpose, (01​00​), so D∗(1)=t and D∗(t)=0; that is, D∗(c+dt)=ct."

    1. (a)Show by a single explicit pair p,q that D is not self-adjoint.
    2. (b)Show by a single explicit pair p,q that the student's formula for D∗ is wrong, and state which hypothesis of the matrix-of-the-adjoint theorem the argument violates.
    3. (c)Compute D∗ correctly: use the orthonormal basis e1​=1, e2​=3​(2t−1), find the matrix of D in it, take the conjugate transpose, and convert back to a formula D∗(c+dt)=?
    4. (d)Verify your formula against the defining identity for general p=a+bt and q=c+dt, and confirm that kerD∗=(imD)⊥.

    Solution

    (a) Not self-adjoint. Take p=t and q=1. Then ⟨Dp,q⟩=⟨1,1⟩=1, while ⟨p,Dq⟩=⟨t,0⟩=0. Since 1=0, the identity ⟨Dp,q⟩=⟨p,Dq⟩ fails and D=D∗.

    (b) The student's D∗ fails. Take p=q=1. The defining identity would need ⟨D1,1⟩=⟨1,D∗1⟩. The left side is ⟨0,1⟩=0; with the student's D∗1=t the right side is ⟨1,t⟩=∫01​tdt=21​. They disagree, so the formula is wrong.

    The theorem "the matrix of T∗ is the conjugate transpose of the matrix of T" holds only when both matrices are taken with respect to orthonormal bases; its proof reads off matrix entries as inner products, aij​=⟨Tej​,fi​⟩, and that identification needs orthonormality. The basis {1,t} is neither orthogonal (⟨1,t⟩=21​) nor normalised (∥t∥2=31​), so transposing its matrix means nothing.

    (c) The correct adjoint. First confirm the basis: ∥e1​∥2=1; ⟨e1​,e2​⟩=3​∫01​(2t−1)dt=3​(1−1)=0; and ∥e2​∥2=3∫01​(2t−1)2dt=3⋅31​=1. Orthonormal, and two vectors in a 2-dimensional space form a basis.

    Apply D: De1​=0 and De2​=3​⋅2=23​=23​e1​. So, columns being coordinate vectors of the images,

    [D]=(00​23​0​),[D∗]=[D]∗=(023​​00​)

    (real entries, so conjugation does nothing). Reading the columns: D∗e1​=23​e2​ and D∗e2​=0.

    To convert, expand q=c+dt in the orthonormal basis by taking inner products: ⟨q,e1​⟩=∫01​(c+dt)dt=c+2d​, and

    ⟨q,e2​⟩=3​∫01​(c+dt)(2t−1)dt=3​(c⋅0+d(32​−21​))=63​d​.

    Hence q=(c+2d​)e1​+63​d​e2​, and by linearity

    D∗q=(c+2d​)⋅23​e2​+63​d​⋅0=(c+2d​)⋅23​⋅3​(2t−1)=6(c+2d​)(2t−1).

    So D∗(c+dt)=(6c+3d)(2t−1), or more memorably D∗q=6(∫01​q)(2t−1): the adjoint of differentiation records the mean of q and spreads it along the direction orthogonal to the constants.

    (d) Verification. With p=a+bt, Dp=b and

    ⟨Dp,q⟩=b∫01​(c+dt)dt=b(c+2d​).

    On the other side, using ∫01​(2t−1)dt=0 and ∫01​t(2t−1)dt=32​−21​=61​,

    ⟨p,D∗q⟩=6(c+2d​)∫01​(a+bt)(2t−1)dt=6(c+2d​)(a⋅0+b⋅61​)=b(c+2d​).

    The two sides agree for all a,b,c,d, so this really is the adjoint, and by uniqueness it is the only one.

    Kernel and image: imD is the constants, span{1}, so (imD)⊥={q:⟨q,1⟩=0}={q:∫01​q=0}. From the formula, D∗q=0 iff c+2d​=0 iff ∫01​q=0. The two sets coincide: kerD∗=(imD)⊥, as the kernel–image proposition for adjoints predicts. (Likewise imD∗=span{2t−1}, which is (kerD)⊥=(span{1})⊥, the one-dimensional space of mean-zero polynomials.) The student's formula, by contrast, has ker=span{t}, which is not orthogonal to the constants — a second way to see it was wrong.

← Back to the question sheet

CalcPath·Free university mathematics

SubjectsProblem setsProgressFeedbackAbout