You are on page 1of 4

24/01/2024, 16:01 Vectors

Math 21a Handouts


Janet Chen

5 Vectors
So far in 21a, we've been studying functions of multiple
variables. These functions arise quite naturally; for
example, it's natural to look at a function like f (x, y) =
current temperature at latitude x, longitude y. But what
if we want a function describing the wind at a particular
location? If you look in a typical weather app, wind is
described by giving two pieces of information: its speed
(a non-negative number) and its direction.

A quantity with a magnitude (a non-negative number)


and a direction is called a vector. To distinguish vectors
from numbers, we usually write vector variables with
an arrow, like v→. (Many textbooks instead write vector
variables in boldface, like v.) Also, we often refer to
numbers as scalars, to emphasize that scalars and
vectors are different types of mathematical objects.

Example 5.1. Are the following quantities better


described by scalars or vectors?

1. The mass of the earth.


2. The distance between Boston and New York
City.
3. The magnetic field at a particular point on the
earth's surface.

▼ Solution

Let's look at each one.

1. The mass of the earth is a scalar; it's


simply a number.
2. The distance between Boston and New
York City is also a scalar; it's just a number.
3. The magnetic field has a strength but also
a direction, so it's better described by a
vector.

https://people.math.harvard.edu/~jjchen/math21a/handouts/vectors.html 1/4
24/01/2024, 16:01 Vectors

5.1 Visualizing vectors


We typically picture a vector as an arrow; an arrow
naturally points in some direction, and its length
represents the magnitude of the vector. So, for
example, if the wind is blowing southwest at 10 miles
per hour, we could represent it with an arrow pointing
southwest and having a length of 10:

Warning 5.2. Probably the most confusing thing


when you're first learning about vectors is that a
vector doesn't have a location, so a vector can be
drawn anywhere you like. For example, in R , the
2

following 3 vectors are all the same:

The red vector is drawn with its tail at the origin, while
the green vector is drawn with its head at the origin;
the blue vector is drawn at some random spot.
However, because they all have the same length and
point in the same direction, these 3 vectors are the
same.

As we work with vectors more, you'll see that where


we draw a vector depends on what we're using the
vector for. So, this is something to ask yourself every
time you encounter a picture of a vector: is there a
particular reason the vector is drawn where it is?

5.2 Specifying vectors


How do we specify vectors? In R , we can describe a
2

vector by how far it goes in the x- and y-directions. For


instance, consider the vectors shown below:
https://people.math.harvard.edu/~jjchen/math21a/handouts/vectors.html 2/4
24/01/2024, 16:01 Vectors

The vector v→ goes 1 unit to the right (+1 in the x-


direction) and 4 units up (+4 in the y-direction), so we
write v→ = ⟨1, 4⟩. Similarly, w
→ = ⟨−6, 2⟩ since it goes 6
units left (−6 in the x-direction) and 2 units up (+2 in
the y-direction):

When a vector is written like this, it's easy to figure out


its length using the Pythagorean Theorem. For the
example above, the length of v→ (denoted ∥v→∥) is √17 by
the Pythagorean Theorem.

Similarly, in R , we can describe a vector by how far it


3

goes in the x-, y-, and z-directions, so we write a vector


in R in the form ⟨x, y, z⟩. 1 When we specify a vector in
3

this way, we say that we're giving the components of


the vector.

Note 5.3. The vector whose components are all 0


(that is, ⟨0, 0⟩ in R and ⟨0, 0, 0⟩ in R ) is called the zero
2 3

vector, denoted → 0, and is pictured simply as a dot. It

has length 0, and it's the only vector with no specific


direction.

5.3 Vectors between points

https://people.math.harvard.edu/~jjchen/math21a/handouts/vectors.html 3/4
24/01/2024, 16:01 Vectors

As we will see, it's often useful to draw vectors between


points we're interested in. For example, suppose we
have points P and Q as shown in the left picture below.
The vector from P to Q (shown in the right picture) is

−→
denoted P Q.

Example 5.4. If P = (4, −1) and Q = (−3, 2), find



−→
PQ .

To get from P to Q, we need to go 7 units left (since


−3 − 4 = −7) and 3 units up (since 2 − (−1) = 3), so

−→
P Q = ⟨−7, 3⟩ .


−→
Thus, we see that, to find P Q, we simply subtract the
components of P from those of Q. This works in R as 3

well as R (and in fact works in R for any n).


2 n

https://people.math.harvard.edu/~jjchen/math21a/handouts/vectors.html 4/4

You might also like