Skip to main content

Section 8.1 Euclidean Vectors

Preview Activity 8.1.1.

Consider the following table of meal cost data 8.1.1.

Table 8.1.1. Meal costs for four people
Breakfast Lunch Dinner
$6.90 $8.75 $9.05
$11.00 $0.00 $12.95
$10.25 $10.50 $13.70
$8.20 $14.50 $11.15

(a)

Combine this data to find the total each person paid for food on this day.

(b)

Combine this data to find the total cost of each meal.

(c)

Run the SageMath code in 8.1.2. Then write a sentence explaining how it answers to one of the above questions.

breakfasts = vector([6.9,11.00,10.25,8.20])
lunches = vector([8.75,0.00,10.50,14.50])
dinners = vector([9.05,12.95,13.70,11.15])
breakfasts+lunches+dinners
Listing 8.1.2. SageMath code using vectors

(d)

Modify 8.1.2 to answer the other question.

Activity 8.1.2.

A Euclidean vector is an ordered list of real numbers. (We'll just call them vectors, although there are other kinds of vectors as well.) They are usually written in a vertical column or as an ordered tuple:

\begin{equation*} \left(\begin{array}{r} 1 \\ 2 \\ 3 \end{array}\right)= \left(1,\,2,\,3\right) \end{equation*}

The dimension of a vector counts how many numbers it lists. Note that two-dimensional vectors store the same information as complex numbers:

\begin{equation*} \left(\begin{array}{r} 4 \\ -3 \end{array}\right)= \left(4,-3\right)= 4-3i \end{equation*}

(a)

Addition is defined in the same way for complex numbers and two-dimensional vectors. Find \((5-12i)+(-3-4i)\) and \((5,-12)+(-3,-4)\) without using technnology.

(b)

Write a sentence explaining the rule for adding two-dimensional vectors \((a,b)+(c,d)\text{.}\)

(c)

Assuming this pattern continues, what should be the value of \((1,2,3,4,5)+(10,20,30,40,50)\text{?}\)

(d)

Trying to add vectors in SageMath with (5,-12)+(-3,4) gives the incorrect result of (5,-12,-3,4). (These are considered tuples, and the + operator concatenates tuples together.) Instead, we must convert them to vectors first: vector([5,-12])+vector([-3,4]).

Use this technique to add \((1,2,3,4,5)+(10,20,30,40,50)\) in SageMath.

Activity 8.1.3.

Like complex numbers, two-dimensional and three-dimensional vectors are often used to represent positional data, compared with an origin zero vector \((0,0)\) or \((0,0,0)\text{.}\)

(a)

The position two units up/north and three units left/west from the origin is given by the complex number \(-3+2i\text{.}\) What vector represents that same point?

(b)

Give a vector representing four units right/east and one unit down/south from the origin.

(c)

Describe the point reached by moving two units up and three units left, followed by four units right and one unit down, as the addition of two vectors. Then compute that sum of vectors.

(d)

The SageMath code in 8.1.3 visualizes the vector sum \((5,-12)+(-3,-4)\text{.}\)

a = vector([5,-12])
b = vector([-3,4])

plot(a,color='blue') + \
    arrow(a,a+b,color='red') + \
    plot(a+b,color='purple')
Listing 8.1.3. Visualizing vector addition

Run 8.1.3, and then modify a copy of it to visualize the vectors from the previous three tasks.

(e)

Modify another copy of 8.1.3 to visualize the three-dimensional vector sum \((1,-2,4)+(0,3,-2)\text{.}\) (You can rotate, drag, and zoom this visualization to see it from different perspectives.)

Activity 8.1.4.

Like complex numbers, vectors can be multiplied by real numbers to manipulate them.

(a)

Run 3*vector([1,2,3]) to compute the product \(3\left(\begin{array}{r}1 \\2 \\3\end{array}\right)\text{.}\) Then write a sentence explaining the rule you think SageMath followed to compute this product.

(b)

Visualize \(\left(\begin{array}{r}1 \\2 \\3\end{array}\right)\) and \(3\left(\begin{array}{r}1 \\2 \\3\end{array}\right)\) by using the plot() SageMath tool.

(c)

Write a sentence explaining how multiplying the vector by three changed the shape of the vector.

(d)

Put your intuition to the test! Simplify \(2\left(\begin{array}{r}3 \\-2 \\5\end{array}\right)\) by hand, and then using a Code cell. Then compare it with \(\left(\begin{array}{r}3 \\-2 \\5\end{array}\right)\) using a plot() visualization.

(e)

Rewrite the sum \((-2,6,-4)+(-2,6,-4)\) as a product \(\Box(-2,6,4)\text{.}\) Then confirm with SageMath that they are indeed the same thing.

(f)

Give an example of multiplying a vector by a negative number. Then write a sentence explaining what happens to the direction of the vector arrow.

Exercises Exercises

1.

Describe the dimension of the vector \((5,-1)\text{.}\) What about the vector \((3,0,-4)\text{?}\) What about the complex number \(5-i\text{?}\)

2.

Compute the following sums.

  • \(\displaystyle \left(\begin{array}{r} -2 \\ 3 \end{array}\right)+ \left(\begin{array}{r} -5 \\ 2 \end{array}\right)\)

  • \(\displaystyle \left(7,\,-7\right)+\left(5,\,3\right)\)

  • \(\displaystyle \left(\begin{array}{r} 8 \\ -3 \\ -8 \end{array}\right)+ \left(\begin{array}{r} 3 \\ -5 \\ -1 \end{array}\right)\)

  • \(\displaystyle \left(1,2,4,8,16\right)+\left(1,3,5,7,9\right)\)

3.

Visualize the sums from the previous exercise.

4.

Compute \(4\,(3,-1,4)\text{.}\)

5.

Visualize \(4\,(3,-1,4)\text{,}\) and explain what multiplying by four did to the vector arrow for \((3,-1,4)\text{.}\)