Skip to content
CALX
Appearance

Appearance

Mode


Palette

Vector calculator, dot product, cross product and angle

‖u‖ = √(uₓ² + u_y² + u_z²)

Enter two vectors of the plane or of space: the tool returns their norms and unit vectors, their sum, their difference, the product by a scalar, the dot product, the cross product (and the determinant in the plane), the parallelogram area, the angle in degrees and radians, the projection of one onto the other split into parallel and orthogonal parts, then concludes on collinearity or orthogonality. What is undefined is not invented: a zero vector has no direction and no angle, and the tool says so instead of returning zero.

Vector u
Vector v
Used for the k·u product shown below; it enters no other result.
Dot product u · v

32

Calculation
u · v = uₓvₓ + u_yv_y + u_zv_z = 32
Angle between u and v
θ = arccos(u · v / (‖u‖‖v‖)) = arccos(32 / (3.74166 × 8.77496)) = 12.9332°
Cross product u × v

(-3, 6, -3)

Calculation
u × v = (u_yv_z − u_zv_y, u_zvₓ − uₓv_z, uₓv_y − u_yvₓ) = (-3, 6, -3)
Parallelogram area
7.34847
Norm of u3.74166
Norm of v8.77496
Angle between u and v12.9332°
Unit vector of u(0.267261, 0.534522, 0.801784)
Unit vector of v(0.455842, 0.569803, 0.683763)
Distance between the endpoints5.19615
Sum u + v(5, 7, 9)
Difference u − v(-3, -3, -3)
Product 2 · u(2, 4, 6)
Scalar projection of u onto v3.64674
Projection of u onto v(1.66234, 2.07792, 2.49351)
Component of u orthogonal to v(-0.662338, -0.0779221, 0.506494)

The two vectors make an angle of 12.9332°, neither zero, nor right, nor straight: they are neither collinear nor orthogonal.

What the dot product measures: the part of u that goes along v, times the length of v. Positive, both vectors point the same way; negative, opposite ways; zero, they are perpendicular. It is what computes the work of a force in physics.

What the cross product measures: a vector perpendicular to the plane of u and v, whose length is the area of the parallelogram they span. Its direction follows the right-hand rule, and it flips sign if u and v are swapped.

Projection splits u into two parts: the one along v, and the one orthogonal to it. Adding them back gives u exactly, which the calculation above checks.

Scientific dossier


What the tool computes, what it assumes, where it stops being valid, and where its data comes from.

Method & formulas‖u‖ = √(uₓ² + u_y² + u_z²)

‖u‖ = √(uₓ² + u_y² + u_z²)

u · v = uₓvₓ + u_yv_y + u_zv_z

u × v = (u_yv_z − u_zv_y, u_zvₓ − uₓv_z, uₓv_y − u_yvₓ)

θ = arccos(u · v / (‖u‖‖v‖))

proj_v(u) = (u · v / ‖v‖²) v

The two products say the same thing from two sides: the dot product measures what two vectors have IN COMMON of direction, the cross product what separates them. Lagrange’s identity ties them together, ‖u × v‖² + (u · v)² = ‖u‖²‖v‖², and it is what guarantees that an angle drawn from the cosine also returns the right sine.

‖u‖
· norm of the vector, its length.
Unit vector
· u divided by its norm: same direction, length 1. Undefined for the zero vector.
u · v
· dot product, a number. Exactly zero when the two vectors are perpendicular.
u × v
· cross product, a vector perpendicular to both. Exactly zero when they are collinear.
Determinant
· in the plane, the z component of the cross product: uₓv_y − u_yvₓ. Its sign gives the sense of rotation.
Projection
· the part of u carried by the direction of v. The rest, u minus that part, is orthogonal to v.
Validity domainThe collinearity and orthogonality verdicts use a relative tolerance, applied to the cosine and sine of the angle rather than to the products themselves: an absolute threshold would call two tiny vectors perpendicular and two huge ones never.

The collinearity and orthogonality verdicts use a relative tolerance, applied to the cosine and sine of the angle rather than to the products themselves: an absolute threshold would call two tiny vectors perpendicular and two huge ones never. A genuine angle, even of a hundredth of a degree, is not mistaken for collinearity. The zero vector is handled separately: it has no direction, hence no unit vector, and the angle it makes with another does not exist. Those outputs are declared undefined, never rounded down to zero. In dimension 2 the z components are neither entered nor used: the plane is treated as space with z = 0, one algebra for both cases.

Reading the resultThe sign of the dot product is read before its value: positive, both vectors point the same way; negative, opposite ways; zero, they are perpendicular.

The sign of the dot product is read before its value: positive, both vectors point the same way; negative, opposite ways; zero, they are perpendicular. The norm of the cross product is the area of the parallelogram built on the two vectors, hence twice the area of the triangle they form. In the plane, that product leaves the plane and reduces to one number, the determinant, whose sign tells whether the turn from u to v is counterclockwise.