Dot Product Calculator

Calculate the dot product of two vectors in 2D or 3D. Find magnitude, angle between vectors, and scalar projection with step-by-step solutions.

Enter Vector Components

Vector A
Vector B

Result

Dot Product (A . B)
11
scalar value

Step-by-Step Solution

A . B = (3)(1) + (4)(2) = 3 + 8 = 11

Understanding the Dot Product

The dot product (also called scalar product or inner product) is a fundamental operation in linear algebra that takes two vectors and returns a single scalar value. It measures how much two vectors point in the same direction and has deep geometric and algebraic significance.

Dot Product Formulas

Algebraic Definition

Sum of the products of corresponding components.

A . B = a1*b1 + a2*b2 + a3*b3

Geometric Definition

Product of magnitudes and cosine of the angle between them.

A . B = |A| |B| cos(theta)

Angle Between Vectors

Derived from the dot product formula.

theta = arccos(A.B / (|A||B|))

Vector Magnitude

The length of a vector computed from its components.

|A| = sqrt(a1^2 + a2^2 + a3^2)

Scalar Projection

The projection of A onto B as a scalar value.

proj = A.B / |B|

Vector Projection

The projection of A onto B as a vector.

proj_B(A) = (A.B/|B|^2) B

Properties of the Dot Product

  • Commutative: A . B = B . A
  • Distributive: A . (B + C) = A . B + A . C
  • Scalar multiplication: (cA) . B = c(A . B)
  • Self dot product: A . A = |A|2
  • Orthogonality: If A . B = 0, the vectors are perpendicular.

Geometric Interpretation

The dot product tells you how aligned two vectors are. If the result is positive, the vectors point in roughly the same direction (angle less than 90 degrees). If zero, they are perpendicular. If negative, they point in roughly opposite directions (angle greater than 90 degrees).

Applications of the Dot Product

  • Computing the angle between two vectors in physics and engineering.
  • Determining if two vectors are orthogonal (perpendicular).
  • Calculating work done by a force: W = F . d.
  • Projecting one vector onto another in computer graphics.
  • Lighting calculations in 3D rendering (Lambert's cosine law).
  • Machine learning and data science (cosine similarity).