7.3 Practice Problems
Problem 7.1. Let \(x=(1,0,2)\) and \(y=(2,1,2)\) in \(\mathbb {R}^3\) with the standard inner product. Compute \(\|x\|\), \(\|y\|\), \(\|x+y\|\), \((x,y)\) and the angle between \(x\) and \(y\); then verify the Cauchy–Schwarz and triangle inequalities.
Show solution
Solution. The inner product is \((x,y)=1\cdot 2+0\cdot 1+2\cdot 2=6\), and \[\|x\|=\sqrt {1+0+4}=\sqrt 5,\qquad \|y\|=\sqrt {4+1+4}=3,\] while \(x+y=(3,1,4)\) gives \(\|x+y\|=\sqrt {9+1+16}=\sqrt {26}\).
The angle \(\theta \) satisfies \[\cos \theta =\frac {(x,y)}{\|x\|\,\|y\|}=\frac {6}{3\sqrt 5}=\frac {2}{\sqrt 5} \approx 0.894,\] so \(\theta \approx 26.6^{\circ }\).
Cauchy–Schwarz
\(|(x,y)|=6\) and \(\|x\|\|y\|=3\sqrt 5\approx 6.708\), so \(6\leq 6.708\) holds. Equality would mean \(x\) and \(y\) are parallel; they are not.
Triangle inequality
\(\|x+y\|=\sqrt {26}\approx 5.099\) and \(\|x\|+\|y\|=\sqrt 5+3\approx 5.236\), so \(5.099\leq 5.236\) holds.
Problem 7.2. Prove that in a real inner product space, \[4(x,y)=\|x+y\|^2-\|x-y\|^2 \quad \text {and}\quad \|x+y\|^2+\|x-y\|^2=2\left (\|x\|^2+\|y\|^2\right ).\]
Show solution
Solution. Expand both norms using \(\|v\|^2=(v,v)\) and bilinearity. In a real space \((x,y)=(y,x)\), so \[\|x+y\|^2=(x+y,x+y)=\|x\|^2+2(x,y)+\|y\|^2,\] \[\|x-y\|^2=(x-y,x-y)=\|x\|^2-2(x,y)+\|y\|^2.\] Subtracting the second from the first, the \(\|x\|^2\) and \(\|y\|^2\) terms cancel and the cross terms add: \[\|x+y\|^2-\|x-y\|^2=4(x,y).\] Adding them instead, the cross terms cancel and the rest doubles: \[\|x+y\|^2+\|x-y\|^2=2\|x\|^2+2\|y\|^2.\] The first identity says the inner product is recoverable from the norm alone; the second, the parallelogram law, is the test for whether a given norm comes from an inner product at all.
Problem 7.3. Suppose \(\|x\|=3\), \(\|x+y\|=4\) and \(\|x-y\|=6\) in a real inner product space. What must \(\|y\|\) be?
Show solution
Solution. Apply the parallelogram law from the previous problem: \[\|x+y\|^2+\|x-y\|^2=2\left (\|x\|^2+\|y\|^2\right ).\] Substituting the given values, \[16+36=2(9+\|y\|^2)\implies 52=18+2\|y\|^2\implies \|y\|^2=17,\] so \(\|y\|=\sqrt {17}\). Note the data are not free: any norm satisfying the parallelogram law determines \(\|y\|\) once the other three are fixed.
Problem 7.4. Show that there is no inner product on \(\mathbb {R}^2\) whose associated norm is \(\|(x,y)\|=|x|+|y|\).
Show solution
Solution. If such an inner product existed, its norm would have to satisfy the parallelogram law. Test it on \(u=(1,0)\) and \(v=(0,1)\): \[\|u\|=1,\qquad \|v\|=1,\] \[u+v=(1,1)\implies \|u+v\|=2,\qquad u-v=(1,-1)\implies \|u-v\|=2.\] Then \[\|u+v\|^2+\|u-v\|^2=4+4=8,\] but \[2\left (\|u\|^2+\|v\|^2\right )=2(1+1)=4.\] Since \(8\neq 4\) the parallelogram law fails, so this norm cannot arise from any inner product.
Problem 7.5. Find \(c\) so that \(x=(1,3,2,c)\) is orthogonal to \(y=(3,1,-4,1)\) in \(\mathbb {R}^4\). Then find \(c\) so that \((x,y)=x_1y_1-3x_1y_2-3x_2y_1+cx_2y_2\) is an inner product on \(\mathbb {R}^2\).
Show solution
Solution.
Orthogonality
\[(x,y)=1\cdot 3+3\cdot 1+2\cdot (-4)+c\cdot 1=3+3-8+c=c-2,\] which vanishes when \(c=2\).
The inner product
The form has matrix \(A=\begin {pmatrix}1&-3\\-3&c\end {pmatrix}\), since \((x,y)=x^tAy\). It is symmetric and bilinear whatever \(c\) is, so the only condition to impose is positive definiteness: \((x,x)>0\) for \(x\neq 0\). Completing the square, \[(x,x)=x_1^2-6x_1x_2+cx_2^2=(x_1-3x_2)^2+(c-9)x_2^2.\] If \(c>9\) this is a sum of two non-negative terms which vanish together only when \(x_2=0\) and \(x_1=3x_2=0\), so it is positive definite. If \(c\leq 9\), taking \(x=(3,1)\) gives \((x,x)=0+(c-9)\leq 0\) with \(x\neq 0\), so it fails.
Hence the form is an inner product exactly when \(\boldsymbol {c>9}\).
Problem 7.6. Suppose \(y\neq 0\) and \(x\) is any vector in an inner product space. Show that \[c=\frac {(x,y)}{\|y\|^2}\] is the unique scalar for which \(x'=x-cy\) is orthogonal to \(y\).
Show solution
Solution. Compute the inner product of \(x'=x-cy\) with \(y\), using linearity in the first argument: \[(x',y)=(x-cy,\ y)=(x,y)-c(y,y)=(x,y)-c\|y\|^2.\] This is zero if and only if \(c\|y\|^2=(x,y)\), and since \(y\neq 0\) we have \(\|y\|^2\neq 0\), so we may divide: \[c=\frac {(x,y)}{\|y\|^2}.\] The calculation gives existence and uniqueness at once — the condition is a single linear equation in \(c\) with a non-zero coefficient.
The vector \(cy\) is the orthogonal projection of \(x\) onto the line spanned by \(y\), and this is exactly the step repeated at each stage of the Gram–Schmidt procedure.
Problem 7.7. Let \(U\) be a subspace of a finite dimensional inner product space \(V\). Prove that \(\dim U^{\perp }=\dim V-\dim U\), and deduce that \(U^{\perp }=\{0\}\) if and only if \(U=V\).
Show solution
Solution. By Theorem 7.2.8, \(V=U\oplus U^{\perp }\). For a direct sum the dimensions add: taking a basis of \(U\) and a basis of \(U^{\perp }\), their union spans \(V\) because every vector decomposes, and it is independent because a dependence would give a non-zero vector in \(U\cap U^{\perp }=\{0\}\). Hence \[\dim V=\dim U+\dim U^{\perp },\] which rearranges to the stated formula.
For the consequence: \(U^{\perp }=\{0\}\) means \(\dim U^{\perp }=0\), which by the formula holds exactly when \(\dim U=\dim V\); and a subspace of the same finite dimension as the whole space is the whole space. So \(U^{\perp }=\{0\}\) if and only if \(U=V\).
Problem 7.8. What happens if the Gram–Schmidt procedure is applied to a list of vectors that is not linearly independent?
Show solution
Solution. The procedure breaks down at the first vector that is a combination of its predecessors, and it does so in a visible way: that step produces the zero vector, which cannot then be normalised.
Concretely, at step \(k\) Gram–Schmidt forms \[w_k=v_k-\sum _{i<k}(v_k,e_i)e_i,\] the part of \(v_k\) orthogonal to the span of \(v_1,\dots ,v_{k-1}\). If \(v_k\) already lies in that span then subtracting its projection removes all of it and \(w_k=0\). The next instruction, \(e_k=w_k/\|w_k\|\), then divides by zero.
So the procedure is self-diagnosing: it is a test for independence as well as a method of orthogonalisation. The usual repair is to discard any \(v_k\) producing \(w_k=0\) and carry on, which yields an orthonormal basis for the span of the original list rather than one vector per input.
Questions on this section
Stuck on something here? Ask below and it stays attached to this topic.