Calc Lab Online
Science & Engineering Calculators

Dot Product Calculator

Free online Dot Product Calculator. Compute the vector dot product (a · b), Euclidean norms, angle theta (degrees and radians), and vector projections in 2D, 3D, and N-D space.

Sponsored • Leaderboard
Linear Algebra • a · b = ∑ ai bi

Vector Dot Product Calculator

Scalar Product & Geometric Angle
Quick Example Presets:
Vector a: 〈ax, ay, az〉
Vector b: 〈bx, by, bz〉
Calculated Dot Product (Scalar Product)
a · b =49

Vectors: a = ⟨3, 5, 8⟩, b = ⟨2, 7, 1⟩

📐 Acute Angle
Angle Between (θ)

47.66°

0.8318 rad
Cosine (cos θ)

0.6736

(a · b) / (||a|| × ||b||)
Magnitude ||a||

9.8995

√98
Magnitude ||b||

7.3485

√54
Geometric Interpretation: Acute Angle: The vectors point generally in the same half-space (θ = 47.66° < 90°).

Component-wise Dot Product Breakdowna · b = ∑ ai × bi

ComponentaibiProduct (ai × bi)Running Sum
x3266
y573541
z81849
Total Dot Product (a · b):49

Vector & Scalar Projections

Scalar Projection of a onto b (compba):
6.6681
(a · b) / ||b||
Vector Projection of a onto b (projba):
⟨1.8148, 6.3519, 0.9074⟩
((a · b) / ||b||²) × b
Scalar Projection of b onto a (compab):
4.9497
(a · b) / ||a||

Unit Vectors & Vector Operators

Unit Vector â (Direction of a):
⟨0.303, 0.5051, 0.8081⟩
a / ||a||
Unit Vector b̂ (Direction of b):
⟨0.2722, 0.9526, 0.1361⟩
b / ||b||
3D Cross Product (a × b):
⟨-51, 13, 11⟩
||a × b|| = 53.768 (Area of Parallelogram)

📝 Mathematical Step-by-Step Derivation

1. Algebraic Dot Product Definition\mathbf{a} \cdot \mathbf{b} = 49
\mathbf{a} \cdot \mathbf{b} = \sum_{i=1}^n a_i b_i = a_1 b_1 + a_2 b_2 + \dots + a_n b_n
\mathbf{a} \cdot \mathbf{b} = (3) \times (2) + (5) \times (7) + (8) \times (1)

Multiply corresponding coordinates of both vectors and sum the products to obtain the scalar product.

2. Vector Euclidean Magnitudes (Norms)\|\mathbf{a}\| = 9.8995, \quad \|\mathbf{b}\| = 7.3485
\|\mathbf{a}\| = \sqrt{\sum a_i^2}, \quad \|\mathbf{b}\| = \sqrt{\sum b_i^2}
\|\mathbf{a}\| = \sqrt{(3)^2 + (5)^2 + (8)^2} = \sqrt{98}, \quad \|\mathbf{b}\| = \sqrt{(2)^2 + (7)^2 + (1)^2} = \sqrt{54}

The length or Euclidean norm of each vector is the square root of the sum of squares of its components.

3. Geometric Angle Between Vectors (θ)\theta = 47.66^\circ \; (0.8318 \text{ rad})
\cos(\theta) = \frac{\mathbf{a} \cdot \mathbf{b}}{\|\mathbf{a}\| \|\mathbf{b}\|} \implies \theta = \arccos\left(\frac{\mathbf{a} \cdot \mathbf{b}}{\|\mathbf{a}\| \|\mathbf{b}\|}\right)
\cos(\theta) = \frac{49}{(9.8995) \times (7.3485)} = \frac{49}{72.7461} = 0.673575

Acute Angle: The vectors point generally in the same half-space (θ = 47.66° < 90°).

4. Scalar & Vector Projection of a onto b\operatorname{proj}_{\mathbf{b}}\mathbf{a} = ⟨1.8148, 6.3519, 0.9074⟩
\operatorname{comp}_{\mathbf{b}}\mathbf{a} = \frac{\mathbf{a} \cdot \mathbf{b}}{\|\mathbf{b}\|}, \quad \operatorname{proj}_{\mathbf{b}}\mathbf{a} = \left(\frac{\mathbf{a} \cdot \mathbf{b}}{\|\mathbf{b}\|^2}\right) \mathbf{b}
\operatorname{comp}_{\mathbf{b}}\mathbf{a} = \frac{49}{7.3485} = 6.6681, \quad \operatorname{proj}_{\mathbf{b}}\mathbf{a} = \left(\frac{49}{54}\right) ⟨2, 7, 1⟩

The vector projection represents the shadow or component vector of a that lies directly along the direction of b.

Advertisement • In-Content

How to Use the Vector Dot Product Calculator

Step-by-step instructions for computing scalar products, angles, and projections

1

Select Dimension Mode

