MIT 18.701 — Lecture 9

Inner Products, Orthonormality

Recall from vector algebra that the dot product tells us a lot about the lengths of vectors and angles between vectors.

Fact (Vector Algebra). For any x,yRn\vec{x}, \vec{y} \in \mathbb{R}^n, with angle θ\theta between them, we have xy=xycosθ\vec{x} \cdot \vec{y} = |\vec{x}| \cdot |\vec{y}| \cdot \cos \theta.

Let's generalize this in 18.701 terms.

§ Inner Products in Rn\mathbb{R}^n

Definition (Dot / Inner Product). For vectors x,yRnx, y \in \mathbb{R}^n, we say their dot / inner product is x,y:=xyR\langle x, y \rangle := x^{\top}y \in \mathbb{R}.

Definition (Length / Norm / Distance). For a vector xRnx \in \mathbb{R}^n, the length / norm of xx is x:=x,x|x| := \sqrt{\langle x, x \rangle}. Furthermore, the distance between x,yRnx, y \in \mathbb{R}^n is said to be xy|x - y|.

Note that, for now, we are working only over Rn\mathbb{R}^n. We don't want to say (1i)\left(\begin{smallmatrix} 1 \\ i \end{smallmatrix}\right) has length 00, for example—and some fields don't even have a well-defined square root!

Remark. There's also something called an outer product defined by xy:=xyRn×nx \otimes y := x y^{\top} \in \mathbb{R}^{n \times n}.

Theorem. (Cauchy-Schwarz) For all x,yRnx, y \in \mathbb{R}^n, we have x,yxy|\langle x, y \rangle | \leq |x| \cdot |y|.

Proof: The inequality x+λy20|x + \lambda y|^2 \geq 0 holds for all λR\lambda \in \mathbb{R}. Expanding this, we have:

0x+λy2=x+λy,x+λy=x2+2x,yλ+y2λ2.0 \leq |x + \lambda y|^2 = \langle x + \lambda y, x + \lambda y \rangle = |x|^2 + 2\langle x, y \rangle \lambda + |y|^2 \lambda^2.

The RHS of the above is a quadratic in λ\lambda that is nonnegative everywhere, so its discriminant is nonpositive:

0discriminant=(2x,y)24(x2)(y2)=4(x,y2x2y2).0 \geq \text{discriminant} = \left ( 2 \langle x, y \rangle \right ) ^2 - 4 \left ( |x|^2 \right ) \left ( |y|^2 \right ) = 4 ( \langle x, y\rangle^2 - |x|^2 |y|^2).

The above is just the statement of Cauchy-Schwarz.   \blacksquare

Definition (Angle). The angle between x,yRnx, y \in \mathbb{R}^n is cos1(x,yxy)\cos^{-1}\left(\frac{\langle x, y \rangle}{|x| \cdot |y|}\right) (which is well-defined by Cauchy-Schwarz).

§ Orthonormal Bases and Matrices

Definition (Orthogonal). Vectors xx and yy are orthogonal if x,y=0\langle x, y \rangle = 0, meaning the angle between them is 9090^{\circ}.

Definition (Orthogonal / Orthonormal Bases). A basis of Rn\mathbb{R}^n is orthogonal if all vectors in the basis are pairwise orthogonal. A basis of Rn\mathbb{R}^n is orthonormal if it is orthogonal and all vectors in the basis have unit length.

Theorem. (Orthogonal     \implies Independent) Any set of nonzero pairwise orthogonal vectors {a1,,ak}Rn\{a_1, \dots, a_k \} \subseteq \mathbb{R}^n must be linearly independent. In particular, nn nonzero pairwise orthogonal vectors of Rn\mathbb{R}^n must form a basis.

Proof: Given any linear dependence of {a1,,ak}\{a_1, \dots, a_k\}, we may write:

c1a1++ckak=0      ai,c1a1++ckak=0 for all i=1,2,,k.c_1a_1 + \dots + c_k a_k = 0 ~ \implies ~ \langle a_i, c_1 a_1 + \dots + c_k a_k \rangle = 0 \text{ for all } i = 1, 2, \dots, k.

But ai,c1a1++ckak=ciai2\langle a_i, c_1 a_1 + \dots + c_k a_k \rangle = c_i |a_i|^2 and ai0|a_i| \neq 0, so ci=0c_i = 0 for all ii.   \blacksquare

Definition (Orthogonal Matrices). A matrix ARn×nA \in \mathbb{R}^{n \times n} is orthogonal if Ax,Ay=x,y\langle Ax, Ay \rangle = \langle x, y \rangle for all x,yRnx, y \in \mathbb{R}^n.

In other words, an orthogonal matrix is a matrix that preserves the dot product.

