AmesWeb

Dot Product Calculator

This dot product calculator computes the scalar product of two vectors and also returns vector magnitudes and the angle between vectors. It works for both 2D and 3D vectors. You can enter vectors as components (Ax, Ay, Az and Bx, By, Bz) or as magnitudes and angle (|A|, |B|, θ).

Tip: For 2D vectors, set Az = 0 and Bz = 0. Use dot “.” as decimal separator.

How to use the dot product calculator

  1. Select Vector Components or Magnitudes and Angle.
  2. Enter the required values (for 2D set z-components to 0).
  3. Click Calculate to get A·B, |A|, |B| and θ.

Dot product formulas

The calculator uses these standard formulas:

Dot product of vectors $$\vec { A } \cdot \vec { B }={ A}_{ x }{ B }_{ x}+{ A}_{ y }{ B }_{y}+{ A}_{ z }{ B }_{z}$$
Dot product by magnitudes and cosine $$\vec { A } \cdot \vec { B } =\left| A \right| \left| B \right| \cos { \theta }$$

Angle formula: $$\cos\theta=\frac{\vec A\cdot\vec B}{|A||B|}\quad\Rightarrow\quad \theta=\cos^{-1}\!\left(\frac{\vec A\cdot\vec B}{|A||B|}\right)$$

Dot product calculator

Dot product calculator inputs: vector components and magnitudes with angle
INPUT PARAMETERS
Vector Form:
VECTOR COMPONENTS
Vector x component y component z component
Vector A
Vector B
MAGNITUDES AND ANGLE
|A| |B| θ (deg)

 


Note: Use dot "." as decimal separator.


Results

RESULTS
Parameter Symbol Value Unit
Dot Product of Vectors A and B A dot B --- ---
Magnitude of Vector A |A| ---
Magnitude of Vector B |B| ---
Angle between Vectors θ --- deg

How to interpret the result

  • If A·B > 0, the vectors point more in the same direction (acute angle).
  • If A·B = 0, the vectors are perpendicular (θ = 90°).
  • If A·B < 0, the vectors point more opposite (obtuse angle).
Dot product calculation steps image

Step-by-step dot product calculation

Method 1: Using vector components

  1. Compute dot product: A·B = AxBx + AyBy + AzBz
  2. Compute magnitudes: |A| = √(Ax² + Ay² + Az²) and |B| = √(Bx² + By² + Bz²)
  3. Compute angle: θ = arccos((A·B)/(|A||B|))

Method 2: Using magnitudes and angle

  1. Compute dot product: A·B = |A||B|cosθ

Worked example

Let A = (1, 2, 0) and B = (3, 4, 0) (a 2D example with z = 0).

  • Dot product: A·B = 1·3 + 2·4 + 0·0 = 11
  • |A| = √(1²+2²) = √5 ≈ 2.236; |B| = √(3²+4²) = 5
  • cosθ = 11 / (2.236·5) ≈ 0.984; θ ≈ 10.3°

Frequently Asked Questions

What is dot product?

Dot product is a vector multiplication that returns a scalar (no direction). It measures how aligned two vectors are.

What are dot product properties?

  • Commutative: $$\overrightarrow{a} \cdot \overrightarrow{b} = \overrightarrow{b} \cdot \overrightarrow{a}$$
  • Distributive: $$\overrightarrow{a} \cdot (\overrightarrow{b} + \overrightarrow{c}) = \overrightarrow{a}\cdot\overrightarrow{b} + \overrightarrow{a}\cdot\overrightarrow{c}$$
  • Scalar multiplication: $$(\lambda \overrightarrow{a}) \cdot \overrightarrow{b} = \lambda(\overrightarrow{a}\cdot\overrightarrow{b}) = \overrightarrow{a}\cdot(\lambda \overrightarrow{b})$$
  • Self dot product: $$\overrightarrow{a}\cdot\overrightarrow{a} = |a|^2$$

Supplements:

Reference: