Lite / Intelligent Robotic Systems / Week 10
Vectors: arrows you can add
A drone flies 3 m east, then 4 m north. It is 5 m from where it started, not 7. Where did the other 2 m go?
Why should I care?
Every position, velocity and force a robot deals with has a size and a direction. A single number like "5 m" is not enough to tell a drone where to go. Vectors are the bookkeeping that makes motion calculable: break everything into x and y parts, add the parts, and the answer falls out.
- Represent a displacement or force as a vector with x and y components.
- Add vectors tip to tail and by adding components.
- Compute the magnitude of a vector with Pythagoras' theorem.
Predict
Vector a = (3, 1) and vector b = (1, 2.5). Which is the sum a + b?
- (4, 3.5)
- (3, 2.5)
- (4.5, 3.5)
- Its length is |a| + |b|, so you can't write it as components
Guess first, then reveal
(4, 3.5). Add the x parts (3 + 1) and the y parts (1 + 2.5) separately. Its length, √(4² + 3.5²) ≈ 5.32, is less than |a| + |b| ≈ 5.85, because a and b don't point the same way.
Discover
In 'Add tip to tail', set a = (3, 1) and b = (1, 2.5). Check the green sum against your prediction. Now make b point exactly opposite to a. What happens to a + b? Then find a b for which |a + b| = |a| + |b|.
What the interactive shows (text version)
The vector playground draws vector a in blue from the origin, vector b in orange starting at the tip of a, and their sum in dashed green from the origin to the tip of b. The readout lists every component, the sum and its length, and the same information is in the text above.
Watch (optional)
Watch for: Watch for the three views of a vector (arrow, list of numbers, thing you can add and scale) and how adding lists matches adding arrows tip to tail.
Three views of a vector (an arrow, a list of numbers, a thing you can add and scale) drawn so clearly that components stop feeling abstract.
“Vectors | Chapter 1, Essence of linear algebra” by 3Blue1Brown (opens YouTube; streaming video uses a lot of data)
The video is optional. Everything you need is in this lesson's text.
Understand
Size and direction, written as components
A vector is a quantity with a size and a direction, such as a displacement, a velocity or a force. In 2D we write it as two components, v = (vx, vy): how far along x, then how far along y, measured in some coordinate frame. The same arrow drawn anywhere on the page is the same vector; only its components matter.
Adding: tip to tail, or part by part
To add a and b, draw b starting where a ends; the sum runs from the start of a to the end of b. Algebraically that is just a + b = (ax + bx, ay + by). Subtraction works the same way: a − b is the arrow from the tip of b to the tip of a. Scaling by a number k multiplies both parts: k·a = (k·ax, k·ay).
Magnitude: Pythagoras in disguise
The components form the two short sides of a right-angled triangle, so the length (magnitude) is |v| = √(vx² + vy²). Lengths do not add like components: |a + b| ≤ |a| + |b|, with equality only when a and b point the same way. That is the drone's missing 2 m: 3 east + 4 north is (3, 4), length 5.
Explain it another way
Intuitive
A vector is a set of walking instructions: 'three steps east, one step north'. Two sets of instructions combine by doing one then the other, and you can tally the easts and the norths separately. How far you end up from the start is a different question, answered by Pythagoras.
Technical
In ℝ² a vector is an ordered pair of real numbers relative to a basis (here the unit vectors along x and y). Vector addition and scalar multiplication act component-wise; the Euclidean norm |v| = √(v·v) measures length and obeys the triangle inequality.
Mathematical
a = (3, 1), b = (1, 2.5): a + b = (4, 3.5), |a + b| = √(16 + 12.25) = √28.25 ≈ 5.315. |a| = √10 ≈ 3.162, |b| = √7.25 ≈ 2.693, so |a| + |b| ≈ 5.855 > 5.315.
Applied
A drone's flight controller adds its own velocity vector to the wind's velocity vector to predict where it will actually drift, and a robot arm's hand position is the sum of one vector per link.
Worked example 1
A rover drives a = (5, −2) m, then b = (−1, 6) m. Where does it end up, and how far is that from the start?
a + b = (5 − 1, −2 + 6) = (4, 4) m. Distance = √(4² + 4²) = √32 ≈ 5.66 m.
Common mix-ups
The length of a + b is |a| + |b|.
✓ Only when a and b point the same way. In general |a + b| is smaller, and you must add components first.Moving an arrow to a different place on the page makes it a different vector.
✓ A vector is just its components. Position on the page doesn't matter; that is what lets you draw tip to tail.
Practice
Practice, not a test. Answers are checked on our server; a wrong answer gets a hint and another try. Nothing is saved.
Apply it
A delivery drone must reach (12, 5) m from its pad but a wall forces it to fly (4, 0) m first. Write the second leg as a vector and give its length. Then check your answer in the vector playground (scale it down by 2 to fit the grid).
Reflect
Why do engineers insist on writing a direction alongside every force, when a number like '50 N' sounds complete?
Write your answer on paper or in your own notes. Lite never stores what you write.
Go further
- Euclidean vector (Wikipedia)
A thorough reference for vector notation and operations.