Theorem. (Properties of Orthogonal Matrices) For any ARn×nA \in \mathbb{R}^{n \times n}, the following are equivalent:

  1. The matrix AA is orthogonal.

  2. For all xRnx \in \mathbb{R}^n, we have Ax=x|Ax| = |x|.

  3. We have AA=InA^{\top}A = I_n.

  4. The columns of AA form an orthonormal basis.

  5. The rows of AA form an orthonormal basis.

Proof: We just have to show a bunch of implications.

And that's good enough.   \blacksquare

§ Orthogonal Groups

Definition (Orthogonal Group). The orthogonal group is On(R):={ARn×nAA=In}O_n(\mathbb{R}) := \{A \in \mathbb{R}^{n \times n} \mid A^{\top} A = I_n \}.

Definition (Special Orthogonal Group). The special orthogonal group is SOn(R):={MOn(R)detM=1}SO_n(\mathbb{R}) := \{M \in O_n(\mathbb{R}) \mid \det M = 1\}.

Note that for all MOn(R)M \in O_n(\mathbb{R}), the condition MM=InM^{\top}M = I_n implies detM=±1\det M = \pm 1. So in fact [On(R):SOn(R)]=2[O_n(\mathbb{R}): SO_n(\mathbb{R})] = 2.

For small nn, what do the orthogonal groups look like?

Example. Evidently O1(R){[1],[1]}O_1(\mathbb{R}) \cong \{ \left[\begin{smallmatrix} 1 \end{smallmatrix}\right] , \left[\begin{smallmatrix} -1 \end{smallmatrix}\right] \}, and SO1(R){[1]}SO_1(\mathbb{R}) \cong \{\left[\begin{smallmatrix} 1 \end{smallmatrix}\right] \}.

Example. By inspection, for n=2n = 2, we can describe the elements of O2O_2 and SO2SO_2 as rotations and reflections:

O2(R)={[cosθsinθsinθcosθ],[cosθsinθsinθcosθ]:θ[0,2π)} and SO2(R)={[cosθsinθsinθcosθ]:θ[0,2π)}.O_2(\mathbb{R}) = \left \{ \left[\begin{smallmatrix} \cos \theta & - \sin \theta \\ \sin \theta & \cos \theta \end{smallmatrix}\right], \left[\begin{smallmatrix} \cos \theta & \sin \theta \\ \sin \theta & - \cos \theta \end{smallmatrix}\right] : \theta \in [0, 2\pi) \right \} \text{ and } SO_2(\mathbb{R}) = \left \{ \left[\begin{smallmatrix} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \end{smallmatrix}\right]: \theta \in [0, 2\pi) \right \}.

Notice that SO2(R)SO_2(\mathbb{R}) is just the group of rotation matrices. Meanwhile, O2(R)O_2(\mathbb{R}) includes rotations about the origin or reflections about lines through the origin.

Important!Composing reflections and rotations always yields either a pure reflection or pure rotation!

Example. For any odd nn and any ASOn(R)A \in SO_n(\mathbb{R}), we have:

det(AIn)= det(AAA)= det(A)det(InA)    by factoring= det(InA)    since det(A)=1= det((InA))= det(InA)    since det(M)=det(M) for any M= (1)ndet(AIn)\begin{align*}\det (A - I_n) = \ & \det (A - AA^{\top}) \\ = \ & \det (A) \det (I_n - A^{\top}) ~~~ \text{ by factoring} \\ = \ & \det (I_n - A^{\top}) ~~~ \text{ since } \det(A) = 1\\ = \ & \det ((I_n - A)^{\top}) \\ = \ & \det (I_n - A) ~~~ \text{ since } \det(M^{\top}) = \det(M) \text{ for any } M \\ = \ & (-1)^n \cdot \det(A - I_n)\end{align*}

But when nn is odd, the above means det(AIn)=0\det (A - I_n) = 0, meaning AA has an eigenvector vv with eigenvalue 11. In the particular case of n=3n = 3, if we rewrite AA using an orthonormal basis containing v=e1v = e_1, we must have:

Ae1=e1      A=[10000].Ae_1 = e_1 ~ \implies ~ A = \left[\begin{smallmatrix} 1 & 0 & 0 \\ 0 & \heartsuit & \heartsuit \\ 0 & \heartsuit & \heartsuit \end{smallmatrix}\right].

Note that the top entries of AA must be zero because the columns of AA must be orthonormal. And the submatrix of \heartsuits is in SO2(R)SO_2(\mathbb{R}). So any transformation ASO3(R)A \in SO_3(\mathbb{R}) may be understood as a planar rotation about an axis vv.

Example. It turns out that elements of SO4(R)SO_4(\mathbb{R}) (in appropriate coordinates) look like the composition of rotations in two separate two-dimensional subspaces.