Vector operations
dot productcross productvector componentsresultant vectorvector magnitude
Magnitude, direction, components and unit vectors, plus the dot and cross products and the projections and angles they give you.
Magnitude of a 2D Vector
Finds the length of a two-dimensional vector from its x- and y-components, the Pythagorean theorem written for arrows instead of triangles.
Magnitude of a 3D Vector
Finds the length of a three-dimensional vector from its x-, y-, and z-components, extending Pythagoras into space.
Direction Angle of a 2D Vector
Gives the direction a two-dimensional vector points, measured counterclockwise from the positive x-axis, from its two components.
x-Component from Magnitude and Angle
Resolves a vector into its horizontal part from the vector's length and the angle it makes with the positive x-axis.
y-Component from Magnitude and Angle
Resolves a vector into its vertical part from the vector's length and the angle it makes with the positive x-axis.
Unit Vector Component (Normalization)
Scales one component of a vector down to the matching component of the unit vector that points the same way, by dividing by the magnitude.
Resultant of Two Vectors at an Angle
Finds the magnitude of the sum of two vectors from their lengths and the angle between them, the parallelogram rule in one equation.
Dot Product of Two 2D Vectors (Components)
Multiplies two plane vectors component by component and adds the results, giving the scalar that measures how much they share a direction.
Dot Product from Magnitudes and Included Angle
Gives the scalar product of two vectors from their lengths and the angle between them, the geometric face of the dot product.
Angle Between Two 2D Vectors (Components)
Finds the angle separating two plane vectors directly from their four components, by way of the normalized dot product.
Cross Product Magnitude
Gives the length of the cross product of two vectors from their magnitudes and the angle between them, equal to the area they span.
Scalar Projection of One Vector onto Another
Measures how far a vector reaches along the direction of another, the length of the shadow it casts on that second vector.
How they fit together
A vector can be carried in two currencies — magnitude and direction, or x and y components — and half of this page is exchange rates between them. Components come from magnitude times cosine and sine; magnitude comes back from Pythagoras and direction from the arctangent. Adding vectors is easy in components and awkward in magnitudes, which is why the standard move is to break everything into components, add, and convert back.
The two products answer different questions and are not interchangeable. The dot product returns a scalar and measures alignment: it is zero for perpendicular vectors, which makes it the tool for work, for projections and for finding the angle between two directions. The cross product returns a vector perpendicular to both and measures the failure to be parallel: it is zero for parallel vectors, and it is what torque, angular momentum and magnetic force are built from. Two traps worth naming: a plain arctangent cannot tell the second quadrant from the fourth, so always check the signs of the components against the quadrant you expect; and a unit vector must be divided by the magnitude of the whole vector, not by its largest component.