The modulus of a vector r, usually written |r|, or sometimes simply r, is defined to be the length of the vector r. If r is written in terms of three orthonormal vectors (ie: mutually perpendicular vectors of unit length), i, j and k such that:
- r = xi+yj+zk,
It should be noted that the modulus of a vector is a scalar.
Modulus is also a synonym for:
- the absolute value of a complex number, defined to be the distance between the origin and the complex number, thought of as a point in the plane.
- the absolute value of a real number
- the number by which two numbers are said to be congruent in modular arithmetic. A related, incorrect use of 'modulus' is for the remainder after integer division (see below).
In computer programming, the modulus operator gives the remainder of integer division, ie modular arithmetic. Mathematicians tend to call this modulo, for example:
- 13 = 3 modulo 10
- 13 = 3 mod 10
C programmers will write:
- 13 % 10 = 3.