Vector

Use this calculator

A vector is an ordered collection of components representing magnitude and direction or other multicomponent data. Vector magnitude gives length, the dot product gives a scalar, and the three-dimensional cross product gives a perpendicular vector.

Magnitude, direction and products

\parallel \mathbf{a} \parallel = \sqrt{\sum_{i}a_{i}^{2}}
\mathbf{a} \cdot \mathbf{b} = \sum_{i}a_{i}b_{i}

aᵢ and bᵢ are corresponding components; ||a|| is Euclidean magnitude; a·b is the dot product. The angle mode uses cosθ = (a·b)/(||a||||b||), and returns degrees.

Enter vectors in the selected mode

Choose Magnitude, Dot, Cross, Angle, or Normalize. Enter the comma-separated Vector A components, and Vector B when the mode requires it. Cross labels both vectors 3D; Calculate returns the corresponding scalar or component array.

How results depend on dimension

Magnitude returns |A|, Dot returns A · B, Cross returns A × B, Angle returns an angle in degrees, and Normalize returns a unit-length version of A. Vector lengths must be compatible for binary operations; zero-length inputs cannot be normalized or used for an angle.

Dot product geometry

Positive, zero and negative dot products correspond to acute, perpendicular and obtuse angles for nonzero vectors. For (1,0)·(0,1)=0, the angle is 90°.

A=(3,4) extends 3 right and 4 up; magnitude = 5

Positive, zero and negative dot products correspond to acute, perpendicular and obtuse angles for nonzero vectors. For (1,0)·(0,1)=0, the angle is 90°.

Why cross is three-dimensional

The cross product gives a vector perpendicular to both input vectors. The direction follows the right-hand rule; reversing operand order reverses its sign.

A=(1,0), B=(0,1), angle=90°

The cross product gives a vector perpendicular to both input vectors. The direction follows the right-hand rule; reversing operand order reverses its sign.

Unit vectors

Dividing a vector by its magnitude preserves direction and changes its length to one. Unit vectors are useful for separating direction from strength or distance.

A=(3,4) → divide by 5 → (0.6,0.8)

Dividing a vector by its magnitude preserves direction and changes its length to one. Unit vectors are useful for separating direction from strength or distance.

Quick answers

What format does a vector use?

Enter components in the numbered list field, separated as a numeric list.

Why does Angle reject a zero vector?

An angle needs two nonzero directions.

Which mode outputs a 3D vector?

Cross gives a perpendicular three-component result.