Mathematics, Statistics & Geometry

Dot Product Calculator

Calculate the dot product of two 3D vectors. Instantly determine if vectors are orthogonal and find the angle between them in degrees.

Dot Product (A · B)
12
Angle Between (θ)68.562°
Calculation StepsVector A = (1, 2, 3) Vector B = (4, -5, 6) Formula: A · B = AxBx + AyBy + AzBz A · B = (1 * 4) + (2 * -5) + (3 * 6) A · B = 4 + -10 + 18 = 12.000000 Angle θ = arccos((A · B) / (|A||B|)) θ = arccos(12.0000 / (3.7417 * 8.7750)) = 68.5624°

Calculated locally in your browser. Fast, secure, and private.

Vector Projection and Angles

The Dot Product Calculator is an indispensable tool for vector analysis. While the cross product results in a new vector, the dot product results in a scalar (a single number). This calculator computes the dot product, the magnitudes, and the exact angle between the vectors.

AB=AxBx+AyBy+AzBz\begin{aligned} \mathbf{A} \cdot \mathbf{B} = A_x B_x + A_y B_y + A_z B_z \end{aligned}

Where:
AB\mathbf{A} \cdot \mathbf{B}=
The resulting scalar value
Ai,BiA_i, B_i=
The corresponding x, y, and z elements

Two Ways to Calculate

The beauty of the dot product is that it links pure algebra to pure geometry. There are two definitions that are mathematically equivalent:

  1. Algebraic: Multiply matching coordinates and sum them up (AxBx+AyBy+AzBzA_x B_x + A_y B_y + A_z B_z).
  2. Geometric: Multiply the magnitudes and the cosine of the angle between them (ABcos(θ)|A||B|\cos(\theta)).

Because these are equal, we can use the simple algebraic method to easily solve for the unknown geometric angle!

Real-World Applications

  • Physics (Work): Work is defined as the dot product of Force and Displacement (W=FdW = F \cdot d). Only the force applied in the direction of movement contributes to work.
  • Computer Graphics: Used extensively in lighting shaders (Lambertian reflectance) to determine how directly a light source is hitting a 3D polygon.
  • Machine Learning: The core mathematical operation inside artificial neural networks, used to calculate the weighted sum of inputs.

Frequently Asked Questions

The dot product (or scalar product) is an algebraic operation that takes two equal-length sequences of numbers and returns a single number. It represents how much the vectors point in the same direction.

If the dot product is exactly 0, the two vectors are completely perpendicular (orthogonal) to each other. They share no directional components.

Yes. If the dot product is negative, it means the angle between the two vectors is greater than 90 degrees (they are pointing in opposite directions).

You use the geometric definition of the dot product: A · B = |A||B|cos(θ). By isolating θ, you get θ = arccos((A · B) / (|A||B|)).

Yes. Unlike the cross product, the dot product is commutative. A · B is exactly the same as B · A.