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,y∈Rn, with angle θ between them, we have x⋅y=∣x∣⋅∣y∣⋅cosθ.
Let's generalize this in 18.701 terms.
§ Inner Products in Rn
Definition (Dot / Inner Product). For vectors x,y∈Rn, we say their dot / inner product is ⟨x,y⟩:=x⊤y∈R.
Definition (Length / Norm / Distance). For a vector x∈Rn, the length / norm of x is ∣x∣:=⟨x,x⟩. Furthermore, the distance between x,y∈Rn is said to be ∣x−y∣.
Note that, for now, we are working only over Rn. We don't want to say (1i) has length 0, 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 x⊗y:=xy⊤∈Rn×n.
Theorem. (Cauchy-Schwarz) For all x,y∈Rn, we have ∣⟨x,y⟩∣≤∣x∣⋅∣y∣.
Proof: The inequality ∣x+λy∣2≥0 holds for all λ∈R. Expanding this, we have:
0≤∣x+λy∣2=⟨x+λy,x+λy⟩=∣x∣2+2⟨x,y⟩λ+∣y∣2λ2.
The RHS of the above is a quadratic in λ that is nonnegative everywhere, so its discriminant is nonpositive:
The above is just the statement of Cauchy-Schwarz. ■
Definition (Angle). The angle between x,y∈Rn is cos−1(∣x∣⋅∣y∣⟨x,y⟩) (which is well-defined by Cauchy-Schwarz).
§ Orthonormal Bases and Matrices
Definition (Orthogonal). Vectors x and y are orthogonal if ⟨x,y⟩=0, meaning the angle between them is 90∘.
Definition (Orthogonal / Orthonormal Bases). A basis of Rn is orthogonal if all vectors in the basis are pairwise orthogonal. A basis of Rn is orthonormal if it is orthogonal and all vectors in the basis have unit length.
Theorem. (Orthogonal ⟹ Independent) Any set of nonzero pairwise orthogonal vectors {a1,…,ak}⊆Rn must be linearly independent. In particular, n nonzero pairwise orthogonal vectors of Rn must form a basis.
Proof: Given any linear dependence of {a1,…,ak}, we may write:
c1a1+⋯+ckak=0⟹⟨ai,c1a1+⋯+ckak⟩=0 for all i=1,2,…,k.
But ⟨ai,c1a1+⋯+ckak⟩=ci∣ai∣2 and ∣ai∣=0, so ci=0 for all i. ■
Definition (Orthogonal Matrices). A matrix A∈Rn×n is orthogonal if ⟨Ax,Ay⟩=⟨x,y⟩ for all x,y∈Rn.
In other words, an orthogonal matrix is a matrix that preserves the dot product.
Theorem. (Properties of Orthogonal Matrices) For any A∈Rn×n, the following are equivalent:
The matrix A is orthogonal.
For all x∈Rn, we have ∣Ax∣=∣x∣.
We have A⊤A=In.
The columns of A form an orthonormal basis.
The rows of A form an orthonormal basis.
Proof: We just have to show a bunch of implications.
(#1)⟹(#2). If A is orthogonal, then ∣Ax∣=⟨Ax,Ax⟩=⟨x,x⟩=∣x∣.
(#2)⟹(#1). This follows from the polarization identity:
⟨x,y⟩=2∣x+y∣2−∣x∣2−∣y∣2.
Since A preserves lengths, it preserves the RHS, so it must also preserve the LHS.
(#3)⟹(#1). If A⊤A=In, then ⟨Ax,Ay⟩=(Ax)⊤(Ay)=(x⊤A⊤)(Ay)=x⊤(A⊤A)y=x⊤y=⟨x,y⟩.
(#1)⟹(#3). Take a pair of basis vectors (ei,ej), so ⟨Aei,Aej⟩=⟨ei,ej⟩. The LHS and RHS simplify as:
LHS=⟨Aei,Aej⟩=ei⊤(A⊤A)ej=(A⊤A)ij and RHS=⟨ei,ej⟩={10i=ji=j.
Thus, the equation ⟨Aei,Aej⟩=⟨ei,ej⟩ gives us (A⊤A)ij=1 if and only if i=j, meaning (A⊤A)=In.
(#4)⟺(#3). Suppose the columns of A form vectors {a1,…,an}⊆Rn. Observe that:
Thus, if A⊤A=In, then ⟨ai,aj⟩=1 if i=j, and ⟨ai,aj⟩=0 otherwise, which implies {ai} is an orthonormal basis. And it goes the other way, too; if {ai} is orthonormal, then A⊤A=In.
(#5)⟺(#3). If A⊤A=In, then A⊤ and A are inverses. So we also get AA⊤=In. Now repeating the argument in (#3)⟹(#4) with the equation AA⊤=In implies the rows of A are orthonormal.
And that's good enough. ■
§ Orthogonal Groups
Definition (Orthogonal Group). The orthogonal group is On(R):={A∈Rn×n∣A⊤A=In}.
Definition (Special Orthogonal Group). The special orthogonal group is SOn(R):={M∈On(R)∣detM=1}.
Note that for all M∈On(R), the condition M⊤M=In implies detM=±1. So in fact [On(R):SOn(R)]=2.
For small n, what do the orthogonal groups look like?
Example. Evidently O1(R)≅{[1],[−1]}, and SO1(R)≅{[1]}.
Example. By inspection, for n=2, we can describe the elements of O2 and SO2 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π)}.
Notice that SO2(R) is just the group of rotation matrices. Meanwhile, O2(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 n and any A∈SOn(R), we have:
det(A−In)======det(A−AA⊤)det(A)det(In−A⊤) by factoringdet(In−A⊤) since det(A)=1det((In−A)⊤)det(In−A) since det(M⊤)=det(M) for any M(−1)n⋅det(A−In)
But when n is odd, the above means det(A−In)=0, meaning A has an eigenvector v with eigenvalue 1. In the particular case of n=3, if we rewrite A using an orthonormal basis containing v=e1, we must have:
Ae1=e1⟹A=[1000♡♡0♡♡].
Note that the top entries of A must be zero because the columns of A must be orthonormal. And the submatrix of ♡s is in SO2(R). So any transformation A∈SO3(R) may be understood as a planar rotation about an axis v.
Example. It turns out that elements of SO4(R) (in appropriate coordinates) look like the composition of rotations in two separate two-dimensional subspaces.