Cross Product
The cross product (or vector product) is a 3D operation that takes two vectors and produces a third vector perpendicular to both. It’s essential for computing torques, angular momentum, and surface normals in robotics.
3D Only!
The cross product is only defined for 3D vectors. There’s no 2D equivalent (though there’s a scalar version in 2D).
What is the Cross Product?
The cross product of two vectors produces a vector:
Geometric Interpretation
The magnitude of the cross product equals:
where is the angle between vectors.
Direction: The result is perpendicular to both and , following the right-hand rule.
Interactive Exploration
Explore the cross product in 3D. Notice how the red vector is always perpendicular to both blue and green vectors:
Vector a (blue)
Vector b (green)
Cross Product Results
Right-hand rule: Point your fingers along vector a, curl them toward vector b, and your thumb points in the direction of a × b.
Geometric meaning: The magnitude of the cross product equals the area of the parallelogram formed by the two vectors (shown in yellow).
Right-Hand Rule
To find the direction of :
- Point your fingers along
- Curl them toward
- Your thumb points along
Anti-Commutative
Unlike dot product, cross product is not commutative:
Swapping order flips the direction!
Geometric Meaning
The magnitude equals the area of the parallelogram formed by vectors and .
Try enabling “Show parallelogram” in the interactive demo to see this!
Special cases:
- Parallel vectors: (zero vector)
- Perpendicular vectors: (maximum magnitude)
Torque Calculation
Torque () is the rotational equivalent of force. It’s calculated using the cross product:
where:
- is the position vector from the pivot point to where force is applied
- is the applied force
Robot Gripper Torque Robotics Application
A robot gripper applies force N at position m from the wrist joint.
Torque about the wrist:
The torque is 3 N·m around the z-axis, causing rotation in the xy-plane.
Properties of Cross Product
- Anti-commutative:
- Distributive:
- Scalar multiplication:
- Self cross product:
Perpendicularity Check
If , then:
The result is perpendicular to both input vectors!
Surface Normals
A normal vector is perpendicular to a surface. Given two vectors in the plane, their cross product gives the normal:
Robot Path Planning on Slopes Robotics Application
A robot navigates a sloped surface defined by two edge vectors:
- (slightly upward)
- (slightly upward)
Surface normal:
This tells the robot which way is “up” relative to the surface. The unit normal is:
Angular Velocity and Momentum
In robotics, angular velocity () and angular momentum () involve cross products:
This gives the linear velocity of a point at position on a rotating body.
Rotating Robot Arm Robotics Application
A robot link rotates with angular velocity rad/s (around z-axis).
A point at m on the link has velocity:
The point moves at 1 m/s in the y-direction (tangent to the rotation).
Coordinate Frame Construction
Given one axis direction, we can construct a full coordinate frame using cross products:
Given: z-axis direction ẑ
Choose: arbitrary vector v (not parallel to ẑ)
Compute:
x̂ = v × ẑ (normalized)
ŷ = ẑ × x̂ (normalized)
This creates an orthonormal frame (mutually perpendicular unit vectors).
Robotics Applications
1. Joint Torque Computation
Essential for robot dynamics and control.
2. Collision Detection
Check if objects intersect by testing normal vectors.
3. Camera and Sensor Orientation
Define coordinate frames for vision systems.
4. Path Planning
Compute surface normals for navigation on irregular terrain.
5. Jacobian Matrix
Relates joint velocities to end-effector velocities (covered in Module 5).
Implementation Note
Many robotics libraries (ROS, PyBullet, etc.) have built-in cross product functions. But understanding the math helps you debug and extend these tools!
Key Takeaways
- Cross product produces a vector perpendicular to both inputs
- Magnitude equals area of parallelogram:
- Direction follows right-hand rule
- Essential for torque:
- Used for surface normals and coordinate frame construction
- Anti-commutative:
Practice Problems
-
Calculate for and .
-
Verify that is perpendicular to both input vectors using dot product.
-
A force of N is applied at position m. What’s the torque about the origin?
-
Find the unit normal to a surface spanned by and .
-
If , , and the angle between them is 30°, what is ?
Module 1 Complete!
Congratulations! You’ve mastered vector fundamentals. You now understand:
- Vector addition and scalar multiplication
- Dot product for measuring alignment and computing angles
- Cross product for perpendicular vectors and torques
Next module: We’ll explore matrices - powerful tools for representing robot transformations and configurations!