AI Tools Free

Dot Product Calculator

Enter the Cartesian (x, y, z) coordinates of two vectors into this dot product calculator to compute their exact scalar inner product in your browser. Designed as both a 3D and 2D vector dot product calculator for linear algebra, physics, and 3D graphics workflows, the tool multiplies matching axis components and sums the products to 12 significant digits.

Free to useNo sign-upRuns in your browser
Enter your details

Enter the inputs, then select Calculate result.

Your result
Enter your details

Result will appear here

How to calculate dot product of two vectors (formula & geometry)

The Dot Product Calculator evaluates the standard Euclidean inner product in client-side JavaScript. If you want to learn how to calculate dot product of two vectors a = (x, y, z) and b = (u, v, w), multiply their corresponding X, Y, and Z components and add the three products together:

a · b = x × u + y × v + z × w = ||a|| × ||b|| × cos(θ)

For the preloaded vectors a = (3, 4, 0) and b = (1, 2, 3), the component products are 3 × 1 = 3, 4 × 2 = 8, and 0 × 3 = 0, which sum to the scalar 11. Geometrically, the scalar dot product also equals ||a|| × ||b|| × cos(θ), where θ is the angle between the two vectors (0° <= θ <= 180°). To calculate the dot product of two 2D vectors (x, y) and (u, v), leave Z component and Second vector Z set to 0.

Diagram showing how the dot product calculator multiplies matching X, Y, and Z vector components
Component-wise multiplication (x·u + y·v + z·w) and geometric projection (||a|| ||b|| cos θ) for 3D and 2D vectors.

2D & 3D vector dot product reference table

Review these 10 canonical vector pairs to see how coordinate products (xu + yv + zw) determine the scalar dot product and the geometric angle between two vectors.

Vector ScenarioFirst Vector a = (x, y, z)Second Vector b = (u, v, w)Pairwise Products (xu + yv + zw)Dot Product (a · b)Geometric Angle & Interpretation
Preloaded Hybrid Pair(3, 4, 0)(1, 2, 3)3 + 8 + 011Acute alignment (θ ≈ 53.97°)
Orthogonal Unit Axes (i · j)(1, 0, 0)(0, 1, 0)0 + 0 + 00Perpendicular (θ = 90°)
Perpendicular 3D Vectors(2, -3, 1)(4, 2, -2)8 + (-6) + (-2)0Orthogonal in R³ (θ = 90°)
Collinear Parallel Vectors(2, 4, 6)(1, 2, 3)2 + 8 + 1828Same direction (θ = 0°, cos θ = 1)
Antiparallel Opposite Vectors(3, -4, 0)(-6, 8, 0)-18 + (-32) + 0-50Opposite direction (θ = 180°, cos θ = -1)
Self Dot Product (a · a = ||a||²)(3, 4, 12)(3, 4, 12)9 + 16 + 144169Squared magnitude (||a|| = sqrt(169) = 13)
2D Obtuse Vector Pair(4, 1, 0)(-2, 3, 0)-8 + 3 + 0-5Obtuse angle (θ ≈ 109.65°)
Cube Space & Face Diagonals(1, 1, 1)(1, 1, 0)1 + 1 + 02Angle θ = arccos(sqrt(2/3)) ≈ 35.26°
Physics Work (F · d)(12, 5, -2) N(4, -3, 6) m48 + (-15) + (-12)21 JPositive mechanical work (21 joules)
3D Graphics Normal Lighting(0, 0, 1)(0.5, 0.5, 0.7071)0 + 0 + 0.70710.7071Lambertian diffuse intensity (45° light)

How to use the dot product calculator step by step

Follow these three steps to enter your two vectors, compute their scalar dot product, and export the output.

Enter the first vector (X, Y, Z)

Type the Cartesian coordinates of your first vector (-1,000,000,000 to 1,000,000,000) into X component, Y component, and Z component (3, 4, 0 preloaded).

Input and settings
Step 1 input fields for X, Y, Z and Second vector X, Y, Z in the Dot Product Calculator
Step 1: Enter the first vector (3, 4, 0) and second vector (1, 2, 3) into the six Cartesian coordinate fields.

Enter the second vector (u, v, w)

Type the coordinates of your second vector into Second vector X, Second vector Y, and Second vector Z (set both Z fields to 0 for 2D vectors).

Tool result
Step 2 result panel displaying the scalar dot product 11
Step 2: Click Calculate result to compute 3(1) + 4(2) + 0(3) = 11 in the result panel.

Calculate and save the scalar result

Click Calculate result to evaluate xu + yv + zw immediately, then use Copy result or Download (result.txt) to save the scalar value.

Review the details
Step 3 full workspace view showing 11 with Copy and Download actions
Step 3: Review the scalar output 11 and use Copy result or Download (result.txt).

Vector dot product calculator examples: 3D, orthogonal & physics work

Test these three worked examples in the workspace to verify component summation, perpendicularity tests, and physics work calculations.

