<<

Chapter 9

Euclidean Spaces

9.1 Inner Products, Euclidean Spaces

The framework of vector spaces allows us deal with ratios of vectors and linear combinations, but there is no way to express the notion of length of a line segment or to talk about orthogonality of vectors.

AEuclideanstructurewillallowustodealwithmetric notions such as orthogonality and length (or distance).

First, we define a Euclidean structure on a .

507 508 CHAPTER 9. EUCLIDEAN SPACES Definition 9.1. ArealvectorspaceE is a Euclidean space i↵it is equipped with a symmetric ': E E R which is also positive definite,which means⇥ that ! '(u, u) > 0, for every u =0. 6

More explicitly, ': E E R satisfies the following axioms: ⇥ !

'(u1 + u2,v)='(u1,v)+'(u2,v), '(u, v1 + v2)='(u, v1)+'(u, v2), '(u, v)='(u, v), '(u, v)='(u, v), '(u, v)='(v, u), u =0 impliesthat '(u, u) > 0. 6

The real number '(u, v)isalsocalledtheinner product (or scalar product) of u and v. 9.1. INNER PRODUCTS, EUCLIDEAN SPACES 509 We also define the quadratic form associated with ' as the function : E R+ such that ! (u)='(u, u), for all u E. 2

Since ' is bilinear, we have '(0, 0) = 0, and since it is positive definite, we have the stronger fact that '(u, u)=0 i↵ u =0, that is (u)=0i↵u =0.

Given an inner product ': E E R on a vector space E,wealsodenote'(u, v)by⇥ ! u v, or u, v , or (u v), · h i | and (u)by u . k k p 510 CHAPTER 9. EUCLIDEAN SPACES Example 1. The standard example of a Euclidean space is Rn,undertheinnerproduct defined such that · (x ,...,x ) (y ,...,y )=x y + x y + + x y . 1 n · 1 n 1 1 2 2 ··· n n This Euclidean space is denoted by En.

Example 2. Let E be a vector space of 2, and let (e1,e2)beabasisofE.

If a>0andb2 ac < 0, the bilinear form defined such that

'(x1e1+y1e2,x2e1+y2e2)=ax1x2+b(x1y2+x2y1)+cy1y2 yields a Euclidean structure on E.

In this case, 2 2 (xe1 + ye2)=ax +2bxy + cy . 9.1. INNER PRODUCTS, EUCLIDEAN SPACES 511 Example 3. Let [a, b]denotethesetofcontinuousfunc- C tions f :[a, b] R.Itiseasilycheckedthat [a, b]isa vector space of! infinite dimension. C

Given any two functions f,g [a, b], let 2C b f,g = f(t)g(t)dt. h i Za

We leave as an easy exercise that , is indeed an inner product on [a, b]. h i C When [a, b]=[ ⇡,⇡](or[a, b]=[0, 2⇡], this makes basically no di↵erence), one should compute sin px, sin qx , sin px, cos qx , h i h i and cos px, cos qx , h i for all natural numbers p, q 1. The outcome of these calculations is what makes Fourier analysis possible! 512 CHAPTER 9. EUCLIDEAN SPACES

Example 4. Let E =Mn(R)bethevectorspaceofreal n n matrices. ⇥

If we view a A Mn(R)asa“long”columnvector obtained by concatenating2 together its columns, we can define the inner product of two matrices A, B Mn(R) as 2

n A, B = a b , h i ij ij i,j=1 X which can be conveniently written as

A, B =tr(A>B)=tr(B>A). h i Since this can be viewed as the Euclidean product on n2 R ,itisaninnerproductonMn(R). The corresponding norm

A = tr(A A) k kF > q is the Frobenius norm (see Section 6.2). 9.1. INNER PRODUCTS, EUCLIDEAN SPACES 513 Let us observe that ' can be recovered from . Indeed, by bilinearity and symmetry, we have (u + v)='(u + v, u + v) = '(u, u + v)+'(v, u + v) = '(u, u)+2'(u, v)+'(v, v) =(u)+2'(u, v)+(v).

Thus, we have 1 '(u, v)= [(u + v) (u) (v)]. 2

We also say that ' is the polar form of .

If E is finite-dimensional and if ': E E R is a ⇥ ! bilinear form on E,givenanybasis(e1,...,en)ofE,we n n can write x = i=1 xiei and y = j=1 yjej,andwehave P n P '(x, y)= xiyj'(ei,ej). i,j=1 X 514 CHAPTER 9. EUCLIDEAN SPACES

