Skip to content
Formulaxis

Toolbox

Vectors: calculating sum, magnitude and unit vector

Add or subtract two vectors, multiply a vector by a number, calculate its norm or normalise it. Choose the operation in 2D or 3D; normalisation preserves direction and gives a norm of 1.

Created on , Revised on v2.0

Method and validation

Vectors: calculating sum, magnitude and unit vector

dimensionless

Signed component of u on the x-axis, in the orthonormal coordinate system shared by the vectors.

dimensionless

Signed component of u on the y-axis, in the orthonormal coordinate system shared by the vectors.

dimensionless

Signed component of v on the x-axis, in the orthonormal coordinate system shared by the vectors.

dimensionless

Signed component of v on the y-axis, in the orthonormal coordinate system shared by the vectors.

Initial values are examples.

Results

Result x component wx
7dimensionless
Result y component wy
1dimensionless

Substitution in SI units

wx=3+4=7

An orthonormal coordinate system shared by both vectors.

Addition using the triangle rule

Vectors: calculating sum, magnitude and unit vector · 2D — Sum u + vOrthonormal coordinate system; directions and length ratios follow the entered components.xyu = (3 ; 4)v = (4 ; -3)u + v = (7 ; 1)

Orthonormal coordinate system; directions and length ratios follow the entered components.

Illustrative diagram, not to scale.

Estimated reading time : 5 min · 818 words

Calculation details

Sum, difference and multiplication operations give the components of a vector. The norm is a number; normalisation gives the components of the unit vector.

01 · Result x component

FORMULA

wx=ux+vx

NUMERICAL SUBSTITUTION

wx=3+4

RESULT

wx=7

02 · Result y component

FORMULA

wy=uy+vy

NUMERICAL SUBSTITUTION

wy=4+(−3)

RESULT

wy=1

Components, length and unit vector

A vector’s components depend on the chosen coordinate system. Here, the system is Cartesian and orthonormal, and the vectors are mathematical objects without units. Addition and subtraction are performed component by component. Multiplication by a negative number reverses direction. Normalisation divides the components by the norm to obtain a norm equal to 1, without changing direction or orientation.

Formulas and symbols

The following relationships use the symbols defined below.

wx=ux+vx(result x component)

wy=uy+vy(result y component)

wx=ux−vx(result x component)

wy=uy−vy(result y component)

wx=k×ux(result x component)

wy=k×uy(result y component)

Nu=ux2+uy2(magnitude of u)

ûx=uxux2+uy2(result x component)

ûy=uyux2+uy2(result y component)

wx=ux+vx(result x component)

wy=uy+vy(result y component)

wz=uz+vz(result z component)

wx=ux−vx(result x component)

wy=uy−vy(result y component)

wz=uz−vz(result z component)

wx=k×ux(result x component)

wy=k×uy(result y component)

wz=k×uz(result z component)

Nu=ux2+uy2+uz2(magnitude of u)

ûx=uxux2+uy2+uz2(result x component)

ûy=uyux2+uy2+uz2(result y component)

ûz=uzux2+uy2+uz2(result z component)

  • u and v: vectors with components ux, uy and optionally uz, and vx, vy, vz.
  • k: real scalar multiplier.
  • w: result vector.
  • ‖u‖: Euclidean norm.
  • û: unit vector with the same direction and orientation as u. All components have no units in this calculator; in 2D, no third component is involved.

Operations and results

OperationDataResult
SumTwo vectors of the same dimensionOne vector
Scalar multiplicationA number k and a vectorOne vector
NormOne vectorA nonnegative number
NormalisationA nonzero vectorA vector with norm 1
DifferenceTwo vectors of the same dimensionA vector; order matters

OpenStax — vector equations ; Wolfram MathWorld — Vector Norm.

Worked examples

Example 1: Sum u + v in 2D

For u = (3 ; −2) and v = (−1 ; 5), the sum is (2 ; 3).

Example 2: Difference u − v in 2D

For u = (3 ; −2) and v = (−1 ; 5), u − v is (4 ; −7).

Example 3: Multiplication k×u in 2D

Multiplying u = (3 ; −2) by −2 gives (−6 ; 4): the direction is reversed and the norm doubled.

Example 4: Norm of u in 2D

For u = (3 ; −2), the sum of squares is 13 and the norm is 13, approximately 3,606.

Example 5: Unit vector of u in 2D

Dividing (3 ; −2) by 13 gives approximately (0,83205 ; −0,55470), with norm 1.

Example 6: Sum u + v in 3D

The sum of (2 ; −3 ; 6) and (1 ; 4 ; −2) is (3 ; 1 ; 4).

Example 7: Difference u − v in 3D

The difference (2 ; −3 ; 6) − (1 ; 4 ; −2) is (1 ; −7 ; 8).

Example 8: Multiplication k×u in 3D

Multiplying (2 ; −3 ; 6) by −2 gives (−4 ; 6 ; −12).

Example 9: Norm of u in 3D

The sum of squares of (2 ; −3 ; 6) is 49, so its norm is 7.

Example 10: Unit vector of u in 3D

The norm of (2 ; −3 ; 6) is 7; the unit vector is (2/7 ; −3/7 ; 6/7).

Assumptions and limitations

An orthonormal coordinate system shared by both vectors. Vectors with more than three components and physical units are not supported. Normalisation requires a nonzero vector. Unit-vector components are rounded for display; their norm recalculated from those rounded figures may differ slightly from 1.

Common mistakes

Add components, not norms. Distinguish k×u, which gives a vector, from the dot product u · v, which gives a number and has a separate page. The zero vector has zero norm but no defined direction.

Frequently asked questions

Can the zero vector be normalised?

No, because division by its zero norm is undefined. The norm mode, however, correctly returns zero.

Does a negative component mean a negative norm?

No. The sign describes direction along an axis. The norm is the square root of a sum of squares, so it is always nonnegative.

Does input order change the result?

Addition is commutative. Reversing a subtraction reverses every component while preserving its norm. Identify start and end before interpreting a displacement.

Does a unit vector have all components equal to one?

No. Its total norm is one, so the sum of squared components is one. Components may be zero or negative.