Vector Algebra
Vectors carry magnitude and direction — forces, velocities, fields. Learn scalars vs vectors, components, magnitude and unit vectors, direction cosines, addition and scalar multiplication, dot product (angles, projections, work), cross product (area, torque, normal vectors), scalar and vector triple products, and orthogonality.
Statics, dynamics, electromagnetism, robotics and computer graphics are written in vectors. Two operations — dot and cross products — capture work, power, torque, magnetic force and surface normals.
An analogy
A vector is an arrow: its length is the magnitude and its direction is where it points. Adding vectors means placing arrows head to tail.
Components and unit vectors
Resolve a force into x, y, z components: F = F cosα i + F cosβ j + F cosγ k, with direction cosines satisfying cos²α + cos²β + cos²γ = 1.
Dot product
Measures alignment: zero when perpendicular. Work W = F · d; power P = F · v; projection of a force onto a member direction in truss analysis.
Cross product
Perpendicular to both vectors (right-hand rule); magnitude = parallelogram area. Torque τ = r × F; magnetic force F = qv × B; surface normals in CAD.
Triple products and bases
Scalar triple product gives volume and tests coplanarity (zero). Orthonormal bases simplify everything — the basis of linear algebra and coordinate frames in robotics.
Formulas
- Magnitude:
|a| = √(a₁² + a₂² + a₃²) - Dot product:
a · b = a₁b₁ + a₂b₂ + a₃b₃ = |a||b| cos θ - Projection:
comp_b a = a · b / |b|; proj_b a = (a · b/|b|²) b - Cross product:
a × b = (a₂b₃ − a₃b₂, a₃b₁ − a₁b₃, a₁b₂ − a₂b₁), |a × b| = |a||b| sin θ - Triple products:
a · (b × c) = volume of parallelepiped; a × (b × c) = b(a·c) − c(a·b)
Worked example: Dot and cross products
Given: a = (1, 2, 3), b = (4, −5, 6)
Find: a·b, angle, a × b.
- a·b = 4 − 10 + 18 = 12
- |a| = 3.742, |b| = 8.775 → θ = acos(12/32.83) = 68.6°
- a × b = (12 + 15, 12 − 6, −5 − 8) = (27, 6, −13)
Answer: 12, 68.6°, (27, 6, −13)
Worked example: Torque
Given: r = (0.3, 0, 0) m, F = (0, 50, 0) N
Find: τ.
- τ = r × F = (0, 0, 0.3 × 50)
Answer: 15 N·m about +z
Common mistakes
- Wrong: a × b = b × a. — Right: a × b = −(b × a).
- Wrong: Dot product of vectors gives a vector. — Right: It gives a scalar.
Applications
- Statics: Force resultants and moments.
- Electromagnetics: Lorentz force qv × B.
- Graphics & CAD: Normals, lighting (dot products).
Key takeaways
- Magnitude, unit vector, components.
- Dot → scalar, angle, work, projection.
- Cross → perpendicular vector, torque, area.
- Triple product → volume, coplanarity.
Going further
- Rotation matrices: Changing coordinate frames.
- Quaternions: Robust 3D rotations.
- Index notation: εᵢⱼₖ for cross products (M16).