Vectors in Robotics
Vectors are the foundation of robotics mathematics. They allow us to represent positions, velocities, forces, and many other physical quantities that have both magnitude and direction.
What is a Vector?
A vector is a mathematical object that has:
- Magnitude (length or size)
- Direction (which way it points)
We write vectors in bold () or with an arrow (). In 2D, a vector has two components:
In 3D, it has three components:
Notation
We’ll use or notation for simplicity, but remember these represent column vectors in formal mathematics.
Vectors in Robotics
In robotics, vectors are everywhere:
- Position: Where is the robot?
- Velocity: How fast and in what direction is it moving?
- Acceleration: How is the velocity changing?
- Force: What forces are acting on the robot?
Robot Position Robotics Application
A mobile robot at position meters means it’s 2 meters along the x-axis and 3 meters along the y-axis from the origin.
If the robot moves with velocity vector m/s for 2 seconds, its new position will be:
Vector Addition
When we add two vectors, we combine their effects. This is called the parallelogram rule or tip-to-tail method.
Interactive Exploration
Try adjusting the vectors below to see how vector addition works visually!
Vector a (blue)
Vector b (green)
Results
Tip: Vector addition follows the parallelogram rule. The dashed green vector shows how vector b is placed at the tip of vector a. The resultant (red) goes from the origin to the final point.
Properties of Vector Addition
- Commutative:
- Associative:
- Identity:
- Inverse:
Robot Path Planning Robotics Application
A robot needs to move from point A to point C. It can either:
- Go directly: Follow vector
- Take a detour: Follow then
By vector addition:
The direct path and the detour lead to the same final position!
Scalar Multiplication
Multiplying a vector by a scalar (number) scales its magnitude:
- If : vector gets longer
- If : vector gets shorter
- If : vector reverses direction
Robot Speed Control Robotics Application
A robot moving with velocity m/s can:
- Double its speed: m/s
- Go half as fast: m/s
- Reverse direction: m/s
Vector Magnitude
The magnitude (or length) of a vector is calculated using the Pythagorean theorem:
In 2D:
Units Matter!
Always keep track of units. If position is in meters, velocity is in meters/second, and magnitude has those same units.
Unit Vectors
A unit vector has magnitude 1. We can create a unit vector by normalizing any non-zero vector:
Unit vectors are useful for representing pure direction without magnitude.
Robot Heading Direction Robotics Application
A robot moving with velocity m/s:
- Speed (magnitude): m/s
- Direction (unit vector):
The unit vector tells us the robot’s heading, while the magnitude tells us how fast.
Key Takeaways
- Vectors represent quantities with both magnitude and direction
- Vector addition combines effects (displacements, forces, etc.)
- Scalar multiplication scales vector magnitude
- Unit vectors represent pure direction
- Vectors are fundamental for robot position, velocity, and control
Practice Problems
-
A robot at position moves by displacement . What’s its new position?
-
Two forces act on a robot: N and N. What’s the net force?
-
A velocity vector is m/s. What’s its magnitude? What’s the unit vector?
-
If a robot moves with constant velocity m/s, where will it be after 3 seconds if it starts at the origin?
Ready for More?
Now that you understand vector basics, the next lesson covers the dot product - a way to measure how much two vectors align with each other. This is crucial for computing angles in robot arms!