To compare an approximation with an exact vector, we need to measure their difference. Euclidean length is one possible measurement. The largest coordinate error is another, and the two can rank approximations differently. We begin with the inner product, which defines lengths and perpendicular directions, and use it to find closest points on lines and subspaces. We then study norms that measure length without requiring an inner product.
Inner Products and Euclidean Geometry
An inner product on \(\fR^n\) is a function \(\langle\cdot,\cdot\rangle:\fR^n\times\fR^n\to\fR\) satisfying, for all vectors \(\bx,\by,\bz\) and scalars \(\alpha,\beta\),
Symmetry: \(\langle\bx,\by\rangle=\langle\by,\bx\rangle\).
Linearity: \(\langle\alpha\bx+\beta\by,\bz\rangle=\alpha\langle\bx,\bz\rangle+\beta\langle\by,\bz\rangle\).
Positive definiteness: \(\langle\bx,\bx\rangle\geq0\), with equality if and only if \(\bx=\bzero\).
The standard Euclidean inner product is \[
\begin{align}
\langle\bx,\by\rangle_2=\bx^T\by=\sum_{i=1}^n x_i y_i.
\end{align}
\]
For \(\bx=(1,2)^T\) and \(\by=(2,-1)^T\), compute \(\langle\bx,\by\rangle_2\). Verify the three axioms for the Euclidean inner product. Next replace it by \(\langle\bx,\by\rangle_W=4x_1y_1+x_2y_2\). Are these two vectors still orthogonal in the new inner product?
The Euclidean formula is a familiar example of these axioms. If \(\bx=(x_1,x_2)^T\), then \(\langle\bx,\bx\rangle=x_1^2+x_2^2\) is the square of its length. An inner product allows us to use the same arguments after changing the way directions are weighted. The inequalities below follow from the axioms, so they apply to every such choice.
Every inner product defines a norm by \[
\begin{align}
\|\bx\|=\sqrt{\langle\bx,\bx\rangle}.
\end{align}
\] For the Euclidean inner product this gives \[
\begin{align}
\|\bx\|_2=\sqrt{\bx^T\bx}.
\end{align}
\]
The square root is chosen so that scaling a vector by \(\alpha\) scales its length by \(|\alpha|\). The triangle inequality is less immediate and follows from the Cauchy–Schwarz inequality.
For every real inner product and all vectors \(\bx,\by\), \[
\begin{align}
|\langle\bx,\by\rangle|\leq\|\bx\|\,\|\by\|.
\end{align}
\] Equality holds if and only if \(\bx\) and \(\by\) are linearly dependent.
If \(\by=\bzero\), both \(|\langle\bx,\by\rangle|\) and \(\|\bx\|\|\by\|\) are zero. Hence the claim holds in that case. Suppose now that \(\by\neq\bzero\), so \(\langle\by,\by\rangle>0\).
For every real scalar \(t\), positive definiteness gives \(\langle\bx-t\by,\bx-t\by\rangle\geq0\). Expand using linearity and symmetry: \[
\begin{align}
0\leq\|\bx\|^2-2t\langle\bx,\by\rangle+t^2\|\by\|^2.
\end{align}
\]
Set \(t=\langle\bx,\by\rangle/\|\by\|^2\). The denominator is positive. Substitution gives \[
\begin{align}
0\leq\|\bx\|^2-\frac{\langle\bx,\by\rangle^2}{\|\by\|^2}.
\end{align}
\] Multiply by \(\|\by\|^2\) and take nonnegative square roots. This yields \(|\langle\bx,\by\rangle|\leq\|\bx\|\|\by\|\).
Equality holds precisely when \(\|\bx-t\by\|^2=0\). Positive definiteness makes this equivalent to \(\bx=t\by\). Thus equality occurs precisely for linearly dependent vectors, including the zero-vector cases.
For all vectors \(\bx\) and \(\by\), \[
\begin{align}
\|\bx+\by\|\leq\|\bx\|+\|\by\|.
\end{align}
\]
Expand \(\|\bx+\by\|^2\), bound the cross term using Cauchy–Schwarz, and take square roots. When does equality hold? Treat the case in which one vector is zero separately.
For nonzero vectors \(\bx\) and \(\by\), their angle \(\theta\in[0,\pi]\) is defined by \[
\begin{align}
\cos\theta=\frac{\langle\bx,\by\rangle}{\|\bx\|\,\|\by\|}.
\end{align}
\] Cauchy–Schwarz guarantees that the right-hand side lies in \([-1,1]\). The vectors are orthogonal, written \(\bx\perp\by\), when \(\langle\bx,\by\rangle=0\).
For vectors \(\bx\) and \(\by\) in a real inner-product space, \[
\begin{align}
\bx\perp\by
\quad\Longleftrightarrow\quad
\|\bx+\by\|^2=\|\bx\|^2+\|\by\|^2.
\end{align}
\]
Expand \(\langle\bx+\by,\bx+\by\rangle\) and prove both directions of the stated equivalence. Explain where the assumption of a real inner product is used.
Orthogonal Projection
The coefficient used in the proof of Cauchy–Schwarz has a geometric meaning. It selects the point on the line through \(\by\) that is closest to \(\bx\).
For \(\by\neq\bzero\), the orthogonal projection of \(\bx\) onto the line spanned by \(\by\) is \[
\begin{align}
\operatorname{proj}_{\by}(\bx)
=\frac{\langle\bx,\by\rangle}{\langle\by,\by\rangle}\by.
\end{align}
\] The residual \(\bx-\operatorname{proj}_{\by}(\bx)\) is orthogonal to \(\by\).
Let \(\by\neq\bzero\) and let \[
\begin{align}
\alpha=\frac{\langle\bx,\by\rangle}{\langle\by,\by\rangle}.
\end{align}
\] Then \(\alpha\by\) is the unique closest point to \(\bx\) among all scalar multiples of \(\by\): \[
\begin{align}
\|\bx-\alpha\by\|\leq\|\bx-\beta\by\|
\qquad\text{for every }\beta\in\fR.
\end{align}
\]
Let \(\alpha=\langle\bx,\by\rangle/\langle\by,\by\rangle\) and set \(\br=\bx-\alpha\by\). The assumption \(\by\neq\bzero\) makes the denominator positive.
Compute \[
\begin{align}
\langle\br,\by\rangle
&=\langle\bx,\by\rangle-\alpha\langle\by,\by\rangle=0.
\end{align}
\] Thus \(\alpha\by\) has the required perpendicular residual.
For any real \(\beta\), \[
\begin{align}
\bx-\beta\by=\br+(\alpha-\beta)\by.
\end{align}
\] Expand the squared norm. The cross term is zero by the preceding calculation: \[
\begin{align}
\|\bx-\beta\by\|^2
&=\|\br\|^2+2(\alpha-\beta)\langle\br,\by\rangle
+(\alpha-\beta)^2\|\by\|^2\\
&=\|\br\|^2+(\alpha-\beta)^2\|\by\|^2\geq\|\br\|^2.
\end{align}
\]
Since \(\|\by\|^2>0\), equality holds only when \(\beta=\alpha\). Therefore \(\alpha\by\) is the unique closest point on the line.
For a subspace \(S\subseteq\fR^n\), its orthogonal complement is \[
\begin{align}
S^\perp=\{\bz\in\fR^n:\langle\bz,\bs\rangle=0\text{ for every }\bs\in S\}.
\end{align}
\]
Let the columns of \(\bQ\in\fR^{n\times k}\) be an orthonormal basis for a subspace \(S\). Then \[
\begin{align}
\bP=\bQ\bQ^T
\end{align}
\] is the orthogonal projector onto \(S\). Every vector has the unique decomposition \[
\begin{align}
\bx=\bP\bx+(\bI-\bP)\bx,
\qquad
\bP\bx\in S,
\qquad
(\bI-\bP)\bx\in S^\perp.
\end{align}
\] Moreover, \(\bP\bx\) is the unique point in \(S\) closest to \(\bx\).
Let \(\bQ\) contain the orthonormal basis vectors of \(S\), so \(\bQ^T\bQ=\bI\), and let \(\bP=\bQ\bQ^T\).
The vector \(\bQ^T\bx\) is a list of coefficients. Therefore \(\bP\bx=\bQ(\bQ^T\bx)\) is a linear combination of the columns of \(\bQ\) and lies in \(S\).
First calculate \[
\begin{align}
\bQ^T(\bx-\bP\bx)
&=\bQ^T\bx-\bQ^T\bQ\bQ^T\bx=\bzero.
\end{align}
\] Every \(\bs\in S\) has the form \(\bs=\bQ\bc\). Hence \[
\begin{align}
\bs^T(\bx-\bP\bx)=\bc^T\bQ^T(\bx-\bP\bx)=0.
\end{align}
\]
For any \(\bs\in S\), write \[
\begin{align}
\bx-\bs=(\bx-\bP\bx)+(\bP\bx-\bs).
\end{align}
\] The first term is perpendicular to \(S\), and the second belongs to \(S\). Pythagoras gives \[
\begin{align}
\|\bx-\bs\|_2^2=\|\bx-\bP\bx\|_2^2+\|\bP\bx-\bs\|_2^2.
\end{align}
\] The second summand is nonnegative and vanishes only when \(\bs=\bP\bx\). This proves both minimality and uniqueness.
Orthogonal versus oblique projection. Let \[
\begin{align}
\bP=\begin{pmatrix}1&-2\\0&0\end{pmatrix}.
\end{align}
\] Verify that \(\bP^2=\bP\) but \(\bP^T\neq\bP\). Find its range and null space. Give a vector for which \(\bP\bx\) is not the closest point in the range of \(\bP\).
Projection and uniqueness. Let \(S\) have orthonormal basis matrix \(\bQ\). Prove directly that \(\bP=\bQ\bQ^T\) satisfies \(\bP^T=\bP\) and \(\bP^2=\bP\). Then prove that these two identities characterize orthogonal projectors.
For an orthonormal basis, the projection coefficients are simply the inner products \(\bQ^T\bx\). If the basis columns are stored in a general full-rank matrix \(\bV\), the closest vector \(\bV\bc\) instead satisfies \[
\begin{align}
\bV^T\bV\bc=\bV^T\bx.
\end{align}
\] The matrix \(\bV^T\bV\) records all pairwise inner products between the basis vectors. Orthogonality reduces this matrix to the identity. This is the first reason orthogonal bases simplify computation.
Vector Norms
An inner product supplies both length and angle. A norm keeps only the notion of length. This weaker structure is enough for error bounds and convergence, even when no meaningful angle is available.
A function \(\|\cdot\|:\fR^n\to\fR\) is a vector norm if, for all vectors \(\bx,\by\) and scalars \(\alpha\),
\(\|\bx\|\geq0\), with equality if and only if \(\bx=\bzero\).
\(\|\alpha\bx\|=|\alpha|\|\bx\|\).
\(\|\bx+\by\|\leq\|\bx\|+\|\by\|\).
For \(\bx\in\fR^n\), \[
\begin{align}
\|\bx\|_1&=\sum_{i=1}^n|x_i|,
&
\|\bx\|_2&=\left(\sum_{i=1}^n x_i^2\right)^{1/2},
&
\|\bx\|_\infty&=\max_{1\leq i\leq n}|x_i|.
\end{align}
\] More generally, for \(1\leq p<\infty\), \[
\begin{align}
\|\bx\|_p=\left(\sum_{i=1}^n|x_i|^p\right)^{1/p}.
\end{align}
\]
For an exact vector \(\bx\) and an approximation \(\hat{\bx}\), the absolute error in a chosen norm is \(\|\hat{\bx}-\bx\|\). If \(\bx\neq\bzero\), its relative error is \(\|\hat{\bx}-\bx\|/\|\bx\|\). The norm and scale must be stated together. An error of one unit may be small in one application and unacceptable in another.
Each norm answers a different question. The \(1\)-norm measures total magnitude across coordinates. The \(2\)-norm measures Euclidean energy. The infinity norm measures the largest coordinate error. A tolerance stated without a norm is therefore incomplete.
Let \(\bx=(1,1,1,1)^T\) and \(\by=(4,0,0,0)^T\). Both vectors satisfy \(\|\bx\|_1=\|\by\|_1=4\), but \[
\begin{align}
\|\bx\|_2=2,
\qquad
\|\by\|_2=4,
\qquad
\|\bx\|_\infty=1,
\qquad
\|\by\|_\infty=4.
\end{align}
\] The vectors have the same total magnitude, but one distributes it evenly and the other concentrates it in one coordinate. No single norm measures every interpretation of size.
For every \(\bx\in\fR^n\), \[
\begin{align}
\|\bx\|_\infty
\leq\|\bx\|_2
\leq\|\bx\|_1
\leq\sqrt{n}\,\|\bx\|_2
\leq n\|\bx\|_\infty.
\end{align}
\] The factors \(\sqrt n\) and \(n\) cannot be replaced by smaller constants that work for every vector.
We prove all four comparisons and show that their constants are attained.
Choose \(k\) with \(|x_k|=\|\bx\|_\infty\). Then \[
\begin{align}
\|\bx\|_\infty^2=x_k^2\leq\sum_i x_i^2=\|\bx\|_2^2.
\end{align}
\] Taking square roots gives \(\|\bx\|_\infty\leq\|\bx\|_2\). Also \(|x_i|\leq\|\bx\|_\infty\) for every \(i\), so \[
\begin{align}
\|\bx\|_2^2=\sum_i|x_i|^2\leq n\|\bx\|_\infty^2.
\end{align}
\]
To compare the \(1\)- and \(2\)-norms, expand \[
\begin{align}
\|\bx\|_1^2
=\sum_i|x_i|^2+2\sum_{i<j}|x_i||x_j|
\geq\sum_i|x_i|^2=\|\bx\|_2^2.
\end{align}
\] For the reverse estimate, apply Cauchy–Schwarz to \((|x_1|,...,|x_n|)^T\) and the all-ones vector: \[
\begin{align}
\|\bx\|_1=\sum_i|x_i|\leq\sqrt{\sum_i|x_i|^2}\sqrt{\sum_i1^2}
=\sqrt n\|\bx\|_2.
\end{align}
\]
For a coordinate vector, all three norms equal one, so neither lower comparison can have a larger constant. For the all-ones vector, the three norms are \(1\), \(\sqrt n\), and \(n\). Thus neither factor \(\sqrt n\) in the upper comparisons can be reduced.
Prove the remaining comparisons in the referenced result. For \(\|\bx\|_2\leq\|\bx\|_1\), expand the square of the right side. For \(\|\bx\|_\infty\leq\|\bx\|_2\), select an entry of largest magnitude. Use a coordinate vector and the all-ones vector to show that the constants cannot be improved. Find all equality cases in \(\|\bx\|_1\leq\sqrt n\|\bx\|_2\).
For any two norms \(\|\cdot\|_\alpha\) and \(\|\cdot\|_\beta\) on \(\fR^n\), there are constants \(c,C>0\) such that \[
\begin{align}
c\|\bx\|_\beta\leq\|\bx\|_\alpha\leq C\|\bx\|_\beta
\qquad\text{for every }\bx\in\fR^n.
\end{align}
\] Consequently, the two norms define the same convergent sequences on a fixed \(\fR^n\).
We first compare one arbitrary norm with the Euclidean norm. Let \(\be_1,...,\be_n\) be the coordinate vectors and define the finite constant \[
\begin{align}
C_\alpha=\left(\sum_{i=1}^n\|\be_i\|_\alpha^2\right)^{1/2}.
\end{align}
\] Writing \(\bx=\sum_i x_i\be_i\), and applying the triangle inequality followed by scalar Cauchy–Schwarz, gives \[
\begin{align}
\|\bx\|_\alpha
&\leq\sum_i\|x_i\be_i\|_\alpha
=\sum_i|x_i|\|\be_i\|_\alpha\\
&\leq\left(\sum_i|x_i|^2\right)^{1/2}
\left(\sum_i\|\be_i\|_\alpha^2\right)^{1/2}
=C_\alpha\|\bx\|_2.
\end{align}
\] This provides an upper bound without assuming continuity of the arbitrary norm.
The triangle inequality also gives \(\|\bx\|_\alpha\leq\|\by\|_\alpha+\|\bx-\by\|_\alpha\). Interchange \(\bx\) and \(\by\) and combine the two inequalities: \[
\begin{align}
|\|\bx\|_\alpha-\|\by\|_\alpha|
\leq\|\bx-\by\|_\alpha\leq C_\alpha\|\bx-\by\|_2.
\end{align}
\] Thus Euclidean-close vectors have close \(\alpha\)-norms. This establishes continuity in the Euclidean coordinates.
The Euclidean unit sphere is closed and bounded, hence compact in finite dimensions. A continuous real function on a compact set attains its minimum and maximum. Let those values of \(\|\cdot\|_\alpha\) be \(m_\alpha\) and \(M_\alpha\). The attained minimum cannot be zero: a vector attaining it is on the unit sphere and is nonzero, while positive definiteness makes its \(\alpha\)-norm positive. Hence \(m_\alpha>0\).
For \(\bx\neq\bzero\), the vector \(\bx/\|\bx\|_2\) lies on that sphere. Homogeneity gives \[
\begin{align}
m_\alpha\leq\frac{\|\bx\|_\alpha}{\|\bx\|_2}\leq M_\alpha.
\end{align}
\] Apply the same reasoning to the \(\beta\)-norm. The inequalities \(\|\bx\|_\beta\leq M_\beta\|\bx\|_2\) and \(m_\beta\|\bx\|_2\leq\|\bx\|_\beta\) then give \[
\begin{align}
\frac{m_\alpha}{M_\beta}\|\bx\|_\beta
\leq\|\bx\|_\alpha
\leq\frac{M_\alpha}{m_\beta}\|\bx\|_\beta.
\end{align}
\] Both constants are positive and independent of \(\bx\). The zero vector satisfies the same inequalities because every term is zero.
(Equivalent does not mean interchangeable) Norm equivalence says that convergence in one norm implies convergence in another when the dimension is fixed. It does not say that the numerical values or bounds are equally useful. The comparison constants may grow with \(n\). A bound containing \(\sqrt n\) may be harmless for ten unknowns and useless for ten million.
The \(2\)-norm is induced by an inner product. The \(1\)- and infinity norms are not. The difference is visible in the geometry of their unit balls and in a simple algebraic identity.
Every norm induced by an inner product satisfies \[
\begin{align}
\|\bx+\by\|^2+\|\bx-\by\|^2
=2\|\bx\|^2+2\|\by\|^2.
\end{align}
\]
A norm without angles. Use the parallelogram identity to prove that neither \(\|\cdot\|_1\) nor \(\|\cdot\|_\infty\) on \(\fR^2\) can be induced by an inner product. Explain which step of the projection argument fails when only a general norm is available.
Expand the two squared norms and add. Which cross terms cancel? Use the identity to recover \(\langle\bx,\by\rangle\) from the three lengths \(\|\bx+\by\|\), \(\|\bx\|\), and \(\|\by\|\).
Take \(\bx=(1,0)^T\) and \(\by=(0,1)^T\). For the \(1\)-norm, the left side of the parallelogram identity equals \(2^2+2^2=8\), while the right side equals \(2+2=4\). Thus the \(1\)-norm cannot come from any inner product. The same test shows that the infinity norm is not induced by an inner product.
Let \(\bW\in\fR^{n\times n}\) be symmetric and satisfy \(\bx^T\bW\bx>0\) for every nonzero \(\bx\). Then \[
\begin{align}
\langle\bx,\by\rangle_{\bW}=\bx^T\bW\by,
\qquad
\|\bx\|_{\bW}=\sqrt{\bx^T\bW\bx}
\end{align}
\] define an inner product and its induced norm.
Weighted geometry. Let \[
\begin{align}
\bW=\begin{pmatrix}4&0\\0&1\end{pmatrix}.
\end{align}
\] Verify the inner-product axioms for \(\langle\bx,\by\rangle_{\bW}\). Sketch the unit ball \(\|\bx\|_{\bW}=1\), find the \(\bW\)-orthogonal complement of \((1,1)^T\), and compute the \(\bW\)-orthogonal projection of \((1,0)^T\) onto the line spanned by \((1,1)^T\).
A weighted inner product changes the geometry in which lengths and angles are measured. Directions with large quadratic weight are expensive, and directions with small weight are cheap. In a finite-element method the weight may represent physical energy. In statistics it may account for unequal uncertainty. In optimization it may encode local curvature. The chapter on positive definite matrices develops this geometry further.
Further Exercises
Cauchy–Schwarz as a one-variable minimization. For fixed \(\bx\) and nonzero \(\by\), minimize \(\|\bx-t\by\|_2^2\) over \(t\in\fR\). Derive the minimizing coefficient, the projection formula, and Cauchy–Schwarz from the non-negativity of the minimum.
The norm is part of the question. Two approximations have error vectors \(\be_1=(10^{-3},...,10^{-3})^T\) and \(\be_2=(10^{-2},0,...,0)^T\) in \(\fR^{1000}\). Compare them in the \(1\)-, \(2\)-, and infinity norms. State which approximation is preferable under each measurement and explain why no ranking is meaningful until the application chooses a norm.