Unit 1, lesson 1

Vectors and Vector Operations

What a vector is, how a point differs from a displacement, and how to add, subtract and scale vectors as columns, as arrows placed tip to tail and as lists of data, with the zero vector.

  • Video 1
  • Vectors and Linear Combinations

Video 1

Two arrows sit in different places on a grid. One runs from the point (1,−2)(1, -2) to the point (3,−1)(3, -1), the other from (−2,1)(-2, 1) to (0,2)(0, 2). Do they describe different movements? Each one goes two units to the right and one unit up, so as changes of position they are the same. This lesson separates a location from a change of location, writes changes as columns of numbers, and sets up the arithmetic of adding and scaling them, which works for lists of measurements just as well as for arrows.

Key terms

Vector

Definition Let nn be a positive integer. A vector in Rn\mathbb{R}^n is an ordered list of nn real numbers, called its components or entries. We write a vector as a column vector,

v=[v1v2⋮vn],\mathbf{v} = \begin{bmatrix} v_1 \\ v_2 \\ \vdots \\ v_n \end{bmatrix},

and Rn\mathbb{R}^n is the set of all such columns. Two vectors are equal when they have the same number of entries and agree in every position. Vectors get bold lowercase letters. In running text a tuple such as (2,1)(2, 1) stands for the column vector with entries 22 and 11.

In plain words A vector is a list of numbers in which position matters. A vector in R2\mathbb{R}^2 can be drawn as an arrow, with its first entry giving the horizontal change from tail to tip and its second entry giving the vertical change.

Example The vectors (2,1)(2, 1) and (1,2)(1, 2) contain the same numbers, but they are different vectors. The first moves 22 units right and 11 unit up, the second moves 11 unit right and 22 units up. The vector (−1,2)(-1, 2) moves 11 unit left and 22 units up. A negative entry means a move in the negative direction of that axis, not a negative length. A vector in R3\mathbb{R}^3 such as

a=[2−13]\mathbf{a} = \begin{bmatrix} 2 \\ -1 \\ 3 \end{bmatrix}

records a change of 22 along the xx-axis, −1-1 along the yy-axis and 33 along the zz-axis, always in that order.

Point and displacement

Definition Fix an origin and coordinate axes. A point is a location. We name points with capital letters and give them by their coordinates, as in P=(p1,…,pn)P = (p_1, \dots, p_n). Points are written with parentheses too, so a capital letter or the word point marks such a tuple as a location rather than a column vector. For points PP and QQ, the displacement from PP to QQ is the vector

Q−P=[q1−p1⋮qn−pn],Q - P = \begin{bmatrix} q_1 - p_1 \\ \vdots \\ q_n - p_n \end{bmatrix},

endpoint minus starting point. Any arrow whose tip coordinates minus tail coordinates give this column represents the same vector. In particular, sliding an arrow to a new starting point without turning or stretching it does not change the vector it represents. Adding the displacement to the coordinates of PP gives the coordinates of QQ.

In plain words A point says where you are, and a displacement says how you moved. The same move can start anywhere.

Example Let P=(1,−2)P = (1, -2), Q=(3,−1)Q = (3, -1), R=(−2,1)R = (-2, 1) and S=(0,2)S = (0, 2). Then

Q−P=[3−1−1−(−2)]=[21],S−R=[0−(−2)2−1]=[21].\begin{gathered} Q - P = \begin{bmatrix} 3 - 1 \\ -1 - (-2) \end{bmatrix} = \begin{bmatrix} 2 \\ 1 \end{bmatrix}, \\[0.4em] S - R = \begin{bmatrix} 0 - (-2) \\ 2 - 1 \end{bmatrix} = \begin{bmatrix} 2 \\ 1 \end{bmatrix}. \end{gathered}

The two arrows start at different points but represent the same displacement. The coordinates (3,−1)(3, -1) of the endpoint QQ are not the components of the displacement, because the move started at PP rather than at the origin. Adding the change to PP gives (1+2,−2+1)=(3,−1)(1 + 2, -2 + 1) = (3, -1), which is QQ again.

Vector addition and subtraction

Definition For vectors u\mathbf{u} and v\mathbf{v} in the same Rn\mathbb{R}^n, the sum and the difference are formed entry by entry,

