Chapter 01 · Meet the robot, then build its mathematical language
Today in the field story
One problem, then the next
A parcel lands three grid squares right and four squares beyond the diverter. The Parcel-Sorting Desk Robot needs more than two unrelated coordinates: it needs an arrow from its current tool point to the target lane. Draw that error, calculate its components and length, and compare its direction with the arm’s forward arrow before any planner is allowed to use it.
- Why now
Motion errors and directions are vectors, so components, norm, and alignment must become observable now.
- Ignore today
Ignore 3D vector products, gradients, and velocity control.
- Unlocks next
Transformable errors, distance checks, dot-product alignment, and later Jacobian intuition.
Understand
Build the physical picture first
A vector is an arrow with components: the components tell how to build the arrow, the norm tells its length, and the dot product compares its direction with another arrow.
A vector represents a quantity with size and direction, such as displacement or velocity. In a chosen 2D frame, v = (3, 4) m means an arrow with +3 m along x and +4 m along y. The same physical arrow can have different components in a rotated frame, so components are not the vector's entire meaning. A scalar has one value; a vector needs enough components for the space being used.
Add vectors component by component when the quantities, units, and frame match. Walking a = (3, 0) m and then b = (0, 4) m produces total displacement a + b = (3, 4) m. Subtraction answers a relative-change question: target minus robot position gives an error vector pointing from robot to target. Head-to-tail drawings provide a physical check on the arithmetic.
The Euclidean norm gives straight-line length. For v = (3, 4) m, ||v|| = √(3² + 4²) m = 5 m. The travelled path in the earlier right-then-up walk is 7 m, while displacement norm is 5 m; they answer different questions. Squaring removes component signs before lengths are combined, and the final unit returns to metres.
The dot product a·b = a_x b_x + a_y b_y is a scalar measuring directional alignment with scale. Positive means broadly aligned, negative broadly opposed, and zero means perpendicular when both vectors are nonzero. Its unit is the product of the input units, so two metre displacement vectors produce m². A normalized direction vector avoids length dominating an alignment comparison, but normalization is a later operation and the zero vector has no direction.
Words you need
Name each idea precisely
- Vector
A quantity with magnitude and direction, represented by components in a chosen frame.
Physical example:A rover displacement of 3 m east and 4 m north.
- Component
The signed amount of a vector along one coordinate axis.
Physical example:The x component of (3, 4) m is +3 m.
- Vector sum
The combined effect found by adding matching components.
Physical example:A 3 m east walk followed by 4 m north gives displacement (3, 4) m.
- Norm
A rule that gives vector length; here the Euclidean straight-line length.
Physical example:The norm of (3, 4) m is 5 m.
- Dot product
A scalar made by multiplying matching components and adding, used to measure alignment.
Physical example:A forward velocity dotted with a forward axis is positive.
- Zero vector
A vector whose components and magnitude are all zero, so it has no unique direction.
Physical example:No displacement: (0, 0) m.
Visual model
See the relationship
Math, one line at a time
Work through today’s relationship
Prerequisite rescue · optionalStart at zero: counting, units, and coordinates
No maths is assumed. First give every robot number a physical meaning, a unit, a zero point, and a positive direction.
- N
- a count, such as number of jointsUnit: no unit
- x
- one position measured from a chosen zeroUnit: centimetres (cm) or metres (m)
- Δx
- change in x; Δ means changeUnit: same unit as x
Draw a number line. Put the origin at 0 cm, choose right as positive, and place the robot at x = 20 cm.
Move 30 cm right, so Δx = +30 cm. Predict x_new = 20 cm + 30 cm = 50 cm.
Measure to check, then convert with 100 cm = 1 m: 50 cm = 0.50 m. Never add centimetres directly to metres.
A variable is like a named field in code, but a robot field must also say its physical unit and what zero means.
A robot starts at x = 40 cm and moves 15 cm left. What is its new x coordinate?
Left is negative, so Δx = -15 cm and x_new = 40 - 15 = 25 cm.
For , Pythagoras gives
Here and because . For , . The dot product is
A zero dot product means nonzero arrows are perpendicular.
Calculate a navigation error and alignment
In one map frame, robot position r = (1, 2) m, target t = (4, 6) m, and robot forward direction f = (1, 0).
Subtract matching components: e = t − r = (4−1, 6−2) m.
Obtain error vector e = (3, 4) m.
Calculate its norm: ||e|| = √(3²+4²) m = 5 m.
Calculate f·e = 1×3 + 0×4 = 3 m.
Interpret the positive result: the target has a component in front of the robot.
Keep the remaining +4 m sideways component visible; positive alignment does not mean perfectly straight ahead.
The target is 5 m away, with 3 m of the error along the robot's forward axis and 4 m along the map y-axis.
Norm answers “how far”; components answer “in which axis directions”; dot product answers an alignment question.
Physical examples
Where this appears in real life
Rover-to-dock error
The rover is at (1, 2) m and its dock is at (4, 6) m in the same map frame.
Target minus robot gives error (3, 4) m, whose norm says the dock is 5 m away by a straight line.
Pushing a trolley
A person pushes partly forward and partly sideways while the trolley is constrained mostly along the aisle.
A dot product with the aisle direction separates useful forward effort from sideways effort.
Hands-on exercise
Make the idea observable
Use squared paper, ruler, pencil, and a scale of one square = one centimetre.
Draw v = (3, 4) and w = (−1, 2) from the same origin.
Draw w head-to-tail after v and mark the resultant v + w.
Calculate v + w and v − w component by component, then compare with the grid.
Build the right triangle for v and calculate ||v||.
Calculate v·w and state its unit under your drawing scale.
Reverse w, repeat the dot product mentally, and predict how the alignment sign changes.
The drawing catches swapped signs or components, while arithmetic provides an exact prediction at the chosen scale.
The four arrows, two component calculations, norm, dot product, units, and one written interpretation all agree.
Build today
Build a paper two-link robot and a browser notebook that shows its parts, allowed motion, coordinates, vectors, frames, and matrices.
Evidence to save
DONE when a comparison table for “Vectors from arrows: components, add, subtract, norm, and dot product” contains the test condition, metric, result, and justified engineering decision.
Common mistakes
Catch the wrong mental model
Adding vectors expressed in different frames.
Transform both into one named frame before adding matching components.
Calling the 3 m + 4 m walking path a 7 m displacement.
Path length is 7 m, but the start-to-finish vector norm is 5 m.
Saying zero dot product always proves a right angle.
It proves orthogonality only when both vectors are nonzero; the zero vector has no direction.
Dropping units from the dot product.
Multiply input units; two metre-valued vectors produce a dot product in m².
Job connection
How this becomes employable evidence
Compute position error vectors, stop tolerances, and directional alignment before a planner, controller, or learned policy is allowed to request motion.
Relevant target roles
- Robotics Software Engineer — ROS 2 / AMR
- Robotics Application / ROS 2 Integration Engineer
- Robot Learning Deployment / Physical AI Integration Engineer
Chapter 01 interview drill
Interview questions: Vectors from arrows: components, add, subtract, norm, and dot product
Practise a 60–90 second answer: define the idea, connect it to a physical robot, state assumptions, frames, and units when relevant, then finish with the failure signal or evidence you would inspect.
Primary interview scenario
A robot is close to a goal but facing away from it. Which vector quantities distinguish distance from directional alignment, and what frames and units must match?
Answer shape: clarify the situation → trace the physical and software path → test the most likely boundaries → name the evidence that would confirm the result.
Technical follow-up questions
Q1What does t − r mean when t and r are positions in the same frame?
It is the displacement or error vector pointing from robot position r to target position t.
Q2Why is ||(3, 4) m|| equal to 5 m rather than 7 m?
The norm is the straight-line hypotenuse √(3²+4²), while 7 m is the length of a two-segment path.
Q3What does a negative dot product between two nonzero direction vectors suggest?
They point more than 90° apart, so they are broadly opposed.