The dot product is one of the most useful operations in vector algebra: it turns two vectors into a single number that tells you how much they point in the same direction. This calculator computes a · b for 2D or 3D vectors, converts that result into the angle between the vectors, and flags when the vectors are orthogonal.

How the Dot Product Calculator works

Given two vectors a and b of the same dimension, the calculator sums the products of their matching components: a · b = axbx + ayby (2D) or axbx + ayby + azbz (3D). It then computes each vector's magnitude (|a| and |b|) and uses the identity a · b = |a||b|cos θ to solve for the angle θ = arccos((a · b) / (|a||b|)). Finally, it checks whether a · b equals zero (within floating-point tolerance) to report orthogonality.

Inputs and what they mean

Pick 2D or 3D from the dimension selector, then enter the x, y (and z, for 3D) components of vector a and vector b. Components can be positive, negative, zero, or decimals. There is no unit conversion — the result is in the same units as your inputs (e.g., if your components are in meters, the dot product and magnitudes are in meter-based units, and the angle is always reported in degrees). The sign of the dot product is informative on its own: positive means the vectors generally point the same way (angle under 90°), negative means they generally point opposite ways (angle over 90°), and zero means they're exactly perpendicular.

Limits and edge cases

The angle between vectors is undefined when either vector has zero magnitude — there is no direction to measure from a zero vector, so the Angle Between and Orthogonal Check tabs will show a message instead of a number in that case. This calculator handles 2D and 3D vectors; for higher-dimensional (nD) dot products, the same Σaᵢbᵢ formula applies, just extended with more terms — you can compute those by hand or with a general-purpose math tool. Floating-point rounding means the orthogonality check uses a small numerical tolerance rather than requiring the dot product to be exactly 0.