u+v=[u1+v1⋮un+vn],u−v=[u1−v1⋮un−vn].\begin{gathered} \mathbf{u} + \mathbf{v} = \begin{bmatrix} u_1 + v_1 \\ \vdots \\ u_n + v_n \end{bmatrix}, \\[0.4em] \mathbf{u} - \mathbf{v} = \begin{bmatrix} u_1 - v_1 \\ \vdots \\ u_n - v_n \end{bmatrix}. \end{gathered}

Vectors with different numbers of entries cannot be added or subtracted. In R2\mathbb{R}^2 and R3\mathbb{R}^3 the sum follows the tip-to-tail rule. Draw u\mathbf{u}, then draw a copy of v\mathbf{v} with its tail at the tip of u\mathbf{u}. The arrow from the tail of u\mathbf{u} to the tip of that copy represents u+v\mathbf{u} + \mathbf{v}. When u\mathbf{u} and v\mathbf{v} are drawn from the same point, u−v\mathbf{u} - \mathbf{v} is the arrow from the tip of v\mathbf{v} to the tip of u\mathbf{u}, since v+(u−v)=u\mathbf{v} + (\mathbf{u} - \mathbf{v}) = \mathbf{u}. Addition is commutative and associative,

u+v=v+u,(u+v)+w=u+(v+w),\begin{gathered} \mathbf{u} + \mathbf{v} = \mathbf{v} + \mathbf{u}, \\[0.4em] (\mathbf{u} + \mathbf{v}) + \mathbf{w} = \mathbf{u} + (\mathbf{v} + \mathbf{w}), \end{gathered}

because addition of real numbers has these properties in each entry. Subtraction is not commutative. Each entry of v−u\mathbf{v} - \mathbf{u} is the negative of the matching entry of u−v\mathbf{u} - \mathbf{v}, so the two differences agree only when u=v\mathbf{u} = \mathbf{v}.

In plain words Add or subtract matching entries, never entries from different positions. As arrows, a sum is one move followed by the other. For two arrows drawn from the same point, the difference u−v\mathbf{u} - \mathbf{v} is the move from the tip of v\mathbf{v} to the tip of u\mathbf{u}.

Example Let u=(2,1)\mathbf{u} = (2, 1) and v=(−1,2)\mathbf{v} = (-1, 2). Then

u+v=[2+(−1)1+2]=[13],v−u=[−1−22−1]=[−31].\begin{gathered} \mathbf{u} + \mathbf{v} = \begin{bmatrix} 2 + (-1) \\ 1 + 2 \end{bmatrix} = \begin{bmatrix} 1 \\ 3 \end{bmatrix}, \\[0.4em] \mathbf{v} - \mathbf{u} = \begin{bmatrix} -1 - 2 \\ 2 - 1 \end{bmatrix} = \begin{bmatrix} -3 \\ 1 \end{bmatrix}. \end{gathered}

Starting at the origin, the path u\mathbf{u} then v\mathbf{v} turns at the point (2,1)(2, 1), and the path v\mathbf{v} then u\mathbf{u} turns at the point (−1,2)(-1, 2). Both end at the point (1,3)(1, 3), and together the two paths outline a parallelogram whose diagonal from the origin is u+v\mathbf{u} + \mathbf{v}. Adding the difference back gives u+(v−u)=(−1,2)\mathbf{u} + (\mathbf{v} - \mathbf{u}) = (-1, 2), which is v\mathbf{v}. In the other order, u−v=(3,−1)\mathbf{u} - \mathbf{v} = (3, -1), the opposite of v−u\mathbf{v} - \mathbf{u}.

Scalar multiplication

Definition A real number that multiplies a vector is called a scalar. For a scalar cc and a vector v\mathbf{v} in Rn\mathbb{R}^n, the scalar multiple cvc\mathbf{v} multiplies every entry by cc,

cv=[cv1⋮cvn].c\mathbf{v} = \begin{bmatrix} c v_1 \\ \vdots \\ c v_n \end{bmatrix}.

