Direction of a vector in $\mathbb{R}^3$

130 Views Asked by At

Given a vector in $v\in \Bbb R^2, v=(v_1, v_2)$, if I want to calculate the direction of the vector, I would use:

$$ \theta = \arctan \Bigl(\frac{v_2}{v_1}\Bigr) $$

What would be formula for $v \in\Bbb R^3$ ?

3

There are 3 best solutions below

3
On BEST ANSWER

For $v$ in a 3-dimensional space, you can either use cylindrical or spherical coordinates (other exists but are too complicated).

Basically, you can express $v$ as linked with $(r,\theta,z)$ for cylindrical (two length, one angle) or $(r,\theta, \varphi)$ for spherical, or completely with Euler angles $(\alpha , \beta , \gamma )$.

For cartesian coordinates to spherical coordinates:

$r = \sqrt{x^2 + y^2 + z^2}$ and $\varphi = arccos(z/r)$ and $y\geq 0, \theta = arccos(\frac{x}{\sqrt{x^2+y^2}})$ and $y<0, \theta = 2\pi - arccos(\frac{x}{\sqrt{x^2+y^2}})$

You can find cartesian to cylindrical on the related Wikipedia article.

0
On

You'd generally use spherical coordinates, where instead of just $\theta$, you would have an altitude angle, $\theta$, and an azimuthal angle, $\phi$.

If you draw your coordinate axes, and draw a radius from the origin, you can deduce the proper expressions for these angles pretty easily from the geometry. For further information on spherical coordinates, see the wikipedia article: https://en.wikipedia.org/wiki/Spherical_coordinate_system, specifically the section titled "Coordinate system conversions."

0
On

There are some ways to determine the direction of the vector, depending on what references you take.

If $v=(v_x,v_y,v_z)$, you can take the angles form by the vectors of the three axis. Each axis and $v$ will form a plane, so if you denote $\alpha$ the angle between the positive axis $x$ and $v$ in the plane determined by them, $\beta$ the angle between the positive axis $y$ and $v$ and $\gamma$ the angle between the positive axis $z$ and $v$, then $$\cos\alpha =\frac{v_x}{|v|}, \quad \cos\beta =\frac{v_y}{|v|}, \quad \cos\gamma =\frac{v_z}{|v|}$$.

Also, you can take the angle $\varphi$ defined as the angle between the projection of $v$ in the $xy$ plane and the positive axis $x$ and the angle $\theta$ as the angle between $v$ and the positive axis $z$. Then, $$\cos\theta=\frac{v_z}{|v|}, \quad \tan\varphi=\frac{v_y}{v_x}$$