Chapter 4 Vectors
4.3 Vectors vs Points
4.3.2 The Relationship Between Points and Vectors
Vectors are used to describe displacements, and therefore, they can describe relative positions. Points are used to specify positions. We have just established in Section 4.3.1 that any method of specifying a position will be relative. Therefore, we must conclude that points are relative. They are relative to the origin of the coordinate system used to specify their coordinates. This leads us to the relationship between points and vectors.
Figure 4.7 illustrates how the point (x, y) is related to the vector [x, y], given arbitrary values for x and y.
Chapter 4: Vectors
41
Figure 4.7: The relationship between points and vectors
As you can see, if we start at the origin and move by the amount specified by the vector [x, y], we will end up at the location described by the point (x, y). Another way to say this is that the vector [x, y] gives the displacement from the origin to the point (x, y).
While this seems obvious, it is important to understand that points and vectors are conceptu- ally distinct, but mathematically equivalent. This confusion between “points” and “vectors” can be a stumbling block for beginners, but it needn’t be a problem for you. When you think of a loca- tion, think of a point and visualize a dot. When you think of a displacement, think of a vector and visualize an arrow.
In many cases, displacements are from the origin, and so the distinction between points and vectors will be a fine one. However, we will often deal with quantities that are not relative to the origin, or any other point for that matter. In these cases it will be important to visualize these quan- tities as an arrow rather than a point.
The math we will develop in the following chapters operates on “vectors” rather than “points.” Keep in mind that any point can be represented as a vector from the origin.
4.4 Exercises
1. Let:a. Identify a, b, and c as row or column vectors, and give the dimension of each vector. b. Compute by+cw+ax+bz.
2. Identity the quantities in each of the following sentences as scalar or vector. For vector quantities, give the magnitude and direction. (Note: some directions may be implicit.) a. How much do you weigh?
b. Do you have any idea how fast you were going? c. It’s two blocks north of here.
d. We’re cruising from Los Angeles to New York at 600mph, at an altitude of 33,000ft.
3. Give the values of the following vectors:
4. Identify the following statements as true or false. If the statement is false, explain why. a. The size of a vector in a diagram doesn’t matter. We just need to draw it in the right place. b. The displacement expressed by a vector can be visualized as a sequence of axially aligned
displacements.
c. These axially aligned displacements from the previous question must occur in the proper order.
d. The vector [x, y] gives the displacement from the point (x, y) to the origin.
C h a p t e r 5
Operations on
Operations on
Vectors
In Chapter 4, we discussed what vectors are geometrically and mentioned that the term vector has a precise definition in mathematics. This chapter describes in detail the mathematical operations we perform on vectors. For each operation, we will first define the mathematical rules for per- forming the operation and then describe the geometric interpretations of the operation.
45
This chapter is about operations on vectors. It is divided into twelve main sections.
n Section 5.1 discusses the difference between the information found in a linear alge- bra textbook and the information applicable for geometrical operations.
n Section 5.2 discusses some notational conventions we will use in this book to make the data type of variables clear.
n Section 5.3 introduces a special vector known as the zero vector and discusses some of its important properties.
n Section 5.4 defines vector negation.
n Section 5.5 describes how to compute the magnitude of a vector.
n Section 5.6 describes how a scalar may be multiplied by a vector.
n Section 5.7 introduces normalized vectors and explains how to normalize a vector.
n Section 5.8 explains how to add and subtract two vectors and gives several important applications of this operation.
n Section 5.9 presents the distance formula and explains why it works.
n Section 5.10 discusses the first type of vector product, the dot product.
n Section 5.11 discusses a second type of vector product, the cross product.
5.1 Linear Algebra vs. What We Need
The branch of mathematics that deals primarily with vectors is called linear algebra. As men- tioned in Section 4.1, a vector is nothing more than an array of numbers in linear algebra. This highly generalized abstraction allows us to explore a large set of mathematical problems. For example, in linear algebra, vectors and matrices of dimension n are used to solve a system of n lin- ear equations for n unknowns. This is a very interesting and useful study, but it is not of primary interest to our investigation of 3D math.
For 3D math, we are primarily concerned with the geometric interpretations of vectors and vector operations. The level of generality employed by linear algebra textbooks precludes decent coverage on the geometric interpretations. For example, a linear algebra textbook can teach you the precise rules for multiplying a vector by a matrix. These rules are important, but, in this book, we will also discuss several ways to interpret the numbers inside a 3×3 matrix geometrically and
why multiplying a vector by a matrix can perform a coordinate space transformation. (We’ll do
this in Section 7.2.)
Since our focus is geometric, we will omit many details of linear algebra that do not further our understanding of 2D or 3D geometry. While we will often discuss properties or operations for vectors of an arbitrary dimension n, we will usually focus on 2D, 3D, and (later) 4D vectors and matrices.
5.2 Typeface Conventions
As you know, variables are placeholder symbols used to stand for unknown quantities. In 3D math, we work with scalar, vector, and (later) matrix quantities, so it is important that we make it clear what type of data is represented by a particular variable. In this book, we use different fonts for variables of different types:
n Scalar variables will be represented by lowercase Roman or Greek letters in italics: a, b, x, y, z,q, .
n Vector variables of any dimension will be represented by lowercase letters in boldface: a, b,
u, v, q, r.
n Matrix variables will be represented using uppercase letters in boldface: A, B, M, R.
Note that other authors use different conventions. One common convention, used frequently when writing vectors by hand, is to draw a half-arrow over the vector, like this: a