Skip to main content
\(\newcommand{\del}[2]{\frac{\partial #1}{\partial #2}} \def\proj{\qopname\relax o{proj}} \def\grad{\qopname\relax o{grad}} \def\curl{\text{curl }\ } \def\div{\qopname\relax o{div}} \def\comp{\qopname\relax o{comp}} \newcommand{\R}{\mathbb{R}} \definecolor{purple}{rgb}{0.5,0,1.0} \definecolor{cyan}{rgb}{0, 1, 1} \definecolor{hotpink}{rgb}{1, 0, 0.5} \definecolor{skyblue}{rgb}{0, 0.5, 1} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \)

Section 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\text{,}\) longitude \(y\text{.}\) 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 \(\vec{v}\text{.}\) (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.

Subsection 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^2\text{,}\) the 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?

Subsection 5.2 Specifying vectors

How do we specify vectors? In \(\R^2\text{,}\) we can describe a vector by how far it goes in the \(x\)- and \(y\)-directions. For instance, consider the vectors shown below:

The vector \(\vec{v}\) goes 1 unit to the right (\(+1\) in the \(x\)-direction) and 4 units up (\(+4\) in the \(y\)-direction), so we write \(\vec{v} = \langle 1, 4 \rangle\text{.}\) Similarly, \(\vec{w} = \langle -6, 2 \rangle\) 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 \(\vec{v}\) (denoted \(\|\vec{v}\|\)) is \(\sqrt{17}\) by the Pythagorean Theorem.

Similarly, in \(\R^3\text{,}\) we can describe a vector by how far it goes in the \(x\)-, \(y\)-, and \(z\)-directions, so we write a vector in \(\R^3\) in the form \(\langle x, y, z \rangle\text{.}\) 1 Although we won't study \(\R^n\) for \(n > 3\) in 21a, you can probably guess that, in \(\R^n\text{,}\) we could write every vector in the form \(\langle x_1, ..., x_n \rangle\text{.}\) When we specify a vector in 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, \(\langle 0, 0 \rangle\) in \(\R^2\) and \(\langle 0, 0, 0 \rangle\) in \(\R^3\)) is called the zero vector, denoted \(\vec{0}\text{,}\) and is pictured simply as a dot. It has length 0, and it's the only vector with no specific direction.

Subsection 5.3 Vectors between points

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 \(\overrightarrow{PQ}\text{.}\)

Example 5.4

If \(P = (4, -1)\) and \(Q = (-3, 2)\text{,}\) find \(\overrightarrow{PQ}\text{.}\)

To get from \(P\) to \(Q\text{,}\) we need to go \(7\) units left (since \(-3 - 4 = -7\)) and 3 units up (since \(2 - (-1) = 3\)), so \(\overrightarrow{PQ} = \langle -7, 3 \rangle\text{.}\)

Thus, we see that, to find \(\overrightarrow{PQ}\text{,}\) we simply subtract the components of \(P\) from those of \(Q\text{.}\) This works in \(\R^3\) as well as \(\R^2\) (and in fact works in \(\R^n\) for any \(n\)).