Choose 3D Space ⟨x, y, z⟩, 2D Plane ⟨x, y⟩, N-Dimensional, or Multi-Vector (3+ vectors) mode.

2

Input Vector Coordinates

Type the components into the coordinate boxes or enter bracketed numbers (e.g. [3, 5, 8] or ⟨2, 7, 1⟩).

3

Review Angle & Orthogonality

Observe the scalar dot product, the geometric angle θ in both degrees and radians, and the relationship badge (Orthogonal, Parallel, Acute, or Obtuse).

4

Inspect Projections & 3D Cross Product

Examine scalar and vector projections (projba), unit vectors, the running sum breakdown table, and 3D cross product vector.

Mathematical Principles of the Dot Product

Algebraic component summation, Law of Cosines proof, and vector projections

Dual Algebraic & Geometric Definition
a · b = ∑ ai bi = ||a|| ||b|| cos(θ)
Angle Formula: θ = arccos((a · b) / (||a|| ||b||))

1. Algebraic Component Definition

For any two vectors in n-dimensional Euclidean space, a = ⟨a&sub1;, a&sub2;, …, an⟩ and b = ⟨b&sub1;, b&sub2;, …, bn⟩, the dot product is defined as the sum of coordinate products:

a · b = a&sub1;b&sub1; + a&sub2;b&sub2; + a&sub3;b&sub3; + … + anbn = ∑ aibi

Notice that although vectors a and b have direction and magnitude, their dot product a · b is a single real scalar quantity (which is why it is often called the scalar product).

2. Geometric Equivalence & Law of Cosines Proof

Consider a triangle formed by vectors a, b, and their difference vector c = a - b. By the classical Law of Cosines from trigonometry:

||c||² = ||a - b||² = ||a||² + ||b||² - 2 ||a|| ||b|| cos(θ)

Expanding the left side using vector components:

||a - b||² = ∑(ai - bi)² = ∑(ai² - 2 aibi + bi²) = ||a||² - 2(a · b) + ||b||²

Equating both expressions directly yields:

||a||² - 2(a · b) + ||b||² = ||a||² + ||b||² - 2 ||a|| ||b|| cos(θ) &implies; a · b = ||a|| ||b|| cos(θ)

3. Orthogonality, Angle Tests, & Projections

Orthogonal Condition (90°):
a · b = 0 ⇔ θ = 90° (cos 90° = 0)
Two non-zero vectors are perpendicular if and only if their dot product vanishes.
Parallel Condition (0° or 180°):
|a · b| = ||a|| ||b|| ⇔ cos(θ) = ±1
Attains maximum magnitude when vectors lie on the exact same line.
Scalar Projection (compba):
compba = (a · b) / ||b|| = ||a|| cos(θ)
The signed scalar shadow cast by vector a onto the axis of vector b.
Vector Projection (projba):
projba = ((a · b) / ||b||²) × b
The geometric component vector collinear with vector b.

Benchmark Vector Dot Product Calculations

Geometric, physical, and computer science reference benchmarks

ScenarioVector aVector bDot Product (a · b)Angle (θ)Classification
Orthogonal Basis Vectors (i · j)⟨1, 0, 0⟩⟨0, 1, 0⟩090.00° (π/2 rad)Perpendicular / Orthogonal
Parallel Unit Vectors (i · i)⟨1, 0, 0⟩⟨1, 0, 0⟩10.00° (0 rad)Parallel (Same Direction)
CalculatorSoup Standard Problem⟨3, 5, 8⟩⟨2, 7, 1⟩4947.66° (0.832 rad)Acute Angle
Opposite / Antiparallel Vectors⟨3, -4, 5⟩⟨-6, 8, -10⟩-100180.00° (π rad)Antiparallel (Opposite)
Mechanical Work (F · d)⟨50, 0, 20⟩ N⟨10, 4, 0⟩ m500 J21.80° (0.380 rad)Positive Work Done
Computer Graphics Diffuse Shading⟨0, 1, 0⟩ (Normal)⟨0.5, 0.866, 0⟩ (Light)0.86630.00° (π/6 rad)86.6% Surface Brightness
2D Diagonal Square Angle⟨1, 1⟩⟨1, 0⟩145.00° (π/4 rad)Diagonal Split
4D Relativistic Spacetime Vectors⟨3, 0, 0, 4⟩⟨1, 2, 2, 1⟩762.06° (1.083 rad)4D Acute Inner Product

Worked Vector Problems

Step-by-step solutions for 3D dot products, angles, work, and projections

Example 1: 3D Vector Dot Product

Given a = ⟨3, 5, 8⟩ and b = ⟨2, 7, 1⟩, calculate the scalar product:

a · b = (3 × 2) + (5 × 7) + (8 × 1)
a · b = 6 + 35 + 8
a · b = 49

Since the result 49 > 0, the angle between the vectors is acute.

Example 2: Angle Between Two Vectors