Preloaded 3D baseline ((3, 4, 0) · (1, 2, 3) = 11)

With X component = 3, Y component = 4, Z component = 0 and Second vector X = 1, Second vector Y = 2, Second vector Z = 3, clicking Calculate result evaluates 3(1) + 4(2) + 0(3) = 3 + 8 + 0 and returns 11. Because 11 > 0, the two vectors point in a generally similar direction (θ ≈ 53.97°).

Worked example 1 showing dot product of (3, 4, 0) and (1, 2, 3) equals 11
Worked Example 1: Preloaded vectors (3, 4, 0) and (1, 2, 3) yielding a scalar dot product of 11.

Orthogonality check ((2, -3, 1) · (4, 2, -2) = 0)

To test whether two 3D vectors meet at a 90-degree right angle, enter 2, -3, 1 for the first vector and 4, 2, -2 for the second vector. The calculator computes 2(4) + (-3)(2) + 1(-2) = 8 - 6 - 2 = 0, confirming that the two vectors are strictly perpendicular (cos 90° = 0).

Worked example 2 demonstrating orthogonal 3D vectors with zero dot product
Worked Example 2: Perpendicular 3D vectors (2, -3, 1) and (4, 2, -2) yielding a dot product of 0 (orthogonal).

Physics mechanical work (F = (12, 5, -2) N, d = (4, -3, 6) m → 21 J)

In classical mechanics, the work W done by a constant force vector F acting over a displacement vector d is the dot product W = F · d. Entering 12, 5, -2 (newtons) and 4, -3, 6 (meters) returns 12(4) + 5(-3) + (-2)(6) = 48 - 15 - 12 = 21 joules (J).

Worked example 3 computing mechanical work in joules using the Dot Product Calculator
Worked Example 3: Mechanical work W = F · d = (12, 5, -2) · (4, -3, 6) = 21 joules.

How to interpret positive, zero & negative dot product results

Unlike a cross product, the output of this tool is a single scalar real number (formatted up to 12 significant digits). Its sign and magnitude reveal the directional relationship between your two vectors:

A positive scalar (a · b > 0) means the angle between the vectors is acute (0° <= θ < 90°) and they reinforce each other; a zero result (a · b = 0) for nonzero vectors proves they are orthogonal (θ = 90°); and a negative scalar (a · b < 0) indicates an obtuse angle (90° < θ <= 180°) where the vectors oppose each other.

Dividing a · b by ||b|| gives the signed scalar projection of vector a onto vector b.

Diagram showing acute, perpendicular, and obtuse vector angles from dot product sign
Geometric interpretation of positive (acute θ < 90°), zero (orthogonal θ = 90°), and negative (obtuse θ > 90°) dot products.

Dot product of vectors calculator scope & related linear algebra tools

Keep these mathematical assumptions and companion tools in mind when chaining vector operations:

The formula xu + yv + zw assumes both vectors are expressed in the same right-handed orthonormal Cartesian basis (i, j, k) with compatible physical units. Because vector dot multiplication is commutative (a · b = b · a) and distributive over addition, swapping the first and second vectors produces the exact same scalar result.

Continue your linear algebra workflow using our related cross product, magnitude, projection, angle, and matrix multiplication calculators.

Scope and coordinate rules for the Dot Product Calculator
Orthonormal Cartesian coordinate requirements, commutativity (a · b = b · a), and scalar vs. vector output verification.

Frequently Asked Questions About Dot Product Calculator

Answers about using Dot Product Calculator and understanding its results.

How do you calculate the dot product of two 3D vectors?

Multiply the matching X, Y, and Z coordinates of the two vectors and add the three products together: a · b = x * u + y * v + z * w. For instance, given (2, 5, -1) and (4, -2, 3), the calculation is (2 × 4) + (5 × -2) + (-1 × 3) = 8 - 10 - 3 = -5.

Can I use this 3D Dot Product Calculator for 2D vectors?

Yes! Any 2D vector (x, y) lies in the xy-plane with z = 0. Enter your 2D coordinates into X component, Y component, Second vector X, and Second vector Y, and set both Z component and Second vector Z to 0.

What does it mean when the dot product of two vectors is 0?

When two nonzero vectors have a dot product of 0, they are orthogonal (perpendicular to each other, forming a 90-degree right angle) because cos(90°) = 0.

What is the difference between the dot product and the cross product?

The dot product (a · b = ||a|| ||b|| cos θ) measures how much two vectors align and returns a single scalar number. The cross product (a × b) measures perpendicular rotational area and returns a new 3D vector that is orthogonal to both original vectors.

How do I find the angle between two vectors using their dot product?

Divide the dot product a · b by the product of the two vector magnitudes ||a|| × ||b||, then take the inverse cosine: θ = arccos((a · b) / (||a|| ||b||)).

Calculate result with your input

Choose another tool for your next calculation, conversion, or text task.

Calculate result