If we let G be the matrix G =('(ei,ej)), and if x and y are the column vectors associated with (x1,...,xn)and (y1,...,yn), then we can write

'(x, y)=x>Gy = y>G>x.

Note that we are committing an abuse of notation, since n x = i=1 xiei is a vector in E,butthecolumnvector n associated with (x1,...,xn)belongstoR . P To avoid this abuse, we could denote the column vector associated with (x1,...,xn)byx (and similarly y for the column vector associated with (y1,...,yn)), in wich case the “correct” expression for '(x, y)is

'(x, y)=x>Gy.

However, in view of the isomorphism between E and Rn, to keep notation as simple as possible, we will use x and y instead of x and y. 9.1. INNER PRODUCTS, EUCLIDEAN SPACES 515 The matrix G associated with an inner product is called the Gram matrix of the inner product with respect to the (e1,...,en).

Proposition 9.1. Let E be a finite-dimensional vec- tor space, and let (e1,...,en) be a basis of E.

1. For any inner product , on E, if G =(ei,ej ) is the Gram matrix ofh thei inner product h , i h i w.r.t. the basis (e1,...,en), then G is symmetric positive definite. 2. For any change of basis matrix P , the Gram ma- trix of , with respect to the new basis is P >GP . h i 3. If A is any n n symmetric positive definite ma- trix, then ⇥ x, y = x>Ay h i is an inner product on E.

One of the very important properties of an inner product ' is that the map u (u)isanorm. 7! p 516 CHAPTER 9. EUCLIDEAN SPACES Proposition 9.2. Let E be a Euclidean space with inner product ' and quadratic form . For all u, v E, we have the Cauchy-Schwarz inequality: 2 '(u, v)2 (u)(v),  the equality holding i↵ u and v are linearly dependent.

We also have the Minkovski inequality: (u + v) (u)+ (v),  the equalityp holding i↵ u andp v are linearlyp dependent, where in addition if u =0and v =0, then u = v for some >0. 6 6 9.1. INNER PRODUCTS, EUCLIDEAN SPACES 517 Sketch of proof .DefinethefunctionT : R R,such that ! T ()=(u + v), for all R.Usingbilinearityandsymmetry,wecan show that2 (u + v)=(u)+2'(u, v)+2(v).

Since ' is positive definite, we have T () 0forall R. 2 If (v)=0,thenv =0,andwealsohave'(u, v)=0. In this case, the Cauchy-Schwarz inequality is trivial, 518 CHAPTER 9. EUCLIDEAN SPACES If (v) > 0, then 2(v)+2'(u, v)+(u)=0 can’t have distinct roots, which means that its discrimi- nant =4('(u, v)2 (u)(v)) is zero or negative, which is precisely the Cauchy-Schwarz inequality.

The Minkovski inequality can then be shown. 9.1. INNER PRODUCTS, EUCLIDEAN SPACES 519 The Minkovski inequality (u + v) (u)+ (v)  shows that thep map u p (u)satisfiesthep triangle inequality,condition(N3)ofdefinition6.1,andsince7! ' p is bilinear and positive definite, it also satisfies conditions (N1) and (N2) of definition 6.1, and thus, it is a norm on E.

The norm induced by ' is called the Euclidean norm induced by '.

Note that the Cauchy-Schwarz inequality can be written as

u v u v , | · |k kk k and the Minkovski inequality as

u + v u + v . k kk k k k 520 CHAPTER 9. EUCLIDEAN SPACES Remark: One might wonder if every norm on a vector space is induced by some Euclidean inner product.

In general, this is false, but remarkably, there is a simple necessary and sucient condition, which is that the norm must satisfy the parallelogram law:

u + v 2 + u v 2 =2( u 2 + v 2). k k k k k k k k If , is an inner product, then we have h i u + v 2 = u 2 + v 2 +2 u, v k k k k k k h i u v 2 = u 2 + v 2 2 u, v , k k k k k k h i and by adding and subtracting these identities, we get the parallelogram law, and the equation 1 u, v = ( u + v 2 u v 2), h i 4 k k k k which allows us to recover , from the norm. h i 9.1. INNER PRODUCTS, EUCLIDEAN SPACES 521 Conversely, if is a norm satisfying the parallelogram law, and if it comeskk from an inner product, then this inner product must be given by 1 u, v = ( u + v 2 u v 2). h i 4 k k k k

Proving that the above form is indeed symmetric and bilinear is quite tricky.

We now define orthogonality. 522 CHAPTER 9. EUCLIDEAN SPACES 9.2 Orthogonality, Duality, Adjoint Maps

Definition 9.2. Given a Euclidean space E,anytwo vectors u, v E are orthogonal, or perpendicular i↵ 2 u v =0.Givenafamily(ui)i I of vectors in E,wesay · 2 that (ui)i I is orthogonal i↵ ui uj =0foralli, j I, 2 · 2 where i = j.Wesaythatthefamily(ui)i I is orthonor- mal i↵ 6u u =0foralli, j I,where2 i = j,and i · j 2 6 ui = ui ui =1,foralli I.ForanysubsetF of E, thek k set · 2