Find the angle θ between a = ⟨3, 5, 8⟩ and b = ⟨2, 7, 1⟩:

||a|| = √(3² + 5² + 8²) = √98 ≈ 9.8995
||b|| = √(2² + 7² + 1²) = √54 ≈ 7.3485
cos(θ) = 49 / (9.8995 × 7.3485) = 49 / 72.7461 ≈ 0.6736
θ = arccos(0.6736) ≈ 47.66° (0.8318 rad)
Example 3: Physics Mechanical Work

A constant force F = ⟨50, 0, 20⟩ N displaces a crate by d = ⟨10, 4, 0⟩ m. How much work is done?

W = F · d = (50)(10) + (0)(4) + (20)(0)
W = 500 + 0 + 0 = 500 Joules (J)

The y and z components of force do zero work because displacement along those axes is orthogonal.

Example 4: Vector Projection of a onto b

Calculate projba for a = ⟨3, 5, 8⟩ and b = ⟨2, 7, 1⟩:

projba = ((a · b) / ||b||²) × b
projba = (49 / 54) × ⟨2, 7, 1⟩
projba = ⟨1.8148, 6.3519, 0.9074⟩

The scalar projection is compba = 49 / √54 ≈ 6.6680.

Frequently Asked Questions

Expert answers to questions about vector dot products, projections, and linear algebra

What is the dot product of two vectors?▼

The dot product (also called the scalar product) is an algebraic operation that takes two equal-length coordinate vectors and returns a single scalar number. It is computed by multiplying matching components together and summing the results: a · b = a₁b₁ + a₂b₂ + ... + aₙbₙ.

What does a dot product of zero mean?▼

If the dot product of two non-zero vectors is zero (a · b = 0), the vectors are orthogonal, which means they are perpendicular to each other at an exact 90-degree right angle (cos 90° = 0).

How do you calculate the angle between two vectors using the dot product?▼

The angle θ between vectors a and b is given by the geometric formula: cos(θ) = (a · b) / (||a|| ||b||). Taking the inverse cosine yields θ = arccos((a · b) / (||a|| ||b||)), where ||a|| and ||b|| are the Euclidean magnitudes (norms) of the vectors.

Can the dot product be negative?▼

Yes. Since a · b = ||a|| ||b|| cos(θ), the sign of the dot product depends solely on cos(θ). If the angle between vectors is acute (0° ≤ θ < 90°), the dot product is positive. If the angle is obtuse (90° < θ ≤ 180°), cos(θ) is negative, resulting in a negative dot product. When θ = 180° (antiparallel), the dot product attains its maximum negative value: -||a|| ||b||.

What is the difference between a scalar projection and a vector projection?▼

The scalar projection of a onto b (comp_b a = (a · b) / ||b||) is a single number representing the signed length of the shadow that vector a casts onto vector b. The vector projection (proj_b a = ((a · b) / ||b||²) b) is an actual vector pointing in the direction of b with magnitude equal to |comp_b a|.

What are the main physics applications of the dot product?▼

The dot product is central to physics and engineering: 1. Mechanical Work: W = F · d (force dotted with displacement); 2. Electric and Magnetic Flux: Φ = E · A; 3. Instantaneous Mechanical Power: P = F · v; 4. Computer Graphics & Shading: Lambertian lighting models use the dot product between the surface normal N and light vector L to compute brightness.

Related Calculators

Quick Suggestions
Science & Engineering Calculators

Displacement as a Function of Velocity, Acceleration and Time

Free online Displacement as a Function of Velocity, Acceleration and Time Calculator. Solve s = ut + 1/2at² for displacement, initial velocity, acceleration, or time with conversions.

Open Calculator
Science & Engineering Calculators

Displacement as a Function of Velocity and Time

Free online Displacement as a Function of Velocity and Time Calculator. Solve s = 1/2(u + v)t for displacement, initial/final velocity, or duration with unit conversions.

Open Calculator
Science & Engineering Calculators

Average Velocity Calculator

Free online Average Velocity Calculator. Solve for average velocity, displacement, or time using kinematics formulas (v = Δx/Δt and v = (u+v)/2) with unit conversions.

Open Calculator
Science & Engineering Calculators

Density Calculator (Physics)

Free online Density Calculator (Physics). Solve for density (ρ = m/V), mass (m = ρ×V), or volume (V = m/ρ) with material presets, specific gravity, and buoyancy analysis.

Open Calculator
Science & Engineering Calculators

Molecular Weight Calculator (Molar Mass & Formula Weight)

Free online Molecular Weight Calculator. Calculate molar mass (g/mol), formula weight, percent composition by mass, and mole-to-gram conversions for any chemical formula.

Open Calculator
Science & Engineering Calculators

Momentum Calculator (p = mv)

Free online Momentum Calculator. Solve for momentum (p = mv), velocity (v), or mass (m). Features kinetic energy, stopping force, impulse, and unit conversions in SI and Imperial.

Open Calculator
Advertisement • Sponsored