The vector (−1)v(-1)\mathbf{v} is written −v-\mathbf{v} and called the opposite of v\mathbf{v}. In R2\mathbb{R}^2 and R3\mathbb{R}^3, for a nonzero vector v\mathbf{v} and a nonzero scalar cc, the arrow of cvc\mathbf{v} points the same way as v\mathbf{v} when c>0c > 0 and the opposite way when c<0c < 0, and it is ∣c∣\lvert c \rvert times as long. For all vectors u,v\mathbf{u}, \mathbf{v} in Rn\mathbb{R}^n and scalars c,dc, d, the distributive laws

c(u+v)=cu+cv,(c+d)v=cv+dv\begin{gathered} c(\mathbf{u} + \mathbf{v}) = c\mathbf{u} + c\mathbf{v}, \\[0.4em] (c + d)\mathbf{v} = c\mathbf{v} + d\mathbf{v} \end{gathered}

hold, together with c(dv)=(cd)vc(d\mathbf{v}) = (cd)\mathbf{v} and 1v=v1\mathbf{v} = \mathbf{v}. Each follows from the same law for real numbers, applied in every entry.

In plain words Scaling multiplies every entry by the same number. A nonzero scalar stretches or shrinks the arrow of a nonzero vector along its own line, and a negative scalar also turns it around.

Example For u=(2,1)\mathbf{u} = (2, 1) we get 2u=(4,2)2\mathbf{u} = (4, 2), 12u=(1,12)\tfrac{1}{2}\mathbf{u} = (1, \tfrac{1}{2}) and −2u=(−4,−2)-2\mathbf{u} = (-4, -2). The last one points opposite to u\mathbf{u} and is twice as long. Changing only one entry, as in (4,1)(4, 1), does not give a scalar multiple of u\mathbf{u}, and that arrow points in a different direction. With v=(−1,2)\mathbf{v} = (-1, 2) the first distributive law checks out,

2(u+v)=2[13]=[26],2u+2v=[42]+[−24]=[26].\begin{aligned} 2(\mathbf{u} + \mathbf{v}) &= 2\begin{bmatrix} 1 \\ 3 \end{bmatrix} = \begin{bmatrix} 2 \\ 6 \end{bmatrix}, \\[0.4em] 2\mathbf{u} + 2\mathbf{v} &= \begin{bmatrix} 4 \\ 2 \end{bmatrix} + \begin{bmatrix} -2 \\ 4 \end{bmatrix} = \begin{bmatrix} 2 \\ 6 \end{bmatrix}. \end{aligned}

Zero vector

Definition The zero vector 0\mathbf{0} of Rn\mathbb{R}^n is the vector whose nn entries are all 00. For every v\mathbf{v} in Rn\mathbb{R}^n,

v+0=v,0v=0,v+(−v)=0.\begin{gathered} \mathbf{v} + \mathbf{0} = \mathbf{v}, \qquad 0\mathbf{v} = \mathbf{0}, \\[0.4em] \mathbf{v} + (-\mathbf{v}) = \mathbf{0}. \end{gathered}

So 0\mathbf{0} is the identity for vector addition, and the opposite −v-\mathbf{v} is the vector that cancels v\mathbf{v}. Subtracting a vector is the same as adding its opposite, u−v=u+(−v)\mathbf{u} - \mathbf{v} = \mathbf{u} + (-\mathbf{v}). As a displacement, 0\mathbf{0} is no change of position, the displacement from any point to itself. Its arrow has its tail and tip at the same point, so it has no direction.

In plain words The zero vector is the move that goes nowhere. Adding it changes nothing, and every vector has an opposite that undoes it.

Example In R2\mathbb{R}^2 the zero vector is (0,0)(0, 0), and in R3\mathbb{R}^3 it is (0,0,0)(0, 0, 0). With u=(2,1)\mathbf{u} = (2, 1) and v=(−1,2)\mathbf{v} = (-1, 2), the opposite of v\mathbf{v} is −v=(1,−2)-\mathbf{v} = (1, -2), and v+(−v)=(0,0)\mathbf{v} + (-\mathbf{v}) = (0, 0). Adding the opposite gives u+(−v)=(3,−1)\mathbf{u} + (-\mathbf{v}) = (3, -1), the same as u−v\mathbf{u} - \mathbf{v} found above. Scaling by zero also gives the zero vector, since 0u=(0,0)0\mathbf{u} = (0, 0). Watch for one misreading. The zero vector is not a very short arrow along some axis. It has no direction at all.

