Skip to content
CALX
Appearance

Appearance

Light or dark

Colour
Accessibility

Vector calculator, dot product, cross product and angle

Norms, sum, dot product, cross product, angle, projection and a collinearity test, in the plane as in space.

Parameters

Vector u
Vector v
Used only for the k·u product.

Result

Dot productu · v

7

Calculation
u · v = uₓvₓ + uyvy + uzvz = 7
Angle between u and v
θ = arccos(u · v / (‖u‖‖v‖)) = arccos(7 / (4.12311 × 3.16228)) = 57.5288°
Determinant11
Calculation
u × v = (u_yv_z − u_zv_y, u_zvₓ − uₓv_z, uₓv_y − u_yvₓ) = (0, 0, 11)
Parallelogram area
11
02.55024xyuvu + v57.5°area 11

Each vector

Norm of u
4.12311
Norm of v
3.16228
Unit vector of u
(0.970 143, 0.242 536)
Unit vector of v
(0.316 228, 0.948 683)

What links u and v

Angle between u and v
57.5288°
Distance between the endpoints
3.60555

Combinations

Sum u + v
(5, 4)
Difference u − v
(3, −2)
Product 2 · u
(8, 2)

Decomposition of u onto v

Scalar projection of u onto v
2.21359
Projection of u onto v
(0.7, 2.1)
Component of u orthogonal to v
(3.3, −1.1)
Notes (2)

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

In the plane, u × v lies along z; that component is the determinant, positive counterclockwise.

Calculation, assumptions and sources

OverviewFor two vectors of the plane or of space: norms and unit vectors, sum, difference, product by a scalar, dot product, cross product (determinant in the plane), parallelogram area, angle in degrees and radians, projection of one onto the other (parallel and orthogonal parts), collinearity and orthogonality tests.

For two vectors of the plane or of space: norms and unit vectors, sum, difference, product by a scalar, dot product, cross product (determinant in the plane), parallelogram area, angle in degrees and radians, projection of one onto the other (parallel and orthogonal parts), collinearity and orthogonality tests. For a zero vector, direction and angle are marked undefined.

Method & formulas‖u‖ = √(uₓ² + u_y² + u_z²)
‖u‖ = √(uₓ² + uy² + uz²)u · v = uₓvₓ + uyvy + uzvzu × v = (uyvz − uzvy, uzvₓ − uₓvz, uₓvy − uyvₓ)θ = arccos(u · v / (‖u‖‖v‖))projv(u) = (u · v / ‖v‖²) v

The dot product carries the cosine of the angle, the cross product its sine. Lagrange’s identity ties them together: ‖u × v‖² + (u · v)² = ‖u‖²‖v‖².

‖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. Positive, both vectors point the same way; negative, opposite ways; exactly zero when they are perpendicular.
u × v
cross product, a vector perpendicular to both, exactly zero when they are collinear. Its norm is the area of the parallelogram built on u and v, twice that of the triangle.
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 tests apply a relative tolerance to the cosine and sine of the angle, not to the products: their answer does not depend on the size of the vectors.

The collinearity and orthogonality tests apply a relative tolerance to the cosine and sine of the angle, not to the products: their answer does not depend on the size of the vectors. An angle of a hundredth of a degree is not taken for collinearity. In dimension 2, the z components are 0.