Vector Dot Product Calculator
Vector A
Vector B
Understanding Vector Dot Product
What is a Vector Dot Product?
The dot product (scalar product) of two vectors is defined as the product of their magnitudes and the cosine of the angle between them:
A · B = |A| |B| cos(θ)
Or in component form:
A · B = AxBx + AyBy + AzBz
where:
- A and B are vectors
- |A| and |B| are vector magnitudes
- θ is the angle between vectors
- Ax, Ay, Az are components of vector A
- Bx, By, Bz are components of vector B
Properties of Dot Product
Key Properties:
- Commutative: A · B = B · A
- Distributive: A · (B + C) = A · B + A · C
- Scalar Multiplication: (kA) · B = k(A · B)
- Self Dot Product: A · A = |A|²
Special Cases:
- Parallel vectors (θ = 0°): A · B = |A| |B|
- Perpendicular vectors (θ = 90°): A · B = 0
- Opposite vectors (θ = 180°): A · B = -|A| |B|
Geometric Applications
Finding Angles Between Vectors
θ = arccos((A · B)/(|A| |B|))
Vector Projection
proj_B A = ((A · B)/|B|²)B
Work in Physics
W = F · d = |F| |d| cos(θ)
Applications in Computer Graphics
- Surface Normal Calculations
- Light Intensity: I = L · N
- Shadow Calculations