Data vector

Definition A data vector is a vector in Rn\mathbb{R}^n whose entries are nn measurements or counts listed in a fixed order, with a stated meaning and unit for each position. Data vectors are added, subtracted and scaled by the same entry by entry rules. A sum or difference of two data vectors answers a sensible question only when both use the same order, meanings and units, so that matching positions describe the same quantity.

In plain words A vector does not have to be an arrow. Any list of numbers in a fixed order is a vector, and four or a hundred entries are handled just like two or three.

Example A store records the units sold of pens, notebooks, folders and markers, in that order. Two weeks of sales are

s1=[301258],s2=[251576].\mathbf{s}_1 = \begin{bmatrix} 30 \\ 12 \\ 5 \\ 8 \end{bmatrix}, \qquad \mathbf{s}_2 = \begin{bmatrix} 25 \\ 15 \\ 7 \\ 6 \end{bmatrix}.

The total for both weeks is s1+s2=(55,27,12,14)\mathbf{s}_1 + \mathbf{s}_2 = (55, 27, 12, 14), and the change from the first week to the second is s2−s1=(−5,3,2,−2)\mathbf{s}_2 - \mathbf{s}_1 = (-5, 3, 2, -2). If the second week had been listed with notebooks first and pens second, adding by position would combine pens with notebooks. The arithmetic would still run, but the first two totals would answer the wrong question.

Check yourself

  1. Let a=(1,0,−2)\mathbf{a} = (1, 0, -2) and b=(3,−1,4)\mathbf{b} = (3, -1, 4). Find a+b\mathbf{a} + \mathbf{b} and 2a−b2\mathbf{a} - \mathbf{b}.
Show the answer

Adding matching entries gives a+b=(4,−1,2)\mathbf{a} + \mathbf{b} = (4, -1, 2). For the second, scale first to get 2a=(2,0,−4)2\mathbf{a} = (2, 0, -4), then subtract,

2a−b=[2−30−(−1)−4−4]=[−11−8].2\mathbf{a} - \mathbf{b} = \begin{bmatrix} 2 - 3 \\ 0 - (-1) \\ -4 - 4 \end{bmatrix} = \begin{bmatrix} -1 \\ 1 \\ -8 \end{bmatrix}.

Adding b\mathbf{b} back gives (2,0,−4)(2, 0, -4), which is 2a2\mathbf{a}, so the subtraction is right.

  1. Let P=(4,−1)P = (4, -1) and Q=(1,3)Q = (1, 3). A student says the displacement from PP to QQ is (1,3)(1, 3). What went wrong, and what is the correct displacement?
Show the answer

The student gave the coordinates of the endpoint QQ. Those equal the displacement only when the move starts at the origin. The displacement is endpoint minus starting point,

Q−P=[1−43−(−1)]=[−34].Q - P = \begin{bmatrix} 1 - 4 \\ 3 - (-1) \end{bmatrix} = \begin{bmatrix} -3 \\ 4 \end{bmatrix}.

Starting at PP and adding this change gives (4−3,−1+4)=(1,3)(4 - 3, -1 + 4) = (1, 3), which is QQ.

  1. Is (6,2)(6, 2) a scalar multiple of (3,−1)(3, -1)? Is (−6,2)(-6, 2)?
Show the answer

Every scalar multiple of (3,−1)(3, -1) has the form c(3,−1)=(3c,−c)c(3, -1) = (3c, -c), with one scalar cc for both entries. For (6,2)(6, 2) the first entry forces c=2c = 2, but then the second entry would be −2-2, not 22. So (6,2)(6, 2) is not a scalar multiple of (3,−1)(3, -1). For (−6,2)(-6, 2) the first entry gives c=−2c = -2 and the second gives −c=2-c = 2, which agrees. So (−6,2)=−2(3,−1)(-6, 2) = -2(3, -1), an arrow pointing the opposite way and twice as long.

How this lesson connects

It also uses arithmetic with signed numbers and fractions, elementary algebra and points and coordinates on a graph.