F ? = v E u v =0, for all u F , { 2 | · 2 } of all vectors orthogonal to all vectors in F ,iscalledthe orthogonal complement of F .

Since inner products are positive definite, observe that for any vector u E,wehave 2 u v =0 forallv E i↵ u =0. · 2

It is immediately verified that the orthogonal complement F ? of F is a subspace of E. 9.2. ORTHOGONALITY, DUALITY, ADJOINT MAPS 523 Example 5. Going back to example 3, and to the inner product ⇡ f,g = f(t)g(t)dt h i ⇡ Z on the vector space [ ⇡,⇡], it is easily checked that C ⇡ if p = q, p, q 1, sin px, sin qx = h i 0ifp = q, p, q 1 ⇢ 6 ⇡ if p = q, p, q 1, cos px, cos qx = h i 0ifp = q, p, q 0 ⇢ 6 and sin px, cos qx =0, h i for all p 1andq 0, and of course, ⇡ 1, 1 = ⇡ dx =2⇡. h i R As a consequence, the family (sin px)p 1 (cos qx)q 0 is orthogonal. [

It is not orthonormal, but becomes so if we divide every trigonometric function by p⇡,and1byp2⇡. 524 CHAPTER 9. EUCLIDEAN SPACES Proposition 9.3. Given a Euclidean space E, for any family (ui)i I of nonnull vectors in E, if (ui)i I is or- thogonal, then2 it is linearly independent. 2

Proposition 9.4. Given a Euclidean space E, any two vectors u, v E are orthogonal i↵ 2 u + v 2 = u 2 + v 2 . k k k k k k

One of the most useful features of orthonormal bases is that they a↵ord a very simple method for computing the coordinates of a vector over any basis vector. 9.2. ORTHOGONALITY, DUALITY, ADJOINT MAPS 525

Indeed, assume that (e1,...,em)isanorthonormalbasis. For any vector x = x e + + x e , 1 1 ··· m m if we compute the inner product x e ,weget · i x e = x e e + + x e e + + x e e = x , · i 1 1 · i ··· i i · i ··· m m · i i since 1ifi = j, e e = i · j 0ifi = j, ⇢ 6 is the property characterizing an orthonormal family.

Thus, x = x e , i · i which means that xiei =(x ei)ei is the orthogonal projec- tion of x onto the subspace· generated by the basis vector ei. 526 CHAPTER 9. EUCLIDEAN SPACES If the basis is orthogonal but not necessarily orthonormal, then x ei x ei xi = · = · 2. ei ei e · k ik All this is true even for an infinite orthonormal (or or- thogonal) basis (ei)i I. 2

However, remember that every vector x is expressed as  alinearcombination

x = xiei i I X2 where the family of scalars (xi)i I has finite support, 2 which means that xi =0foralli I J,whereJ is a finite set. 2 9.2. ORTHOGONALITY, DUALITY, ADJOINT MAPS 527

Thus, even though the family (sin px)p 1 (cos qx)q 0 is orthogonal (it is not orthonormal, but becomes[ one if we divide every trigonometric function by p⇡,and1by p2⇡;wewon’tbecauseitlooksmessy!),thefactthata function f 0[ ⇡,⇡]canbewrittenasaFourierseries as 2C 1 f(x)=a0 + (ak cos kx + bk sin kx) Xk=1 does not mean that (sin px)p 1 (cos qx)q 0 is a basis of this vector space of functions, [ because in general, the families (ak)and(bk) do not have finite support!

In order for this infinite linear combination to make sense, it is necessary to prove that the partial sums n

a0 + (ak cos kx + bk sin kx) Xk=1 of the series converge to a limit when n goes to infinity.

This requires a topology on the space. 528 CHAPTER 9. EUCLIDEAN SPACES AveryimportantpropertyofEuclideanspacesoffinite dimension is that the inner product induces a canoni- cal bijection (i.e., independent of the choice of bases) between the vector space E and its dual E⇤.

The reason is that an inner product : E E R defines a nondegenerate pairing,asdefinedinDefinition3.8.· ⇥ !

By Proposition 3.16, there is a canonical isomorphism between E and E⇤.

We feel that the reader will appreciate if we exhibit this mapping explicitly and reprove that it is an isomorp- phism.

The mapping from E to E⇤ is defined as follows. For any vector u E,let'u : E R be the map defined such that 2 !

' (v)=u v, for all v E. u · 2

Since the inner product is bilinear, the map 'u is a linear form in E⇤. 9.2. ORTHOGONALITY, DUALITY, ADJOINT MAPS 529

Thus, we have a map [: E E⇤,definedsuchthat ! [(u)='u.

Theorem 9.5. Given a Euclidean space E, the map [: E E⇤, defined such that ! [(u)='u, is linear and injective. When E is also of finite di- mension, the map [: E E⇤ is a canonical isomor- phism. !

The inverse of the isomorphism [: E E⇤ is denoted ! by ]: E⇤ E. ! 530 CHAPTER 9. EUCLIDEAN SPACES Remarks:

(1) The “musical map” [: E E⇤ is not surjective when E has infinite dimension.!

The result can be salvaged by restricting our attention to continuous linear maps, and by assuming that the vector space E is a Hilbert space (i.e., E is a complete normed vector space w.r.t. the Euclidean norm). (2) Theorem 9.5 still holds if the inner product on E is replaced by a nondegenerate symmetric bilinear form '.

We say that a symmetric bilinear form ': E E R is nondegenerate if for every u E, ⇥ ! 2

if '(u, v)=0 forallv E,thenu =0. 2 9.2. ORTHOGONALITY, DUALITY, ADJOINT MAPS 531

For example, the symmetric bilinear form on R4 (the Lorentz form)definedsuchthat

'((x1,x2,x3,x4), (y1,y2,y3,y4)) = x y + x y + x y x y 1 1 2 2 3 3 4 4 is nondegenerate.

However, there are nonnull vectors u R4 such that '(u, u)=0,whichisimpossibleinaEuclideanspace.2 Such vectors are called isotropic.

Example 9.1. Consider Rn with its usual Euclidean in- ner product.

Given any di↵erentiable function f : U R,whereU is ! some open subset of Rn,bydefinition,foranyx U,the 2 total derivative df x of f at x is the linear form defined n so that for all u =(u1,...,un) R , 2

u1 n @f @f . @f df x(u)= (x) (x) . = (x) ui. @x ··· @x 0 1 @x 1 n u i=1 i ✓ ◆ n X @ A 532 CHAPTER 9. EUCLIDEAN SPACES The unique vector v Rn such that 2 n v u = df x(u)forallu R · 2 is the transpose of the Jacobian matrix of f at x,the 1 n matrix ⇥ @f @f (x) (x) . @x ··· @x ✓ 1 n ◆

This is the gradient grad(f)x of f at x,givenby @f (x) @x1 0 . 1 grad(f)x = . . B @f C B (x)C B C B@xn C @ A 9.2. ORTHOGONALITY, DUALITY, ADJOINT MAPS 533

Example 9.2. Given any two vectors u, v R3,let c(u, v)bethelinearformgivenby 2

c(u, v)(w)=det(u, v, w)forallw R3. 2 Since

u1 v1 w1 det(u, v, w)= u v w 2 2 2 u v w 3 3 3 u2 v2 u1 v1 u1 v1 = w 1 w2 + w3 u3 v3 u3 v3 u2 v2 = w (u v u v )+ w (u v u v ) 1 2 3 3 2 2 3 1 1 3 + w (u v u v), 3 1 2 2 1 we see that the unique vector z R3 such that 2 z w = c(u, v)(w)=det(u, v, w)forallw R3 · 2 is the vector

u v u v 2 3 3 2 z = u3v1 u1v3 . 0u v u v 1 1 2 2 1 @ A This is just the cross-product u v of u and v. ⇥ 534 CHAPTER 9. EUCLIDEAN SPACES Since det(u, v, u)=det(u, v, v)=0,weseethatu v is orthogonal to both u and v. ⇥

The above allows us to generalize the cross-product to n n R .Givenanyn 1vectorsu1,...,un 1 R ,the 2 n cross-product u1 un 1 is the unique vector in R such that ⇥···⇥

(u1 un 1) w =det(u1,...,un 1,w) ⇥···⇥ · for all w Rn. 2

Example 9.3. Consider the vector space Mn(R)ofreal n n matrices with the inner product ⇥

A, B =tr(A>B). h i

Let s:Mn(R) R be the function given by ! n

s(A)= aij, i,j=1 X where A =(aij). 9.2. ORTHOGONALITY, DUALITY, ADJOINT MAPS 535 It is immediately verified that s is a linear form.

It is easy to check that the unique matrix Z such that

Z, A = s(A)forallA Mn(R) h i 2 is the matrix Z = ones(n, n)whoseentriesareallequal to 1.

As a consequence of Theorem 9.5, if E is a Euclidean space of finite dimension, every linear form f E⇤ cor- responds to a unique u E,suchthat 2 2 f(v)=u v, · for every v E. 2 In particular, if f is not the null form, the kernel of f, which is a hyperplane H,ispreciselythesetofvectors that are orthogonal to u.

Theorem 9.5 allows us to define the adjoint of a linear map on a Euclidean space. 536 CHAPTER 9. EUCLIDEAN SPACES Let E be a Euclidean space of finite dimension n,andlet f : E E be a linear map. ! For every u E,themap 2 v u f(v) 7! · is clearly a linear form in E⇤,andbyTheorem9.5,there is a unique vector in E denoted as f ⇤(u), such that

f ⇤(u) v = u f(v), · · for every v E. 2

Proposition 9.6. Given a Euclidean space E of finite dimension, for every linear map f : E E, there is ! a unique linear map f ⇤ : E E, such that ! f ⇤(u) v = u f(v), · · for all u, v E. The map f ⇤ is called the adjoint of f (w.r.t. to2 the inner product). 9.2. ORTHOGONALITY, DUALITY, ADJOINT MAPS 537 Remark: Proposition 9.6 still holds if the inner product on E is replaced by a nondegenerate symmetric bilinear form '.

Linear maps f : E E such that f = f ⇤ are called self-adjoint maps. !

They play a very important role because they have real eigenvalues and because orthonormal bases arise from their eigenvectors.

Furthermore, many physical problems lead to self-adjoint linear maps (in the form of symmetric matrices).

1 Linear maps such that f = f ⇤,orequivalently

f ⇤ f = f f ⇤ =id, also play an important role. They are isometries.Rota- tions are special kinds of isometries. 538 CHAPTER 9. EUCLIDEAN SPACES Another important class of linear maps are the linear maps satisfying the property

f ⇤ f = f f ⇤, called normal linear maps.

We will see later on that normal maps can always be diagonalized over orthonormal bases of eigenvectors, but this will require using a Hermitian inner product (over C).

Given two Euclidean spaces E and F ,wheretheinner product on E is denoted as , and the inner product h i1 on F is denoted as , 2,givenanylinearmap f : E F ,itisimmediatelyverifiedthattheproofofh i Proposition! 9.6 can be adapted to show that there is a unique linear map f ⇤ : F E such that !

f(u),v = u, f ⇤(v) h i2 h i1 for all u E and all v F .Thelinearmapf ⇤ is also called the2adjoint of f. 2 9.2. ORTHOGONALITY, DUALITY, ADJOINT MAPS 539 Remark:GivenanybasisforE and any basis for F ,itis possible to characterize the matrix of the adjoint f ⇤ of f in terms of the matrix of f,andthesymmetricmatrices defining the inner products. We will do so with respect to orthonormal bases.

We can also use Theorem 9.5 to show that any Euclidean space of finite dimension has an .

Proposition 9.7. Given any nontrivial Euclidean space E of finite dimension n 1, there is an orthonormal basis (u1,...,un) for E.

There is a more constructive way of proving Proposition 9.7, using a procedure known as the Gram–Schmidt or- thonormalization procedure.

Among other things, the Gram–Schmidt orthonormal- ization procedure yields the so-called QR-decomposition for matrices,animportanttoolinnumericalmethods. 540 CHAPTER 9. EUCLIDEAN SPACES Proposition 9.8. Given any nontrivial Euclidean space E of dimension n 1, from any basis (e ,...,e ) for 1 n E, we can construct an orthonormal basis (u1,...,un) for E, with the property that for every k, 1 k n,   the families (e1,...,ek) and (u1,...,uk) generate the same subspace.

Proof .Weproceedbyinductiononn.Forn =1,let e u = 1 . 1 e k 1k

For n 2, we define the vectors u and u0 as follows. k k u10 u0 = e ,u= , 1 1 1 u k 10 k and for the inductive step k uk0 +1 u0 = ek+1 (ek+1 ui) ui,uk+1 = . k+1 · u i=1 k0 +1 X We need to show that uk0 +1 is nonzero, and we conclude by induction. 9.2. ORTHOGONALITY, DUALITY, ADJOINT MAPS 541 Remarks:

(1) Note that uk0 +1 is obtained by subtracting from ek+1 the projection of ek+1 itself onto the orthonormal vectors u1,...,uk that have already been computed. Then, we normalize uk0 +1.

The QR-decomposition can now be obtained very easily. We will do this in section 9.4.

(2) We could compute uk0 +1 using the formula k ek+1 ui0 u0 = e · u0, k+1 k+1 2 i i=1 ui0 ! X k k and normalize the vectors uk0 at the end.

This time, we are subtracting from ek+1 the projection of ek+1 itself onto the orthogonal vectors u10 ,...,uk0 .

This might be preferable when writing a computer pro- gram. 542 CHAPTER 9. EUCLIDEAN SPACES (3) The proof of Proposition 9.8 also works for a count- ably infinite basis for E,producingacountablyinfinite orthonormal basis.

Example 6. If we consider polynomials and the inner product 1 f,g = f(t)g(t)dt, h i 1 Z applying the Gram–Schmidt orthonormalization proce- dure to the polynomials 1,x,x2,...,xn,..., which form a basis of the polynomials in one variable with real coecients, we get a family of orthonormal polyno- mials Qn(x)relatedtotheLegendre polynomials.

The Legendre polynomials Pn(x)havemanyniceproper- ties. They are orthogonal, but their norm is not always 1. The Legendre polynomials Pn(x)canbedefinedas follows: 9.2. ORTHOGONALITY, DUALITY, ADJOINT MAPS 543

If we let fn be the function f (x)=(x2 1)n, n we define Pn(x)asfollows: 1 P (x)=1, and P (x)= f (n)(x), 0 n 2nn! n (n) where fn is the nth derivative of fn.

They can also be defined inductively as follows:

P0(x)=1, P1(x)=x, 2n +1 n Pn+1(x)= xPn(x) Pn 1(x). n +1 n +1

It turns out that the polynomials Qn are related to the Legendre polynomials Pn as follows:

2n +1 Qn(x)= Pn(x). r 2 544 CHAPTER 9. EUCLIDEAN SPACES As a consequence of Proposition 9.7 (or Proposition 9.8), given any Euclidean space of finite dimension n,if(e1,..., en)isanorthonormalbasisforE,thenforanytwovec- tors u = u1e1 + + unen and v = v1e1 + + vnen,the inner product u···v is expressed as ··· · n u v =(u e + +u e ) (v e + +v e )= u v , · 1 1 ··· n n · 1 1 ··· n n i i i=1 X and the norm u as k k n u = u e + + u e = u2. k k k 1 1 ··· n nk v i u i=1 uX t We can also prove the following proposition regarding or- thogonal spaces.

Proposition 9.9. Given any nontrivial Euclidean space E of finite dimension n 1, for any subspace F of dimension k, the orthogonal complement F ? of F has dimension n k, and E = F F ?. Furthermore, we have F ?? = F . 9.3. LINEAR ISOMETRIES (ORTHOGONAL TRANSFORMATIONS) 545 9.3 Linear Isometries (Orthogonal Transformations)

In this section, we consider linear maps between Eu- clidean spaces that preserve the Euclidean norm. Definition 9.3. Given any two nontrivial Euclidean spaces E and F of the same finite dimension n,afunction f : E F is an orthogonal transformation, or a lin- ear isometry! i↵it is linear and f(u) = u , k k k k for all u E. 2

Thus, a linear isometry is a linear map that preserves the norm. 546 CHAPTER 9. EUCLIDEAN SPACES Remarks:(1)Alinearisometryisoftendefinedasalinear map such that f(v) f(u) = v u , k k k k for all u, v E.Sincethemapf is linear, the two defi- nitions are2 equivalent. The second definition just focuses on preserving the distance between vectors.

(2) Sometimes, a linear map satisfying the condition of definition 9.3 is called a metric map,andalinearisom- etry is defined as a bijective metric map.

Also, an isometry (without the word linear) is sometimes defined as a function f : E F (not necessarily linear) such that ! f(v) f(u) = v u , k k k k for all u, v E,i.e.,asafunctionthatpreservesthe distance. 2 9.3. LINEAR ISOMETRIES (ORTHOGONAL TRANSFORMATIONS) 547 This requirement turns out to be very strong. Indeed, the next proposition shows that all these definitions are equivalent when E and F are of finite dimension, and for functions such that f(0) = 0.

Proposition 9.10. Given any two nontrivial Euclidean spaces E and F of the same finite dimension n, for every function f : E F , the following properties are equivalent: ! (1) f is a linear map and f(u) = u , for all u E; k k k k 2 (2) f(v) f(u) = v u , for all u, v E, and fk(0) = 0; k k k 2 (3) f(u) f(v)=u v, for all u, v E. · · 2 Furthermore, such a map is bijective. 548 CHAPTER 9. EUCLIDEAN SPACES For (2), we shall prove a slightly stronger result. We prove that if f(v) f(u) = v u k k k k for all u, v E,foranyvector⌧ E,thefunction g : E F defined2 such that 2 ! g(u)=f(⌧ + u) f(⌧) for all u E is a linear map such that g(0) = 0 and (3) holds. 2

Remarks:

(i) The dimension assumption is only needed to prove that (3) implies (1) when f is not known to be linear, and to prove that f is surjective, but the proof shows that (1) implies that f is injective.

(ii) The implication that (3) implies (1) holds if we also assume that f is surjective, even if E has infinite dimen- sion. 9.3. LINEAR ISOMETRIES (ORTHOGONAL TRANSFORMATIONS) 549 In (2), when f does not satisfy the condition f(0) = 0, the proof shows that f is an ane map.

Indeed, taking any vector ⌧ as an origin, the map g is linear, and

f(⌧ + u)=f(⌧)+g(u)forallu E. 2 By Proposition 3.13, this shows that f is ane with as- sociated linear map g.

This fact is worth recording as the following proposition. 550 CHAPTER 9. EUCLIDEAN SPACES Proposition 9.11. Given any two nontrivial Euclidean spaces E and F of the same finite dimension n, for every function f : E F , if !

f(v) f(u) = v u for all u, v E, k k k k 2 then f is an ane map, and its associated linear map g is an isometry.

In view of Proposition 9.10, we usually abbreviate “linear isometry” as “isometry,” unless we wish to emphasize that we are dealing with a map between vector spaces. 9.4. THE ORTHOGONAL GROUP, ORTHOGONAL MATRICES 551 9.4 The Orthogonal Group, Orthogonal Matrices

In this section, we explore some of the fundamental prop- erties of the orthogonal group and of orthogonal matrices.

As an immediate corollary of the Gram–Schmidt orthonor- malization procedure, we obtain the QR-decomposition for invertible matrices. 552 CHAPTER 9. EUCLIDEAN SPACES Proposition 9.12. Let E be any Euclidean space of finite dimension n, and let f : E E be any linear map. The following properties hold:! (1) The linear map f : E E is an isometry i↵ ! f f ⇤ = f ⇤ f =id.

(2) For every orthonormal basis (e1,...,en) of E, if the matrix of f is A, then the matrix of f ⇤ is the transpose A> of A, and f is an isometry i↵ A satisfies the identities

AA> = A>A = In,

where In denotes the of order n, i↵the columns of A form an orthonormal basis of Rn, i↵the rows of A form an orthonormal basis of Rn.

Proposition 9.12 shows that the inverse of an isometry f is its adjoint f ⇤.Proposition9.12alsomotivatesthe following definition: 9.4. THE ORTHOGONAL GROUP, ORTHOGONAL MATRICES 553 Definition 9.4. Arealn n matrix is an i↵ ⇥ AA> = A>A = In.

Remarks:Itiseasytoshowthattheconditions 1 AA> = In, A>A = In,andA = A>,areequivalent.

Given any two orthonormal bases (u1,...,un)and (v1,...,vn), if P is the change of basis matrix from (u1,...,un)to(v1,...,vn)sincethecolumnsofP are the coordinates of the vectors vj with respect to the basis (u1,...,un), and since (v1,...,vn)isorthonormal,the columns of P are orthonormal, and by Proposition 9.12 (2), the matrix P is orthogonal.

The proof of Proposition 9.10 (3) also shows that if f is an isometry, then the image of an orthonormal basis (u1,...,un)isanorthonormalbasis. 554 CHAPTER 9. EUCLIDEAN SPACES Recall that the det(f)ofanendomorphism f : E E is independent of the choice of a basis in E. !

Also, for every matrix A Mn(R), we have 2 det(A)=det(A>), and for any two n n-matrices A and B,wehavedet(AB)=det(A)det(B⇥).

Then, if f is an isometry, and A is its matrix with respect to any orthonormal basis, AA> = A>A = In implies that det(A)2 =1,thatis,eitherdet(A)=1,or det(A)= 1. It is also clear that the isometries of a Euclidean space of dimension n form a group, and that the isometries of determinant +1 form a subgroup. 9.4. THE ORTHOGONAL GROUP, ORTHOGONAL MATRICES 555 Definition 9.5. Given a Euclidean space E of dimen- sion n,thesetofisometriesf : E E forms a group ! denoted as O(E), or O(n)whenE = Rn,calledthe orthogonal group (of E).

For every isometry, f,wehavedet(f)= 1, where det(f) denotes the determinant of f.Theisometriessuchthat± det(f)=1arecalledrotations, or proper isometries, or proper orthogonal transformations,andtheyform asubgroupofthespeciallineargroupSL(E)(andof O(E)), denoted as SO(E), or SO(n)whenE = Rn, called the special orthogonal group (of E).

The isometries such that det(f)= 1arecalledim- proper isometries, or improper orthogonal transfor- mations, or flip transformations. 556 CHAPTER 9. EUCLIDEAN SPACES 9.5 QR-Decomposition for Invertible Matrices

Now that we have the definition of an orthogonal matrix, we can explain how the Gram–Schmidt orthonormaliza- tion procedure immediately yields the QR-decomposition for matrices. Proposition 9.13. Given any n n real matrix A, if A is invertible then there is an orthogonal⇥ matrix Q and an upper R with positive diag- onal entries such that A = QR.

Proof .WecanviewthecolumnsofA as vectors A1,...,An in En.

If A is invertible, then they are linearly independent, and we can apply Proposition 9.8 to produce an orthonormal basis using the Gram–Schmidt orthonormalization proce- dure. 9.5. QR-DECOMPOSITION FOR INVERTIBLE MATRICES 557

Recall that we construct vectors Qk and Q0k as follows: Q01 Q01 = A1,Q1 = , Q01 k k and for the inductive step k Q0k+1 Q0k+1 = Ak+1 (Ak+1 Qi) Qi,Qk+1 = , · Q0k+1 i=1 X k k where 1 k n 1.   If we express the vectors Ak in terms of the Qi and Q0i, we get the triangular system

A1 = Q01 Q1, k k . Aj =(Aj Q1) Q1 + +(Aj Qi) Qi + + Q0j Qj, · ··· · ··· k k . n n 1 1 n n 1 n 1 n n A =(A Q ) Q + +(A Q ) Q + Q0 Q . · ··· · k k

k j i If we let rkk = Q0 , rij = A Q when 1 i j 1, k 1 k n ·   and then Q =(Q ,...,Q )andR =(rij), then R is upper-triangular, Q is orthogonal, and A = QR. 558 CHAPTER 9. EUCLIDEAN SPACES Remarks:(1)BecausethediagonalentriesofR are pos- itive, it can be shown that Q and R are unique.

(2) The QR-decomposition holds even when A is not in- vertible. In this case, R has some zero on the diagonal. However, a di↵erent proof is needed. We will give a nice proof using Householder matrices (see also Strang [31]).

Example 7. Consider the matrix

005 A = 041 01111 @ A We leave as an exercise to show that A = QR with

001 111 Q = 010 and R = 041 01001 00051 @ A @ A 9.5. QR-DECOMPOSITION FOR INVERTIBLE MATRICES 559 Another example of QR-decomposition is

112 A = 001 01001 @ A where

1/p21/p20 Q = 001 0 1 1/p2 1/p20 and @ A p21/p2 p2 R = 01/p2 p2 0 1 001 @ A The QR-decomposition yields a rather ecient and nu- merically stable method for solving systems of linear equa- tions. 560 CHAPTER 9. EUCLIDEAN SPACES Indeed, given a system Ax = b,whereA is an n n , writing A = QR,sinceQ is orthogonal,⇥ we get Rx = Q>b, and since R is upper triangular, we can solve it by Gaus- sian elimination, by solving for the last variable xn first, substituting its value into the system, then solving for xn 1,etc. The QR-decomposition is also very useful in solving least squares problems (we will come back to this later on), and for finding eigenvalues.

It can be easily adapted to the case where A is a rect- angular m n matrix with independent columns (thus, n m). ⇥  In this case, Q is not quite orthogonal. It is an m n matrix whose columns are orthogonal, and R is an⇥ invertible n n upper triangular matrix with positive diagonal entries.⇥ For more on QR,seeStrang[31]. 9.5. QR-DECOMPOSITION FOR INVERTIBLE MATRICES 561 It should also be said that the Gram–Schmidt orthonor- malization procedure that we have presented is not very stable numerically, and instead, one should use the mod- ified Gram–Schmidt method.

To compute Q0k+1,insteadofprojectingAk+1 onto Q1,...,Qk in a single step, it is better to perform k pro- jections.

k+1 k+1 k+1 We compute Q1 ,Q2 ,...,Qk as follows: Qk+1 = Ak+1 (Ak+1 Q1) Q1, 1 · Qk+1 = Qk+1 (Qk+1 Qi+1) Qi+1, i+1 i i · where 1 i k 1.  

0k+1 k+1 It is easily shown that Q = Qk .Thereaderisurged to code this method. 562 CHAPTER 9. EUCLIDEAN SPACES Asomewhatsurprisingconsequenceofthe QR-decomposition is a famous determinantal inequality due to Hadamard.

Proposition 9.14. (Hadamard) For any real n n ⇥ matrix A =(aij), we have

n n 1/2 det(A) a2 | | ij i=1✓ j=1 ◆ Y X n n 1/2 and det(A) a2 . | | ij j=1 i=1 Y✓X ◆ Moreover, equality holds i↵either A has a zero col- umn in the left inequality or a zero row in the right inequality, or A is orthogonal. 9.5. QR-DECOMPOSITION FOR INVERTIBLE MATRICES 563 Another version of Hadamard’s inequality applies to sym- metric positive semidefinite matrices.

Proposition 9.15. (Hadamard) For any real n n ⇥ matrix A =(aij), if A is symmetric positive semidef- inite, then we have n det(A) a .  ii i=1 Y Moreover, if A is positive definite, then equality holds i↵ A is a . 564 CHAPTER 9. EUCLIDEAN SPACES