In
analytic geometry
In mathematics, analytic geometry, also known as coordinate geometry or Cartesian geometry, is the study of geometry using a coordinate system. This contrasts with synthetic geometry.
Analytic geometry is used in physics and engineering, and als ...
, the direction cosines (or directional cosines) of a
vector
Vector most often refers to:
* Euclidean vector, a quantity with a magnitude and a direction
* Disease vector, an agent that carries and transmits an infectious pathogen into another living organism
Vector may also refer to:
Mathematics a ...
are the
cosine
In mathematics, sine and cosine are trigonometric functions of an angle. The sine and cosine of an acute angle are defined in the context of a right triangle: for the specified angle, its sine is the ratio of the length of the side opposite that ...
s of the angles between the vector and the three positive coordinate axes. Equivalently, they are the contributions of each component of the
basis to a
unit vector
In mathematics, a unit vector in a normed vector space is a Vector (mathematics and physics), vector (often a vector (geometry), spatial vector) of Norm (mathematics), length 1. A unit vector is often denoted by a lowercase letter with a circumfle ...
in that
direction.
Three-dimensional Cartesian coordinates

If is a
Euclidean vector
In mathematics, physics, and engineering, a Euclidean vector or simply a vector (sometimes called a geometric vector or spatial vector) is a geometric object that has magnitude (or length) and direction. Euclidean vectors can be added and scal ...
in
three-dimensional
In geometry, a three-dimensional space (3D space, 3-space or, rarely, tri-dimensional space) is a mathematical space in which three values (''coordinates'') are required to determine the position (geometry), position of a point (geometry), poi ...
Euclidean space
Euclidean space is the fundamental space of geometry, intended to represent physical space. Originally, in Euclid's ''Elements'', it was the three-dimensional space of Euclidean geometry, but in modern mathematics there are ''Euclidean spaces ...
,
where are the
standard basis
In mathematics, the standard basis (also called natural basis or canonical basis) of a coordinate vector space (such as \mathbb^n or \mathbb^n) is the set of vectors, each of whose components are all zero, except one that equals 1. For exampl ...
in Cartesian notation, then the direction cosines are
It follows that by squaring each equation and adding the results
Here are the direction cosines and the Cartesian coordinates of the
unit vector
In mathematics, a unit vector in a normed vector space is a Vector (mathematics and physics), vector (often a vector (geometry), spatial vector) of Norm (mathematics), length 1. A unit vector is often denoted by a lowercase letter with a circumfle ...
and are the direction angles of the vector .
The direction angles are
acute or
obtuse angle
In Euclidean geometry, an angle can refer to a number of concepts relating to the intersection of two straight lines at a point. Formally, an angle is a figure lying in a plane formed by two rays, called the '' sides'' of the angle, sharing ...
s, i.e., , and , and they denote the angles formed between and the unit basis vectors .
General meaning
More generally, direction cosine refers to the cosine of the angle between any two
vector
Vector most often refers to:
* Euclidean vector, a quantity with a magnitude and a direction
* Disease vector, an agent that carries and transmits an infectious pathogen into another living organism
Vector may also refer to:
Mathematics a ...
s. They are useful for forming
direction cosine matrices that express one set of
orthonormal
In linear algebra, two vectors in an inner product space are orthonormal if they are orthogonal unit vectors. A unit vector means that the vector has a length of 1, which is also known as normalized. Orthogonal means that the vectors are all perpe ...
basis vectors in terms of another set, or for expressing a known
vector
Vector most often refers to:
* Euclidean vector, a quantity with a magnitude and a direction
* Disease vector, an agent that carries and transmits an infectious pathogen into another living organism
Vector may also refer to:
Mathematics a ...
in a different basis. Simply put, direction cosines provide an easy method of representing the direction of a vector in a Cartesian coordinate system.
Applications
Determining angles between two vectors
If vectors and have direction cosines and respectively, with an angle between them, their units vectors are
Taking the
dot product
In mathematics, the dot product or scalar productThe term ''scalar product'' means literally "product with a Scalar (mathematics), scalar as a result". It is also used for other symmetric bilinear forms, for example in a pseudo-Euclidean space. N ...
of these two unit vectors yield,
where is the angle between the two unit vectors, and is also the angle between and .
Since is a geometric angle, and is never negative. Therefore only the positive value of the dot product is taken, yielding us the final result,
See also
*
Cartesian tensor
In geometry and linear algebra, a Cartesian tensor uses an orthonormal basis to represent a tensor in a Euclidean space in the form of components. Converting a tensor's components from one such basis to another is done through an orthogonal tran ...
*
Euler angles
The Euler angles are three angles introduced by Leonhard Euler to describe the Orientation (geometry), orientation of a rigid body with respect to a fixed coordinate system.Novi Commentarii academiae scientiarum Petropolitanae 20, 1776, pp. 189� ...
References
*
*
*
*
*
Algebraic geometry
Vectors (mathematics and physics)
{{Geometry-stub