Computer Graphics and Geometric ModelingComputer graphics and geometric modeling mathematics 1....

971
Computer Graphics and Geometric Modeling

Transcript of Computer Graphics and Geometric ModelingComputer graphics and geometric modeling mathematics 1....

  • Computer Graphics and Geometric Modeling

  • Max K. Agoston

    Computer Graphics andGeometric ModelingMathematics

  • Max K. Agoston, MA, MS, PhDCupertino, CA 95014, USA

    British Library Cataloguing in Publication DataAgoston, Max K.

    Computer graphics and geometric modeling mathematics1. Computer graphics 2. Geometry – Data processing 3. Computer-aided design4. Computer graphics – MathematicsI. Title006.6ISBN 1852338172

    Library of Congress Cataloging-in-Publication Data

    Agoston, Max K.Computer graphics & geometric modeling / Max K. Agoston.

    p. cm.Includes bibliographical references and index.Contents: Mathematics.ISBN 1-85233-817-2 (alk. paper)1. Computer graphics. 2. Geometry – Data processing. 3. Mathematical models.

    4. CAD/CAM systems. I. Title.

    T385.A395 2004006.6 – dc22 2004049155

    Apart from any fair dealing for the purposes of research or private study, or criticism or review, as permitted under the Copyright, Designs and Patents Act 1988, this publication may only be reproduced,stored or transmitted, in any form or by any means, with the prior permission in writing of the publishers, or in the case of reprographic reproduction in accordance with the terms of licences issued bythe Copyright Licensing Agency. Enquiries concerning reproduction outside those terms should be sent tothe publishers.

    ISBN 1-85233-817-2Springer is part of Springer Science+Business Mediaspringeronline.com

    © 2005 Springer-Verlag London Ltd.Printed in the United States of America

    The use of registered names, trademarks, etc. in this publication does not imply, even in the absence of aspecific statement, that such names are exempt from the relevant laws and regulations and therefore freefor general use.

    The publisher makes no representation, express or implied, with regard to the accuracy of the informationcontained in this book and cannot accept any legal responsibility or liability for any errors or omissionsthat may be made.

    Typesetting: SNP Best-set Typesetter Ltd., Hong Kong34/3830-543210 Printed on acid-free paper SPIN 10971444

  • This book and [AgoM05] grew out of notes used to teach various types of computergraphics courses over a period of about 20 years. Having retired after a lifetime ofteaching and research in mathematics and computer science, I finally had the time tofinish these books. The goal of these books was to present a comprehensive overviewof computer graphics as seen in the context of geometric modeling and the mathe-matics that is required to understand the material. The reason for two books is thatthere was too much material for one. The practical stuff and a description of thevarious algorithms and implementation issues that one runs into when writing a geo-metric modeling program ended up in [AgoM05], and the mathematical backgroundfor the underlying theory ended up here. I have always felt that understanding themathematics behind computer graphics was just as important as the standard algo-rithms and implementation details that one gets to in such courses and included afair amount of mathematics in my computer graphics courses.

    Given the genesis of this book, the primary intended audience is readers who areinterested in computer graphics or geometric modeling. The large amount of mathe-matics that is covered is explained by the fact that I wanted to provide a completereference for all the mathematics relevant to geometric modeling. Although computerscientists may find sections of the book very abstract, everything that was includedsatisfied at least one of two criteria:

    (1) It was important for some aspect of a geometric modeling program, or(2) It provided helpful background material for something that might be used in

    such a program.

    On the other hand, because the book contains only mathematics and is so broad inits coverage (it covers the basic definitions and main results from many fields in math-ematics), it can also serve as a reference book for mathematics in general. It could infact be used as an introduction to various topics in mathematics, such as topology(general, combinatorial, algebraic, and differential) and algebraic geometry.

    Two goals were very important to me while writing this book. One was to thor-oughly explain the mathematics and avoid a cookbook approach. The other was tomake the material as self-contained as possible and to define and explain pretty muchevery technical term or concept that is used. With regard to the first goal, I have tried

    Preface

  • very hard to present the mathematics in such a way that the reader will see the moti-vation for it and understand it. The book is aimed at those individuals who seek suchunderstanding. Just learning a few formulas is not good enough. I have always appre-ciated books that tried to provide motivation for the material they were covering andhave been especially frustrated by computer graphics books that throw the readersome formulas without explaining them. Furthermore, the more mathematics thatone knows, the less likely it is that one will end up reinventing something. The successor failure of this book should be judged on how much understanding of the mathe-matics the reader got, along with whether or not the major topics were covered adequately.

    To accomplish the goal of motivating all of the mathematics needed for geomet-ric modeling in one book, even if it is large, is not easy and is impossible to do fromscratch. At some places in this book, because of space constraints, few details are pro-vided and I can only give references. Note that I always have the nonexpert in mind.The idea is that those readers who are not experts in a particular field should at leastbe shown a road map for that field. This road map should organize the material in alogical manner that is as easy to understand and as motivated as possible. It shouldlay out the important results and indicate what one would have to learn if one wantedto study the field in more detail. For a really in-depth study of most of the major topicsthat we cover, the reader will have to consult the references.

    Another of my goals was to state everything absolutely correctly and not to makestatements that are only approximately correct. This is one reason why the book is solong. Occasionally, I had to digress a little or add material to the appendices in orderto define some concepts or state some theorems because, even though they did notplay a major role, they were nevertheless referred to either here or in [AgoM05]. Inthose cases involving more advanced material where there is no space to really getinto the subject, I at least try to explain it as simply and intuitively as possible. Oneexample of this is with respect to the Lebesque integral that is referred to in Chapter21 of [AgoM05], which forced the inclusion of Section D.4. Actually, the Lebesgue integral is also the only example of where a concept was not defined.

    Not all theorems stated in this book are proved, but at least I try to point out anypotential problems to the reader and give references to where the details can be foundin those cases where proofs are omitted, if so desired. Proofs themselves are not givenfor their own sake. Rather, they should be thought of more as examples because theytypically add insight to the subject matter. Although someone making a superficialpass over the mathematical topics covered in the book might get the impression thatthere is mathematics that has little relevance to geometric modeling, that is not thecase. Every bit of mathematics in this book and its appendices is used or referred tosomewhere here or in [AgoM05]. Sometimes defining a concept involved having todefine something else first and so on. I was not trying to teach mathematics for itsown interesting sake, but only in so far as it is relevant to geometric modeling, or atleast potentially relevant. When I say “potentially,” I am thinking of such topics asalgebraic and differential topology that currently appear in only minimal ways in mod-eling systems but obviously will some day play a more central role.

    It is assumed that the reader has had minimally three semesters of calculus anda course on linear algebra. An additional course on advanced calculus and modernalgebra would be ideal. The role of Appendices B–F is to summarize what is assumed.They consist mainly of definitions and statements of results with essentially no expla-

    vi Preface

  • nations. The reason for including them is, as stated earlier, to be self-contained.Readers may have learned the material at some point but forgotten the details, suchas a definition or the precise statement of a theorem. A reader who does not under-stand some particular material in the appendices may not understand the discussionat those places in the book where it is used. The biggest of the appendices is Appen-dix B, which consists of material from modern algebra. This appendix is needed forChapters 7, 8, and 10, although not that much of it is needed for Chapters 7 and 8.Only Chapter 10 on algebraic geometry needs a lot of that background. This is theone place where using this text in the context of a course would be a big advantageover reading the material on one’s own because an instructor who knows the mate-rial would actually be able to explain the important parts of it quite easily and quicklyeven to students who have not had a prior course on modern algebra. The actualapplications of Chapter 10 to geometric modeling do not require that much knowl-edge if one skips over the background and proofs of the theorems that lead up tothem. Hopefully, however, the reader with a minimal mathematics background willbe reduced to simply learning “formulas” in only a few places in this book.

    The extensive material on topology, in particular algebraic and differential topol-ogy, has heretofore not been found in books directed toward geometric modeling.Although this subject is slowly entering the field, its coming has been slow. Probablythe two main reasons for this are that computers are only now getting to be power-ful enough to be able to handle the complicated computations, and the materialinvolves exceptionally advanced mathematics that even mathematics majors wouldnormally not see until graduate school. It is not very surprising therefore that in caseslike this most of the advancement here will probably come from mathematicians whoeither switch their research interest to computer science or who want to use com-puters to make advances in their field. Having said that though, I also strongly feelthat there is much that can be explained to a nontopologist, and Chapters 6–8 are anattempt to do this. A similar comment applies to the algebraic geometry in Chapter10. It is because of my emphasis on explaining things that I suggested earlier thatmathematics students could also use this book to learn about this material, not justcomputer scientists.

    With regard to the bibliography, it is fairly small because the book is not addressedto mathematicians per se. This meant that many good but advanced references that I could have given, but whose intended audience is research mathematicians, areomitted. This lack of completeness is partially compensated by the fact that additionalreferences can be found in the references that are given.

    The numbering of items in this book uses the following format: x.y.z refers to itemnumber z in section y of chapter x. For example, Theorem 6.5.7 refers to the seventhitem of type theorem, proposition, lemma, or example in section 5 of Chapter 6. Algo-rithm 10.11.1 refers to the first algorithm in Section 11 of Chapter 10. Tables are num-bered like algorithms. Figures are numbered by chapter, so that Figure 9.21 refers tothe twenty-first figure in Chapter 9. Exercises at the end of chapters are numbered bysection.

    Cupertino, California Max K. Agoston

    Preface vii

  • Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v

    1 Linear Algebra Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.3 Angles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.4 Inner Product Spaces: Orthonormal Bases . . . . . . . . . . . . . . . . . . . . 71.5 Planes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141.6 Orientation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221.7 Convex Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301.8 Principal Axes Theorems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371.9 Bilinear and Quadratic Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441.10 The Cross Product Reexamined . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501.11 The Generalized Inverse Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531.12 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

    2 Affine Geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 632.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 632.2 Motions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

    2.2.1 Translations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672.2.2 Rotations in the Plane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 682.2.3 Reflections in the Plane . . . . . . . . . . . . . . . . . . . . . . . . . . . . 722.2.4 Motions Preserve the Dot Product . . . . . . . . . . . . . . . . . . . . 762.2.5 Some Existence and Uniqueness Results . . . . . . . . . . . . . . . 792.2.6 Rigid Motions in the Plane . . . . . . . . . . . . . . . . . . . . . . . . . . 822.2.7 Summary for Motions in the Plane . . . . . . . . . . . . . . . . . . . 852.2.8 Frames in the Plane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87

    2.3 Similarities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 942.4 Affine Transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

    2.4.1 Parallel Projections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1022.5 Beyond the Plane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105

    2.5.1 Motions in 3-space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1122.5.2 Frames Revisited . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118

    2.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

    Contents

    Contents

  • 3 Projective Geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1263.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1263.2 Central Projections and Perspectivities . . . . . . . . . . . . . . . . . . . . . . 1273.3 Homogeneous Coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1363.4 The Projective Plane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139

    3.4.1 Analytic Properties of the Projective Plane . . . . . . . . . . . . . . 1433.4.2 Two-Dimensional Projective Transformations . . . . . . . . . . . . 1523.4.3 Planar Maps and Homogeneous Coordinates . . . . . . . . . . . . 154

    3.5 Beyond the Plane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1583.5.1 Homogeneous Coordinates and Maps in 3-Space . . . . . . . . . 161

    3.6 Conic Sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1663.6.1 Projective Properties of Conics . . . . . . . . . . . . . . . . . . . . . . . 180

    3.7 Quadric Surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1903.8 Generalized Central Projections . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1963.9 The Theorems of Pascal and Brianchon . . . . . . . . . . . . . . . . . . . . . . 1993.10 The Stereographic Projection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2013.11 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205

    4 Advanced Calculus Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2084.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2084.2 The Topology of Euclidean Space . . . . . . . . . . . . . . . . . . . . . . . . . . 2084.3 Derivatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2184.4 The Inverse and Implicit Function Theorem . . . . . . . . . . . . . . . . . . 2324.5 Critical Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2404.6 Morse Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2494.7 Zeros of Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2524.8 Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2564.9 Differential Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264

    4.9.1 Differential Forms and Integration . . . . . . . . . . . . . . . . . . . . 2734.10 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277

    5 Point Set Topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2815.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2815.2 Metric Spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2825.3 Topological Spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2895.4 Constructing New Topological Spaces . . . . . . . . . . . . . . . . . . . . . . . 2985.5 Compactness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3045.6 Connectedness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3085.7 Homotopy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3095.8 Constructing Continuous Functions . . . . . . . . . . . . . . . . . . . . . . . . . 3135.9 The Topology of Pn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3155.10 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318

    6 Combinatorial Topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3216.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3216.2 What Is Topology? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3266.3 Simplicial Complexes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3286.4 Cutting and Pasting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333

    x Contents

  • 6.5 The Classification of Surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3386.6 Bordered and Noncompact Surfaces . . . . . . . . . . . . . . . . . . . . . . . . 3536.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355

    7 Algebraic Topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3587.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3587.2 Homology Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359

    7.2.1 Homology Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3597.2.2 Induced Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3757.2.3 Applications of Homology Theory . . . . . . . . . . . . . . . . . . . . 3847.2.4 Cell Complexes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3897.2.5 Incidence Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3997.2.6 The Mod 2 Homology Groups . . . . . . . . . . . . . . . . . . . . . . . 405

    7.3 Cohomology Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4097.4 Homotopy Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412

    7.4.1 The Fundamental Group . . . . . . . . . . . . . . . . . . . . . . . . . . . 4127.4.2 Covering Spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4227.4.3 Higher Homotopy Groups . . . . . . . . . . . . . . . . . . . . . . . . . . 434

    7.5 Pseudomanifolds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4387.5.1 The Degree of a Map and Applications . . . . . . . . . . . . . . . . . 4437.5.2 Manifolds and Poincaré Duality . . . . . . . . . . . . . . . . . . . . . . 446

    7.6 Where to Next: What We Left Out . . . . . . . . . . . . . . . . . . . . . . . . . . 4497.7 The CW Complex Pn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4537.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456

    8 Differential Topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4598.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4598.2 Parameterizing Spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4608.3 Manifolds in Rn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4658.4 Tangent Vectors and Spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4748.5 Oriented Manifolds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4838.6 Handle Decompositions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4898.7 Spherical Modifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4978.8 Abstract Manifolds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5008.9 Vector Bundles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5098.10 The Tangent and Normal Bundles . . . . . . . . . . . . . . . . . . . . . . . . . . 5198.11 Transversality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5288.12 Differential Forms and Integration . . . . . . . . . . . . . . . . . . . . . . . . . 5358.13 The Manifold Pn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5488.14 The Grassmann Manifolds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5508.15 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552

    9 Differential Geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5579.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5579.2 Curve Length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5589.3 The Geometry of Plane Curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5639.4 The Geometry of Space Curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5739.5 Envelopes of Curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 579

    Contents xi

  • 9.6 Involutes and Evolutes of Curves . . . . . . . . . . . . . . . . . . . . . . . . . 5839.7 Parallel Curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5869.8 Metric Properties of Surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5899.9 The Geometry of Surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5989.10 Geodesics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6209.11 Envelopes of Surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6389.12 Canal Surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6389.13 Involutes and Evolutes of Surfaces . . . . . . . . . . . . . . . . . . . . . . . 6409.14 Parallel Surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6439.15 Ruled Surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6459.16 The Cartan Approach: Moving Frames . . . . . . . . . . . . . . . . . . . . . 6499.17 Where to Next? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6599.18 Summary of Curve Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6659.19 Summary of Surface Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . 6679.20 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 669

    10 Algebraic Geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67410.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67410.2 Plane Curves: There Is More than Meets the Eye . . . . . . . . . . . . . 67710.3 More on Projective Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68410.4 Resultants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69010.5 More Polynomial Preliminaries . . . . . . . . . . . . . . . . . . . . . . . . . . 69510.6 Singularities and Tangents of Plane Curves . . . . . . . . . . . . . . . . . 70210.7 Intersections of Plane Curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71010.8 Some Commutative Algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71510.9 Defining Parameterized Curves Implicitly . . . . . . . . . . . . . . . . . . 72410.10 Gröbner Bases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72810.11 Elimination Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74510.12 Places of a Curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74710.13 Rational and Birational Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . 76410.14 Space Curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78210.15 Parametrizing Implicit Curves . . . . . . . . . . . . . . . . . . . . . . . . . . . 78610.16 The Dimension of a Variety . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79010.17 The Grassmann Varieties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79610.18 N-dimensional Varieties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79710.19 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 805

    Appendix A: Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 813

    Appendix B: Basic Algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 817B.1 Number Theoretic Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 817B.2 Set Theoretic Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 818B.3 Permutations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 821B.4 Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 823B.5 Abelian Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 831B.6 Rings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 835B.7 Polynomial Rings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 840B.8 Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 847

    xii Contents

  • B.9 The Complex Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 850B.10 Vector Spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 851B.11 Extension Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 855B.12 Algebras . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 859

    Appendix C: Basic Linear Algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 860C.1 More on Linear Independence . . . . . . . . . . . . . . . . . . . . . . . . . . . 860C.2 Inner Products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 862C.3 Matrices of Linear Transformations . . . . . . . . . . . . . . . . . . . . . . . 865C.4 Eigenvalues and Eigenvectors . . . . . . . . . . . . . . . . . . . . . . . . . . . 870C.5 The Dual Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 873C.6 The Tensor and Exterior Algebra . . . . . . . . . . . . . . . . . . . . . . . . . 875

    Appendix D: Basic Calculus and Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . 889D.1 Miscellaneous Facts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 889D.2 Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 892D.3 Differential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 894D.4 The Lebesgue Integral . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 896

    Appendix E: Basic Complex Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 898E.1 Basic Facts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 898E.2 Analytic Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 899E.3 Complex Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 902E.4 More on Complex Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 903E.5 Miscellaneous Facts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 905

    Appendix F: A Bit of Numerical Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . 907F.1 The Condition Number of a Matrix . . . . . . . . . . . . . . . . . . . . . . . 907F.2 Approximation and Numerical Integration . . . . . . . . . . . . . . . . . . 908

    Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 915Abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 915Abstract Algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 915Advanced Calculus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 915Algebraic Curves and Surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 915Algebraic Geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 916Algebraic Topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 916Analytic Geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 917Complex Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 917Conics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 917Cyclides . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 917Differential Geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 918Differential Topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 918Geodesics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 919Geometric Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 919Linear Algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 919Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 919Numerical Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 919

    Contents xiii

  • Offset Curves and Surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 920Projective Geometry and Transformations . . . . . . . . . . . . . . . . . . . . . . . . . 920Quadrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 920Real Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 920Topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 920

    Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 921

    Bibliographic Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 956

    Index of Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 959

    xiv Contents

  • C H A P T E R 1

    Linear Algebra Topics

    1.1 Introduction

    This chapter assumes a basic knowledge and familiarity of linear algebra that isroughly equivalent to what one would get from an introductory course in the subject.See Appendix B and C for the necessary background material. In particular, we assumethe reader is familiar with the vector space structure of n-dimensional Euclideanspace Rn and its dot product and associated distance function. The object of thischapter is to discuss some important topics that may not have been emphasized oreven covered in an introductory linear algebra course. Those readers with a weakbackground in abstract linear algebra and who have dealt with vectors mostly in thecontext of analytic geometry or calculus topics in R2 or R3 will also get a flavor of thebeauty of a coordinate-free approach to vectors. Proofs should not be skipped becausethey provide more practice and insight into the geometry of vectors. The fact is thata good understanding of (abstract) linear algebra and the ability to apply it is essen-tial for solving many problems in computer graphics (and mathematics).

    As in other places in this book we have tried to avoid generality for generality’ssake. By and large, the reader can interpret everything in the context of subspaces ofRn; however, there are parts in this chapter where it was worthwhile to phrase thediscussion more generally. We sometimes talk about inner product spaces, rather thanjust sticking to Rn and its dot product, and talk about vector spaces over other fields,the complex numbers C in particular. This was done in order to emphasize the generalnature of the aspect at hand, so that irrelevant details do not hide what is important.Vector spaces over the complex numbers will be important in later chapters.

    Geometry is concerned with lots of different types of spaces. This chapter is aboutthe simplest of these, namely, the linear ones, and some related topics. Hopefully,much of the material that is covered is review except that we shall approach thesubject here, like in many other places, with a vector approach. Sections 1.2–1.5review the definition and basic properties of k-dimensional planes in Rn. We also lookat the abstract definition of angle and some important concepts related to ortho-gonality, such as that of the orthogonal projection of a vector. Next, in Sections 1.6and 1.7 we discuss the extremely important concepts of orientation and convexity.

  • Some basic results on the diagonalization of maps and matrices in Section 1.8 leadto a discussion of bilinear maps and quadratic forms in Section 1.9. Section 1.10describes a general version of the three-dimensional cross product. Finally, Section1.11 defines the generalized inverse of a transformation and matrix along with severalapplications.

    1.2 Lines

    Our first goal in this chapter is to characterize linear subspaces of Euclidean spaceand summarize some basic facts about them. There is not much to say about points,the 0-dimensional linear subspaces, but the one-dimensional subspaces, namely,“straight” lines, are a special case that is worth looking at separately.

    First of all, let us consider lines in the plane. The usual definition of a line in thiscase is as the set of solutions to a linear equation.

    Definition. (The equation definition of a line in the plane) Any set L in R2 of the form

    (1.1)

    where a, b, and c are fixed real constants, is called a line. If a = 0, then the line iscalled a horizontal line. If b = 0, then the line is called a vertical line. If b π 0, then -a/b is called the slope of the line.

    Although an equation defines a unique line, the equation itself is not uniquelydefined by a line. One can multiply the equation for a line by any nonzero constantand the resultant equation will still define the same line. See Exercise 1.2.1.

    The particular form of the equation in our definition for a line is a good one froma theoretical point of view, but for the sake of completeness we list several other well-known forms that are often more convenient.

    The slope-intercept form: The line with slope m and y-intercept (0,b) is defined by

    (1.2)

    The point-slope form: The line through the point (x1,y1) with slope m is definedby

    (1.3)

    The two-point form: The line through two distinct points (x1,y1) and (x2,y2) isdefined by

    (1.4)

    Note that equations (1.2) and (1.3) above apply only to nonvertical lines.When one wants to define lines in higher dimensions, then one can no longer use

    a single equation and so we now give an alternative definition that works in all dimen-

    y yy yx x

    x x- =--

    -( )1 2 12 1

    1 .

    y y m x x- = -( )1 1 .

    y mx b= + .

    x y ax by c a b, , , , ,( ) + = ( ) π ( ){ }0 0

    2 1 Linear Algebra Topics

  • sions. It is based on the intuitive geometric idea that a line is defined by a point anda direction.

    Definition. (The point-direction-vector definition of a line) Any subset L of Rn ofthe form

    (1.5a)

    where p is a fixed point and v is a fixed nonzero vector in Rn, is called a line (throughp). The vector v is called a direction vector for the line L. By considering the compo-nents of a typical point x = p + tv in L separately, one gets equations

    . . .

    (1.5b)

    that are called the parametric equations for the line.

    In the case of the plane, it is easy to show that the two definitions of a line agree(Exercise 1.2.2). The definition based on the equation in (1.1) is an implicit defini-tion, meaning that the object was defined by an equation, whereas the definition using(1.5a) is an explicit definition, meaning that the object was defined in terms of a para-meterization. We can think of t as a time parameter and that we are walking alongthe line, being at the point p + tv at time t.

    Note that the direction vector for a line is not unique. Any nonzero multiple of vabove would define the same line. Direction vectors are the analog of the slope of aline in higher dimensions.

    1.2.1. Example. To describe the line L containing the points p = (0,2,3) and q = (-2,1,-1).

    Solution. The vector pq = (-2,-1,-4) is a direction vector for L and so parametricequations for L are

    1.2.2. Example. Suppose that the parametric equations for two lines L1 and L2 are:

    (1.6)

    Do the lines intersect?

    Solution. We must solve the equations

    y t

    z t

    = -= - +

    1 2

    2

    y t

    z t

    = += - +

    2

    1

    L L1 21 2: :x t x t= - = +

    x t

    y t

    z t

    = -= -= -

    2

    2

    3 4

    x p tv tn n n= + Œ, ,R

    x p tv

    x p tv1 1 1

    2 2 2

    = += +

    p v R+ Œ{ }t t ,

    1.2 Lines 3

  • for s and t. The first two equations imply that t = -1 and s = 0. Since these two valuesalso satisfy the third equation, the lines L1 and L2 intersect at the point (2,1,-2).

    Note. A common mistake when trying to solve a problem like that in Example 1.2.2is to use the same variable for both s and t. Just because lines intersect does not meanthat persons “walking” along the lines will get to the intersection point at the same“time.”

    Definition. Points are said to be collinear if they lie on the same line and non-collinear, otherwise.

    Definition. Let p, q ΠRn. The set

    (1.7)

    is called the segment from p to q and is denoted by [p,q]. The points of [p,q] are saidto lie between p and q.

    Note that [p,q] = [q,p] (Exercise 1.2.5). A segment basically generalizes the notionof a closed interval of the real line, which explains the notation, but the two conceptsare not quite the same when n = 1 (Exercise 1.2.6). The following proposition gives avery useful alternative characterization of a segment.

    1.2.3. Proposition. Let p, q ΠRn. Then

    (1.8)

    Proof. Let

    In order to show that [p,q] = S we must prove the two inclusions [p,q] Õ S andS Õ [p,q].

    To prove that [p,q] Õ S, let x Œ [p,q]. Then x = p + tpq for some t with 0 £ t £ 1.It follows that

    so that x Œ S.To prove that S Õ [p,q], let x Œ S. Since |px| + |xq| = |pq| = |px + xq|, the triangle

    inequality implies that the vectors px and xq are linearly dependent. Assume withoutloss of generality that px = txq. Then

    px xq pq pq pq+ = + - =t t1 ,

    S x px xq pq= + ={ }.

    p q x R px xq pq, =[ ] Π+ ={ }n .

    p pq+ Œ[ ]{ }t t 0 1,

    1 2

    2 1 2

    1 2

    - = ++ = -

    - + = - +

    t s

    t s

    t s

    4 1 Linear Algebra Topics

  • In other words,

    (1.9)

    It is easy to show that the only solutions to (1.9) are 0 £ t. But the equation px = txqcan be rewritten as

    which shows that x Œ [p,q] since 0 £ t/(1 + t) £ 1.

    The next proposition proves another fairly innocuous looking fact. It also plays akey role in the proofs of a number of future theorems.

    1.2.4. Proposition. Let p be a point on a line L. If c > 0, then there are two andonly two points x on L that satisfy the equation |px| = c.

    Proof. Let q be a point on L distinct from p. Then any point x on L has the form x = p + spq and hence c = |px| = |s| |pq|. The only solutions to |s| = c/|pq| are s = ±t,where t = c/|pq|. In other words,

    and the proposition is proved.

    Finally,

    Definition. Let p, v, q Œ Rn. If v π 0, then the ray from p in direction v, denoted byray(p,v), is defined by

    If p π q, then the ray from p through q, denoted by [pq >, is defined by

    1.3 Angles

    The intuitive notion of the angle between two vectors is something that one picks upearly, probably while studying Euclidean geometry in high school. In this section weshow that there is a very simple rigorous definition of this that is also very easy tocompute. Everything we do here holds for an arbitrary real vector space with an innerproduct, but, for the sake of concreteness, we restrict the discussion to Euclideanspace with its standard dot product.

    pq p pq> ( )[ = ,ray .

    ray t tp v p v,( ) = + £{ }0 .

    x p pq x p pq= + = -t or t

    x p pq= ++t

    t1

    t t+ = +1 1

    t txq xq xq xq+ = + .

    1.2 Lines 5

  • Definition. Let u, v Œ Rn. Define the angle q between the vectors u and v, denoted by–(u,v), as follows: If either u or v is the zero vector, then q is zero; otherwise, q is thatreal number such that

    Note the purely formal aspect of this definition and that we need the Cauchy-Schwarz inequality to insure that the absolute value of the quotient in (a) is not biggerthan 1 (otherwise there would be no such angle). The motivation behind the defini-tion is the law of cosines from Euclidean geometry shown in Figure 1.1. To see this,substitute |p|, |q|, and |p + q| for a, b, and c, respectively, and simplify the result.

    Now if |u| = 1, then

    which one will recognize as the length of the base of the right triangle with hypotenusev and base in the direction of u. See Figure 1.2. This means that we can give the fol-lowing useful interpretation of the dot product:

    Definition. Let u, v ΠRn. If the angle between the two vectors u and v is p/2, thenthey are said to be perpendicular and we shall write u ^ v. If the angle between themis 0 or p, they are said to be parallel and we shall write u || v.

    u v v n u∑ ( ) = is the signed length of “the orthogonal projection of on whenever ” .1

    u v v∑ = cos q,

    cos q q p=∑

    £ £u vu v

    , .and 0

    6 1 Linear Algebra Topics

    v

    u

    |u| = 1 u·v = |v| cos q

    |v| cos q

    q

    |v|

    Figure 1.2. Interpreting the dot product.

    aq

    b

    a2 + b2 – 2ab cos θ = c2

    c

    p

    q

    Figure 1.1. The law of cosines.

  • Definition. Two vectors u and v in an arbitrary vector space with inner product •are said to be orthogonal if u•v = 0.

    1.3.1. Theorem. Let u, v ΠRn.

    (1) u ^ v if and only if u and v are orthogonal.(2) u || v if and only if u and v are linearly dependent.

    Proof. Most of the theorem follows easily from the definitions. Use the Cauchy-Schwarz inequality to prove (2).

    Although the words “orthogonal” and “perpendicular” have different connota-tions, Theorem 1.3.1 shows that they mean the same thing and we have an extremelyeasy test for this property, namely, we only need to check that a dot product is zero.Checking whether two vectors are parallel is slightly more complicated. We mustcheck if one is a multiple of the other.

    Finally, note that if u = (u1,u2, . . . ,un) is a unit vector, then ui = u•ei = cosqi, whereqi is the angle between u and ei. This justifies the following terminology:

    Definition. If v is a nonzero vector, then the ith component of the unit vector is called the ith direction cosine of v.

    1.4 Inner Product Spaces: Orthonormal Bases

    This section deals with some very important concepts associated with arbitrary vectorspaces with an inner product. We shall use the dot notation for the inner product. Thereader may, for the sake of concreteness, mentally replace every phrase “vector space”with the phrase “vector subspace of Rn or Cn,” but should realize that everything wedo here holds in the general setting.

    Probably the single most important aspect of inner product spaces is the existenceof a particularly nice type of basis.

    Definition. If v1, v2, . . . , vn are vectors in an inner product space, we say that theyare mutually orthogonal if vi • vj = 0 for i π j. A set of vectors is said to be a mutuallyorthogonal set if it is empty or its vectors are mutually orthogonal.

    Definition. Let V be an inner product space and let B be a basis for V. If B is amutually orthogonal set of vectors, then B is called an orthogonal basis for V. If, inaddition, the vectors of B are all unit vectors, then B is called an orthonormal basis.In the special case where V consists of only the zero vector, it is convenient to call theempty set an orthonormal basis for V.

    Orthonormal bases are often very useful because they can greatly simplify com-putations. For example, if we wanted to express a vector v in terms of a basis v1, v2,. . . , vn, then we would normally have to solve the linear equations

    v v v v= + + +a a an n1 1 2 2 . . .

    1v

    v

    1.4 Inner Product Spaces: Orthonormal Bases 7

  • for the coefficients ai. On the other hand, if we have an orthonormal basis, then it iseasy to check that ai = v • vi and there is nothing to solve. Our first order of businesstherefore is to describe an algorithm, the Gram-Schmidt algorithm, which converts anarbitrary basis into an orthonormal one.

    The Gram-Schmidt algorithm is an algorithm that actually can be applied to anycollection of vectors and will produce an orthonormal basis for the space spanned bythese vectors. We shall illustrate how this process works in the case of two and threevectors.

    Let v1 and v2 be two nonzero vectors. Then u1 = (1/|v1|)v1 is a unit vector. We wantto find a unit vector u2 that is orthogonal to u1 and so that u1 and u2 span the samespace as v1 and v2. Consider Figure 1.3. If we could find the orthogonal vector w, thenall we would have to do is make w have unit length to get u2 (assuming that w is notzero). But w can easily be computed from the “orthogonal projection” v of v2 on u1and we pointed out in Section 1.3 that v could be found using the dot product. Thefollowing equations now summarize how one can compute the orthonormal basis u1and u2:

    (1.10)

    where

    To see that these computations really do produce orthogonal vectors it suffices to showthat the dot product of the vectors w and u1 is zero. But

    Next, suppose that we want to construct an orthonormal basis for the spacespanned by three vectors v1, v2, and v3. See Figure 1.4(a). First, apply the construc-

    w u v v u u uv u v u u u

    ∑ = - ∑( )[ ]∑= ∑ - ∑( ) ∑( )=

    1 2 2 1 1 1

    2 1 2 1 1 1

    0.

    w v v

    v v u u

    = -= ∑( )

    2

    2 1 1.

    uw

    w21

    =

    uv

    v11

    11

    =

    8 1 Linear Algebra Topics

    u2

    u1

    v2

    v1

    v

    w

    Figure 1.3. A simple orthogonal projection.

  • tion above to find an orthonormal basis for the space spanned by v1 and v2. Assumethat u1 and u2 form such a basis. Now find the third vector u3 by projecting v3 to thevector x in the subspace X spanned by u1 and u2. The difference w = v3 - x is a vectororthogonal to X that is then normalized to have unit length (assuming again that itis not zero). This leaves one question unanswered, namely, how does one compute x?The example in Figure 1.4(b) motivates the answer. We see that the projection of (1,2,3) onto the plane is (1,2,0). This vector is the sum of two vectors (1,0,0) and(0,2,0), which happen to be the orthogonal projections of (1,2,3) onto the vectors e1and e2, respectively. It turns out that the only important property of e1 and e2 is thatthese vectors form an orthonormal basis for the plane. We have now sketched the keyideas needed for the general case. This leads to the recursive construction describedin Algorithm 1.4.1.

    1.4 Inner Product Spaces: Orthonormal Bases 9

    X

    x

    u2

    u3

    v3

    v2v1

    u1

    w

    projection ofv3 onto X

    (1, 2, 3)

    (1, 2, 0)(0, 2, 0)

    (1, 0, 0)

    (a) (b)

    Figure 1.4. More orthogonal projections.

    Input: a set of vectors S = { v1,v2, º ,vk } Output: an orthonormal basis B = { u1,u2, º ,um } for span(S)

    If S = f , then return f .

    Let s = 1, B = f , and m = 0 .

    Step 1: If s > k, then return B. Step 2: Let

    w = vs - (vs ∑ u1) u1 - (vs ∑ u2) u2 - º - (vs ∑ um) u .m

    If w π 0 , then add um+1 = (1/|w|) w to B and increment m. Increment s. Go to Step 1.

    Algorithm 1.4.1. The Gram-Schmidt algorithm.

  • 1.4.1. Theorem. The Gram-Schmidt algorithm gives the correct result.

    Proof. There are two parts to proving that the algorithm works. We have to show

    (1) the vectors ui form an orthonormal set and(2) they span the same space as the vj.

    One uses induction in both cases. To prove (1) it suffices to check that w • ui = 0,i = 1, 2, . . . , m, which is straightforward. This shows that orthogonality is preservedas we go along.

    To prove (2), assume inductively that at the beginning of Step 2

    (1.11)

    The inductive hypothesis (1.11) implies that w belongs to span (v1,v2, . . . ,vs), andtherefore so does um+1. This and (1.11) shows that

    (1.12)

    Now solve the equation for w in Step 2 of the algorithm for vs. Using the inductivehypothesis (1.11), we see that vs lies in span(v1,v2, . . . ,vs-1,um) and this and anotheruse of the inductive hypothesis (1.11) shows that

    (1.13)

    The inclusions (1.12) and (1.13) imply that we actually have an equality of sets,proving (2) and the theorem (modulo some special cases such as w = 0 that we leaveto the reader).

    It should be clear that m = k in the Gram-Schmidt algorithm if and only if thevectors v1, v2, . . . , vk are linearly independent. In the worst case, where S is empty orv1 = v2 = . . . = vk = 0, then m = 0.

    1.4.2. Corollary. Every subspace of an inner product space has an orthonormal basis.

    1.4.3. Example. To find an orthonormal basis u1 and u2 for the subspace X in R3

    spanned by the vectors v1 = (2,-1,1) and v2 = (-1,4,0).

    Solution. Applying the Gram-Schmidt algorithm we get

    To get u2, let

    v v u u

    w v v

    = ∑( ) = - -( )= - = ( )

    2 1 1

    2

    2 1 1

    1 3 1

    , , ,

    , , .

    and

    uv

    v11

    11 1

    62 11= = -( ), , .

    span spans mv v v u u u1 2 1 2 1, , . . . , , , . . . , .( ) Õ ( )+

    span spanm su u u v v v1 2 1 1 2, , . . . , , , . . . , .+( ) Õ ( )

    span spans mv v v u u u1 2 1 1 2, , . . . , , , . . . , .-( ) = ( )

    10 1 Linear Algebra Topics

  • Then

    One can easily check that u1 and u2 are what we want.

    Definition. Let X be a subspace of an inner product space V. The orthogonal com-plement of X in V, denoted by X^, is defined by

    Every vector in X^ is called a normal vector for X.

    1.4.4. Theorem. If X is a subspace of an inner product space V, then the orthogo-nal complement X^ of X is a subspace of V and

    Conversely, if

    where Y is a subspace with the property that every vector in Y is normal to X, thenY = X^.

    Proof. It is an easy exercise, left to the reader, to show that X^ is a subspace. Weprove that V is a direct sum of X and X^. Let u1, u2, . . ., uk be an orthonormal basisfor X. Define a linear transformation T : V Æ V by

    It is easy to check that ker(T) = X^ and that v - T(v) belongs to ker(T). We also havethat

    These facts imply the first part of the theorem. We leave the reader to fill in the detailsand to prove the converse part (Exercise 1.4.1).

    Definition. An inner product space V is said to be the orthogonal direct sum oftwo subspaces X and Y if it is a direct sum of X and Y and if every vector of X isorthogonal to every vector of Y.

    By Theorem 1.4.4, if V is an orthogonal direct sum of X and Y, then Y = X^. Another consequence of Theorem 1.4.4 is that subspaces can be defined implicitly.

    v v v v= ( ) + - ( )( )T T .

    T or if kk kv v u u v u u v u u 0( ) = ∑( ) + ∑( ) + + ∑( ) =( )1 1 2 2 0. . . .

    V X Y= ≈ ,

    V X X= ≈ ^ .

    X v V v w w X^ = Œ ∑ = Œ{ }0 for all .

    uw

    w21 1

    111 3 1= = ( ), , .

    1.4 Inner Product Spaces: Orthonormal Bases 11

  • 1.4.5. Theorem. If X is a k-dimensional subspace of an n-dimensional innerproduct space V, then there exist n-k orthonormal vectors n1, n2, . . . , nn-k, so that

    Proof. Choose the vectors ni to be an orthonormal basis for the orthogonal complement of X.

    Now let X be a subspace of an inner product space V. Let v Œ V. Since V = X ≈X^, we can express v uniquely in the form v = x ≈ y, where x Œ X and y Œ X^.

    Definition. The vector x, denoted by v||, is called the orthogonal projection of v on Xand the vector y, denoted by v^, is called the orthogonal complement of v with respectto X.

    Note that in the definition, because of the symmetry of the direct sum operator,the orthogonal complement v^ of v with respect to X is also the orthogonal projec-tion of v on X^. The next theorem shows us how to compute orthogonal projectionsand complements.

    1.4.6. Theorem. Let u1, u2, . . . , uk, k ≥ 1, be any orthonormal basis for a subspaceX in an inner product space V. Let v Œ V. If v|| and v^ are the orthogonal projectionand orthogonal complement of v on X, respectively, then

    (1.14)

    and

    (1.15)

    Proof. Exercise 1.4.2.

    In Theorem 1.4.6 it is essential that we have an orthonormal basis, otherwise itis easy to come up with examples that show equations (1.14) and (1.15) are false.

    The next definition formalizes some common terminology.

    Definition. Let u π 0 and v be vectors in an inner product space. Then the orthogo-nal projection of v on u, denoted by v||, and the orthogonal complement of v with respectto u, denoted by v^, are defined by

    (1.16)

    and

    (1.17)v v vuu

    uu

    ^ = - ∑Êˈ¯ .

    v vuu

    uu

    || = ∑Êˈ¯

    v v v u u v u u v u u^ = - ∑( ) - ∑( ) - - ∑( )1 1 2 2 . . . .k k

    v v u u v u u v u u|| = ∑( ) + ∑( ) + + ∑( )1 1 2 2 . . . k k

    X u V n u= Œ ∑ = £ £ -{ }i for i n k0 1 .

    12 1 Linear Algebra Topics

  • Clearly, the orthogonal projection of v on u is the same as the orthogonal projec-tion of v on the subspace spanned by u and hence is really just a special case of theearlier definition. A similar comment holds for the orthogonal complement. Anotherway of looking at what we have established is that, given a subspace X, every vectorv can be decomposed into two parts, one “parallel” to X and the other orthogonal toit. See Figure 1.5.

    We finish this section with a look at some very important classes of matrices.

    Definition. An n ¥ n real matrix A is said to be orthogonal if AAT = ATA = I, that is,the inverse of the matrix is just its transpose.

    1.4.7. Lemma.

    (1) The transpose of an orthogonal matrix is an orthogonal matrix.(2) Orthogonal matrices form a group under matrix multiplication.(3) The determinant of an orthogonal matrix is ±1.(4) The set of orthogonal matrices with determinant +1 forms a subgroup of the

    group of orthogonal matrices.

    Proof. Easy.

    Definition. The group of nonsingular real n ¥ n matrices under matrix multiplica-tion is called the (real) linear group and is denoted by GL(n,R). The subgroup oforthogonal n ¥ n matrices is called the orthogonal group and is denoted by O(n). Anorthogonal matrix that has determinant +1 is called a special orthogonal matrix. Thesubgroup of O(n) of special orthogonal n ¥ n matrices is called the special orthogonalgroup and is denoted by SO(n).

    The groups SO(n) and O(n) play an important role in many areas of mathemat-ics and much is known about them and their structure. Here are two useful charac-terizations of orthogonal matrices.

    1.4.8. Theorem. There is a one-to-one correspondence between orthogonal matrices and orthonormal bases.

    1.4 Inner Product Spaces: Orthonormal Bases 13

    vv^

    Xvll

    Figure 1.5. Decomposing a vector withrespect to a subspace.

  • Proof. If we think of the rows of the matrix as vectors, then we get the corres-pondence by associating to each matrix the basis of Rn, which consists of the rows of the matrix. A similar correspondence is obtained by using the columns of thematrix.

    1.4.9. Theorem. Assume n ≥ 1. Let u1, u2, . . . , un and v1, v2, . . . , vn be orthonor-mal bases in a real inner product space V. If

    (1.18)

    then A = (aij) is an orthogonal matrix. Conversely, let A = (aij) be an orthogonal matrix.If u1, u2, . . ., un is an orthonormal basis and if v1, v2, . . . , vn are defined by equation(1.18), then the v’s will also be an orthonormal basis.

    Proof. The theorem follows from the following identities

    There is a complex analog of an orthogonal real matrix.

    Definition. An n ¥ n complex matrix A is said to be unitary if AT = AT = I, thatis, the inverse of the matrix is just its conjugate transpose.

    Lemma 1.4.7 remains true if we replace the word “orthogonal” with the word“unitary.” In particular, the unitary matrices form a group like the orthogonal ones.

    Definition. The group of nonsingular complex n ¥ n matrices under matrix multi-plication is called the (complex) linear group and is denoted by GL(n,C). The subgroupof unitary n ¥ n matrices is called the unitary group and is denoted by U(n). A unitarymatrix that has determinant +1 is called a special unitary matrix. The subgroup of U(n)of special unitary n ¥ n matrices is called the special unitary group and is denoted bySU(n).

    The analogs of Theorems 1.4.8 and 1.4.9 hold in the complex case. We omit thedetails. See, for example, [Lips68] or [NobD77]. We shall run into orthogonal andunitary matrices again later in this chapter and in Chapter 2 when we talk about distance preserving maps or isometries.

    1.5 Planes

    Next, we define the higher-dimensional linear subspaces of Euclidean space. Certainlyvector subspaces of Rn should be such spaces, but “translations” of those should countalso.

    AA

    dst s t sj jj

    n

    tj jj

    n

    sj tjj

    n

    a a a a= ∑ =ÊËÁ

    ˆ¯̃

    ∑ÊËÁ

    ˆ¯̃

    == = =Â Â Âv v u u

    1 1 1

    .

    v u Ri ij jj

    n

    ija a= Œ=Â

    1

    , ,

    14 1 Linear Algebra Topics

  • Definition. Any subset X of Rn of the form

    (1.19a)

    where p is a fixed point and the v1, v2, . . . , vk are fixed linearly independent vectorsin Rn, is called a k-dimensional plane (through p). The dimension, k, of X will bedenoted by dim X. The vectors v1, v2, . . . , vk are called a basis for the plane.

    Clearly, an alternative definition of a k-dimensional plane through a point p wouldbe to say that it is any set X of the form

    (1.19b)

    where V is a k-dimensional vector subspace of Rn. Furthermore, the subspace V isuniquely determined by X (Exercise 1.5.1).

    The (n - 1)-dimensional planes in Rn are especially interesting.

    Definition. Any subset X of Rn of the form

    (1.20)

    where n is a fixed nonzero vector of Rn and d is a fixed real number, is called a hyperplane.

    Note that if n = (a1,a2, . . . ,an) and p = (x1,x2, . . . ,xn), then the equation in (1.20)is equivalent to the usual form

    (1.21)

    of the equation for a hyperplane. Note also that if p0 belongs to the hyperplane, thenby definition d = n • p0 and we can rewrite the equation for the hyperplane in the form

    (1.22)

    Equation (1.22) says that the hyperplane X consists of those points p with the prop-erty that the vector p - p0 is orthogonal to the vector n. See Figure 1.6.

    n p p∑ -( ) =0 0.

    a x a x a x dn n1 1 2 2+ + + =. . .

    p n p∑ ={ }d ,

    X p v v V= + Œ{ },

    X p v v v R= + + + + Œ{ }t t t t t tk k k1 1 2 2 1 2. . . , , . . . , ,

    1.5 Planes 15

    X

    n

    p0 p

    Figure 1.6. The point-normal definitionof a hyperplane.

  • Definition. Equation (1.22) is called the point-normal form of the equation for thehyperplane defined by (1.20) or (1.21). The vector n is called a normal vector to thehyperplane.

    1.5.1. Example. Consider the hyperplane defined by z = 0. This equation can berewritten in the form

    Note that (0,0,0) is a point in the hyperplane and (0,0,1) is a normal vector for it.

    The next proposition justifies the phrase “plane” in the word “hyperplane.”

    1.5.2. Proposition.

    (1) A hyperplane X in Rn is an (n - 1)-dimensional plane. If X is defined by theequation n • p = d, then any basis for the vector subspace

    is a basis for X.(2) Conversely, every (n - 1)-dimensional plane in Rn is a hyperplane.

    Proof. To prove (1) note first that K is a vector subspace. This can be seen either bya direct proof or by observing that K is the kernel of the linear transformation

    defined by

    It follows easily from Theorem B.10.3 that K is an (n - 1)-dimensional vector sub-space of Rn. If p0 is any point of X, then it is easy to show that

    proving the first part of the lemma. The converse, part (2), follows from Theorem1.4.5. Exercise 1.5.2 asks the reader to fill in missing details.

    1.5.3. Example. To find a basis for the (hyper)plane X in R3 defined by 2x + y - 3z = 6.

    Solution. There will be two vectors v1 and v2 in our basis. We use Proposition1.5.2(1). The vector n = (2,1,-3) is a normal vector for our plane. Therefore, to find v1and v2 is to find a basis for the kernel K of the map

    p n pÆ ∑ .

    X p q q K= + Œ{ }0 ,

    T p n p( ) = ∑ .

    T n: R RÆ

    K p R n p= Œ ∑ ={ }n 0

    0 0 0 0 1 0 0x y z-( ) + -( ) + -( ) = .

    16 1 Linear Algebra Topics

  • The direct approach is to solve the equation n • p = 0, that is, 2x + y - 3z = 0, for twononcollinear points v1 and v2. Alternatively, compute three noncollinear points p0, p1,and p2 in X and set v1 = p0p1 and v2 = p0p2. For example, p0 = (1,1,-1), p1 = (3,0,0),and p2 = (0,6,0) would give v1 = (2,-1,1) and v2 = (-1,5,0). By construction these vectorsv1 and v2 will also be a basis for K. The first approach that involves solving an equa-tion for only two points rather than solving the equation 2x + y - 3z = 6 for threepoints is obviously simpler; however, in other problems a plane may not be definedby an equation.

    Example 1.5.3 shows how one can find a basis for a plane if one knows somepoints in it. A related question in the case of hyperplanes is to find the equation forit given some points in it. To answer that question in R3 one can use the cross product.

    Definition. Let v, w Œ R3. Define the cross product v ¥ w Œ R3 by

    (1.23)

    Now, formula (1.23) is rather complicated. The standard trick to make it easier toremember is to take the formal determinant of the following matrix:

    The coefficients of the symbols i, j, and k will then be the x-, y-, and z-component,respectively, of the cross product.

    We shall look at the cross product and its properties more carefully later in Section1.10. Right now we shall only make use of the fact that the cross product of two vectorsproduces a vector that is orthogonal to both of these vectors, something easily checkedfrom the formula.

    1.5.4. Example. To find an equation for the hyperplane that contains the points p = (1,0,1), q = (1,2,0), and r = (0,0,3).

    Solution. We have that

    Therefore, an equation for the plane is

    which reduces to

    If we compare arbitrary k-dimensional planes and hyperplanes, we see that theformer have so far only an explicit definition in terms of parameterizations whereas

    4 2 6x y z+ + = .

    4 1 2 1 0 1 0, , , , , , ,( ) ∑ ( ) - ( )( ) =x y z

    pq pr pq pr= -( ) = -( ) ¥ = ( )0 2 1 1 0 2 4 1 2, , , , , , , , .and

    i j k

    v v v

    w w w1 2 3

    1 2 3

    Ê

    ËÁÁ

    ˆ

    ¯˜˜

    v w¥ = - - -( )v w v w v w v w v w v w2 3 3 2 3 1 1 3 1 2 2 1, , .

    1.5 Planes 17

  • the latter can also be defined implicitly via an equation using a normal vector. Actu-ally, Theorem 1.4.5 corrects this situation and shows that an arbitrary k-dimensionalplane X can also be defined by means of normal vectors and hence an equation in thefollowing sense: If p0 is any point in the plane, then there exist n-k orthonormalvectors n1, n2, . . . , nn-k, so that

    (1.24)

    Definition. Equation (1.24) is called the point-normals form of the equation for theplane X.

    Now normal vectors to hyperplanes are not unique, because any nonzero multi-ple will determine the same hyperplane.

    1.5.5. Lemma. If n1 and n2 are two normal vectors for a hyperplane X, then n1 andn2 are parallel.

    Proof. By hypothesis, X is defined by equations

    Replacing n2 by a nonzero multiple if necessary, we may assume that d1 = d2.Therefore,

    for all p in X. It follows that

    and

    define the same hyperplane Y. But Y is an (n - 1)-dimensional vector subspace of Rnand so has a unique one-dimensional orthogonal complement (Theorem 1.4.4). Sincethe normal vectors n1 and n2 belong to this complement, they must be multiples ofeach other and the lemma is proved.

    Lemma 1.5.5 justifies the following definition:

    Definition. Two hyperplanes are said to be parallel if they have parallel normalvectors. Two hyperplanes are said to be orthogonal if they have orthogonal normalvectors. A vector is said to be parallel or orthogonal to a hyperplane if it is orthogonalor parallel, respectively, to a normal vector of the hyperplane.

    Although we shall not do so here (except in the case of “oriented” hyperplaneslater on), it is actually possible to define an angle between arbitrary planes. See[IpsM95], for example. One could then define parallel and orthogonal in terms of thatangle like we did for vectors. At any rate, with our definition, we are calling any two

    n p2 0∑ =

    n p1 0∑ =

    n p n p1 2∑ = ∑

    n pi id∑ = .

    X p n p p= ∑ -( ) = £ £ -{ }i for i n k0 0 1 .

    18 1 Linear Algebra Topics

  • hyperplanes defined by equations n • p = d1 and n • p = d2 parallel. They also havethe same bases. It is useful to generalize these definitions.

    Definition. Let X and Y be s- and t-dimensional planes, respectively, with s £ t. If Yhas a basis v1 , v2 , . . . , vt , so that v1 , v2 , . . . , vs is a basis for X, then we say that Xis parallel to Y and Y is parallel to X.

    1.5.6. Lemma. In the case of hyperplanes the two notions of parallel agree.

    Proof. Exercise 1.5.5.

    Next, we want to extend the notion of orthogonal projection and orthogonal com-plement of vectors to planes. Let X be a k-dimensional plane with basis v1, v2, . . . , vk.Let X0 be the vector subspace generated by the vectors vi, that is,

    Note that X0 is a plane through the origin parallel to X.

    1.5.7. Lemma. The plane X0 is independent of the choice of basis for X.

    Proof. Exercise 1.5.6.

    Definition. Let v be a vector. The orthogonal projection of v on X is the orthogonalprojection of v on X0. The orthogonal complement of v with respect to X is the orthog-onal complement of v with respect to X0.

    By Lemma 1.5.7, the orthogonal projection of a vector on a plane and its orthog-onal complement is well defined. We can use Theorem 1.4.6 to compute them.

    A related definition is

    Definition. A vector is said to be parallel to a plane if it lies in the subspace spannedby any basis for the plane. A vector is said to be orthogonal to a plane if it is orthog-onal to all vectors in any basis for the plane. More generally, a plane X is said to beparallel to a plane Y if every vector in a basis for X is parallel to Y and X is orthogo-nal to Y if every vector in a basis for X is orthogonal to Y.

    It is easy to show that the notion of a vector or plane being parallel or orthogo-nal to another plane does not depend on the choice of bases for the planes. Note that,as a special case, a vector will be parallel to a line if and only if it is parallel to anydirection vector for the line. Another useful observation generalizes and makes moreprecise a comment in the last section. Specifically, given an arbitrary plane X in Rn,any vector v in Rn can be decomposed into a part that is parallel to X and a part thatis orthogonal to it. See Figure 1.5 again. Finally, the new notion of parallel and orthog-onal planes agrees with the earlier one.

    1.5.8. Example. To find the equation for the plane X in R3 through the point p0 =(1,3,2), which is parallel to the line

    X v v v0 1 2= ( )span k, , . . . , .

    1.5 Planes 19

  • and orthogonal to the plane x - z = 2 .

    Solution. If n = (a,b,c) is a normal for X, then n must be orthogonal to the direc-tion vector (3,-1,0) for the given line and orthogonal to the normal (1,0,-1) for thegiven plane, that is,

    and

    Solving these two equations gives that b = 3a and c = a. In other words, (a,3a,a) is anormal vector for X. It follows that

    or

    is an equation for X.

    We finish this section with two more definitions. The first generalizes the half-planes Rn+ and Rn-.

    Definition. Let p0, n Œ Rn with n π 0. The sets

    and

    are called the halfplanes determined by the hyperplane n • (p - p0) = 0. A halfline isa halfplane in R.

    A hyperplane in Rn divides Rn into three parts: itself and the two halfplanes oneither “side” of it. Figure 1.7 shows the two halfplanes in the plane defined by the line(hyperplane) 2x + 3y - 6 = 0.

    Sometimes one needs to talk about the smallest plane spanned by a set.

    Definition. Let X Õ Rn. The affine hull or affine closure of X, denoted by aff (X), isdefined by

    The following lemma justifies the definition of the affine hull of a set:

    aff X P P X( ) = « { }is a plane which contains .

    p R n p pŒ ∑ -( ) £{ }n 0 0

    p R n p pŒ ∑ -( ) ≥{ }n 0 0

    x y z+ + =3 12

    1 3 1 1 3 2 0, , , , , ,( ) ∑ ( ) - ( )( ) =x y z

    a c- = 0.

    3 0a b- =

    x t

    y t

    z

    = += -=

    2 3

    7

    20 1 Linear Algebra Topics

  • 1.5.9. Lemma.

    (1) The intersection of an arbitrary number of planes is a plane.(2) If X is a plane, then aff (X) = X.

    Proof. This is left as an exercise for the reader (Exercises 1.5.3 and 1.5.4).

    It follows from the lemma that affine hulls are actually planes. One can also easilysee that aff(X) is contained in any plane that contains X, which is why one refers toit as the “smallest” such plane.

    1.5.10. Theorem. Let p0, p1, . . . , pk ΠRn. Then

    Proof. Exercise 1.5.8.

    Let X and Y be two planes in Rn. The definition implies that X and Y are the trans-lations of unique vector subspaces V and W, respectively, that is,

    for some p, q ΠRn.

    Definition. The planes X and Y in Rn are said to be transverse if

    Two transverse lines in R3 are said to be skew.

    Intuitively, two planes are transverse if their associated subspaces V and W spanas high-dimensional space as possible given their dimensions. To put it another way,the intersection of V and W should be as small as possible. Sometimes this is referredto as the planes being in general position. For example, the x- and y-axes are trans-verse in Rn, but the x-axis and the parallel line defined by y = 1 are not. The xy- andyz-plane are transverse in R3 but not in R4.

    dim max dim dimV W V W«( ) = ( ) + ( ) -{ }0, .n

    X p v v V Y q w w W= + Œ{ } = + Œ{ }and

    aff t t tk k k ip p p p p p p p R00 1 0 1 1 0, , . . . , . . .{ }( ) = + + + Œ{ }

    1.5 Planes 21

    2x + 3y – 6 = 0

    2x + 3y – 6 ≥ 0

    2x + 3y – 6 ≤ 0

    Figure 1.7. The halfplanes defined by the line2x + 3y - 6 = 0.

  • 1.6 Orientation

    This section is an introduction to the concept of orientation. Although this intuitiveconcept is familiar to everyone, probably few people have thought about what it meansand how one could give a precise definition.

    The notion of orientation manifests itself in many different contexts. In everydayconversation one encounters phrases such as “to the left of,” “to the right of,” “clock-wise,” or “counterclockwise.” Physicists talk about right- or left-handed coordinatesystems. In computer graphics, one may want to pick normals to a planar curve in aconsistent way so that they all, say, point “inside” the curve. See Figure 1.8. A similarquestion might be asked for normals in the case of surfaces. How can one tell in asystematic way that our choice of normals is “consistent”? What does this really mean?

    Probably the easiest way to demonstrate the orientability property for surfaces isin terms of the number of “sides” that they have. Consider the cylinder in Figure 1.9(a).This surface has the property that if one were a bug, the only way to get from the“outside” to the “inside” would be to crawl over the edge. We express this by sayingthat the cylinder is “two-sided” or orientable. Now, a cylinder can be obtained froma strip of paper by gluing the two ends together in the obvious way. If, on the otherhand, we take this same strip of paper and first give it a 180-degree twist before weglue the ends together, then we will get what is called a Moebius strip (discovered byA.F. Moebius and independently by J.B. Listing in 1858). See Figure 1.9(b). Although

    22 1 Linear Algebra Topics

    p2

    p3

    p4

    p5

    p6

    p7p1

    N1

    N2N3 N4

    N5

    N6

    Figure 1.8. Uniformly oriented normals.

    Meridian

    Cylinder Moebius Strip

    (a) (b)Figure 1.9. Induced orientations

    along paths.

  • the strip has two sides at any given point, we can get from one side to the other bywalking all the way around the strip parallel to the meridian. The Moebius strip is a“one-sided” or nonorientable surface. In general, a simple-minded definition is to saythat a surface S is orientable (nonorientable) if one cannot (can) get from one side ofS at a point to the other side by walking along the surface.

    One can define orientability also in terms of properties that relate more directlyto the intuitive meaning of “orient.” For example, an orientable surface is one whereit is possible to define a consistent notion of left and right or clockwise and counter-clockwise. But what does “consistent” mean? If two persons are standing at differentpoints of a surface and they each have decided what to call clockwise, how can theydetermine whether their choices are consistent (assuming that they cannot see eachother)? One way to answer this question is to have one of them walk over to wherethe other one is standing and then compare their notions of clockwise. This leads tothe following approach to defining a consistent orientation at every point of a surfaceS. Starting at a point p on the surface choose an orientation at p by deciding whichof the two possible rotations around the point is to be called clockwise. Now let q beany other point of S (q may be equal to p). Walk to q along some path, all the whileremembering which rotation had been called clockwise. This will induce a notion ofclockwise for rotations at q, and hence an orientation at q. Unfortunately, there aremany paths from p to q (nor is there a unique shortest path in general) and, althoughthis may not seem immediately obvious, different paths may induce different orien-tations. If an orientation at p always induces the same orientation at every point ofthe surface no matter which path we take to that point, then S is called orientable.Figure 1.9(b) shows that walking around the meridian of the Moebius strip will inducean orientation back at the starting point that is opposite to the one picked at the begin-ning. Therefore, we would call the Moebius strip nonorientable, and our new defini-tion is compatible with the earlier one.

    Orientability is an intrinsic property of surfaces. F. Klein was the first to observethis fact explicitly in 1876. The sphere is orientable, as are the torus (the surface of adoughnut) and double torus (the surface of a solid figure eight) shown in Figure 1.10.Actually, since the torus will be a frequent example, this is a good time to give a slightlymore precise definition of it. It is a special case of a more general type of surface.

    Definition. A surface of revolution in R3 is a space S obtained by revolving a planarcurve about a line in that plane called the axis of revolution. A meridian of S is a con-

    1.6 Orientation 23

    Torus Double Torus

    Figure 1.10. Orientable surfaces.

  • nected component of the intersection of S and a plane through the axis of revolution.A circle of latitude of S is a connected component of the intersection of S and a planeorthogonal to the axis of revolution. A torus is a surface of revolution where the curvebeing revolved is a circle that does not intersect the axis of revolution.

    See Figure 1.11. Note that meridians of surfaces of revolution meet their circlesof latitude in a single point. Note also that a surface of revolution may not actuallybe a “surface” if the curve being revolved is not chosen carefully, for example, if itintersects the axis. (The term “surface” will be defined carefully in Chapter 5.) Sur-faces of revolution are also orientable.

    There are surfaces without boundary that are nonorientable and the reader ischallenged to find one on his own (or wait until Chapter 6). One word of cautionthough: Nonorientable surfaces without boundary cannot be found in R3 (see Exer-cise 6.5.1.). One needs a fourth dimension.

    Enough of this intuitive discussion of orientability. Let us move on to mathemat-ical definitions. In this section we define the most basic concept, namely, what ismeant by the orientation of a vector space. This corresponds to a definition of thelocal concept, that is, the notion of an orientation at a point.

    Consider the problem of trying to define an orientation at the origin of R2. Let(v1,v2) be an ordered basis. See Figure 1.12. We could use this ordered pair to suggestthe idea of counterclockwise motion. The only trouble is that there are many orderedbases for R2. For example, the pair (w1,w2) in Figure 1.12 also corresponds to coun-

    24 1 Linear Algebra Topics

    circle of latitude

    axis of revolution

    meridian

    Figure 1.11. A surface of revolution.

    w2w1

    v1

    v2

    Figure 1.12. Using ordered bases todefine an orientation.

  • terclockwise motion. Therefore, we need an appropriate equivalence relation. The keyto defining this relation is the matrix relating two ordered bases.

    Let (v1,v2) and (w1,w2) be two ordered bases. Suppose that

    for aij ΠR. Define (v1,v2) to be equivalent to (w1,w2) if the determinant of the matrix(aij) is positive. Since we are dealing with bases, we know that the aij exist and areunique and that the matrix (aij) is nonsingular. It is easy to see that our relation is anequivalence relation and that we have precisely two equivalence classes because thenonzero determinant is either positive or negative. We could define an orientation ofR2 to be such an equivalence class. As a quick check to see that we are getting whatwe want, note that if w1 = v2 and w2 = v1, then

    and the determinant of this matrix is -1, so that (v1,v2) and (v2,v1) determine differ-ent equivalence classes.

    Because we only used vector space concepts, it is easy to generalize what we justdid.

    Definition. Let B1 = (v1,v2, . . . ,vn) and B2 = (w1,w2, . . . ,wn) be ordered bases for avector space V and let

    We say that B1 is equivalent to B2, and write B1 ~ B2 if the determinant of the matrix(aij) is positive.

    1.6.1. Lemma. ~ is an equivalence relation on the set of ordered bases for V withprecisely two equivalence classes.

    Proof. Exercise 1.6.1.

    Definition. An orientation of a vector space V is defined to be an equivalence class of ordered bases of V with respect to the relation ~. Given one orientation of V,then the other one is called the opposite orientation. The equivalence class of an orderedbasis (v1,v2, . . . ,vn) will be denoted by [v1,v2, . . . ,vn]. We shall say that the ordered basis(v1,v2, . . . ,vn) induces or determines the orientation [v1,v2, . . . ,vn]. An oriented vectorspace is a pair (V,s), where V is vector space and s is an orientation of it.

    1.6.2. Example. To show that the ordered bases ((1,3),(2,1)) and ((1,1),(2,0)) deter-mine the same orientation of the plane.

    Solution. See Figure 1.13. Note that

    w v Ri ij jj

    n

    ija where a= Œ=Â

    1

    , .

    aij( ) = Êˈ¯

    0 1

    1 0

    v w wi i ia a= +1 1 2 2,

    1.6 Orientation 25

  • and

    1.6.3. Example. To show that the ordered bases ((1,3),(2,1)) and ((3,-1),(-1,3))determine different orientations of the plane.

    Solution. See Figure 1.13. Note that

    and

    Since arbitrary vector spaces do not have any special bases, one typically cannottalk about a “standard” orientation, but can only compare ordered bases as towhether they determine the same orientation or not. In the special case of Rn we dohave the standard basis (e1,e2, . . . ,en) though.

    det-

    ËÁ

    ˆ

    ¯˜ = - <

    1 275

    65

    85

    0.

    3 1 1 3 2 2 1

    1 375

    1 365

    2 1

    , , ,

    , , ,

    -( ) = -( ) + ( )

    -( ) = ( ) - ( )

    det

    15

    25

    25

    65

    2 0-

    Ê

    Ë

    ÁÁÁ

    ˆ

    ¯

    ˜˜̃ = > .

    1115

    1 325

    2 1

    2 025

    1 365

    2 1

    , , ,

    , , ,

    ( ) = ( ) + ( )

    ( ) = - ( ) + ( )

    26 1 Linear Algebra Topics

    (–1,3) (1,3)

    (1,1)(2,1)

    (2,0)

    (3,–1)

    Figure 1.13. Ordered bases.

  • Definition. [e1,e2, . . . ,en] is called the standard orientation of Rn.

    The standard orientation corresponds to what is called a right-handed coordinatesystem and the opposite orientation to a left-handed coordinate system.

    It should be pointed out that the really important concept here is not the formaldefinition of an orientation but rather the associated terminology. It is phrases like“these two ordered bases determine the same or opposite orientations” or “this basisinduces the standard or non-standard orientation of Rn” that the reader needs tounderstand.

    Solving linear equations can be tedious and therefore it is nice to know that thereis a much simpler method for determining whether or not ordered bases determinethe same orientation or not in the case of Rn.

    1.6.4. Lemma. Two ordered bases (v1,v2, . . . ,vn) and (w1,w2, . . . ,wn) of Rn deter-mine the same orientation if and only if

    have the same sign.

    Proof. The details of the proof are left to the reader. The idea is to relate both basesto the standard ordered basis (e1,e2, . . . ,en).

    1.6.5. Example. The solutions to Examples 1.6.2 and 1.6.3 above are much easierusing Lemma 1.6.4. One does not have to solve any linear equations but simply hasto compute the following determinants:

    Definition. Let V be a vector space. A nonsingular linear transformation T : V Æ Vis said to be orientation preserving (or sense preserving) if (v1,v2, . . . ,vn) and(T(v1),T(v2), . . . ,T(vn)) determine the same orientation of V for all ordered bases (v1,v2,. . . ,vn) of V. If T is not orientation preserving then it is said to be orientation revers-ing (or sense reversing). More generally, if (V,s) and (W,t) are two oriented n-dimensional vector spaces and if T : V Æ W is a nonsingular linear transformation(that is, an isomorphism), then T is said to be orientation preserving if t = [T(v1),T(v2), . . . ,T(vn)] for all ordered bases (v1,v2, . . . ,vn) of V with the property that s =[v1,v2, . . . ,vn]; otherwise, T is said to be orientation reversing.

    The identity map for a vector space is clearly orientation preserving. Exercise 1.6.7asks you to show that whether or not a map is orientation preserving or reversing can

    det det det1 3

    2 15

    1 1

    2 02

    3 1

    1 38ÊË

    ˆ¯ = -

    ÊË

    ˆ¯ = -

    --

    ÊË

    ˆ¯ =

    det det

    v

    v

    v

    w

    w

    w

    1

    1

    1

    1

    M M

    n

    n

    n

    n

    and- -

    Ê

    Ë

    ÁÁÁÁ

    ˆ

    ¯

    ˜˜˜̃

    Ê

    Ë

    ÁÁÁÁ

    ˆ

    ¯

    ˜˜˜̃

    1.6 Orientation 27

  • be determined by checking the property on a single ordered basis. In the case of anarbitrary linear transformation from a vector space to itself there is another simpletest for when it is orientation preserving or reversing.

    1.6.6. Theorem. Let V be a vector space and let T : V Æ V be a nonsingular lineartransformation. The transformation T is orientation preserving if and only if det(T) > 0.

    Proof. This theorem follows immediately from the definitions that are involved.

    1.6.7. Theorem. Let V be a vector space and let T, Ti : V Æ V be nonsingular lineartransformations.

    (1) The transformation T is orientation preserving if and only if T-1 is.(2) Let T = T1 � T2 � . . . � Tk : V Æ V. The transformation T is orientati