Skip to main content
Mathematics LibreTexts

3.2: Magnitude and Direction Cosines of a Vector

  • Page ID
    125036

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    The Magnitude of a Vector

    You likely recall that the magnitude (the length) of a vector \(\overrightarrow{v}\boldsymbol{=}\boldsymbol{\langle }v_x\boldsymbol{,\ }v_{\boldsymbol{y}}\boldsymbol{\rangle }\) in 2-dimensions is

    This picture shows how v = <v_x, v_y. The blue vector v and v_x have their starting points connected together. Vector v and v_y are connected together by their terminal points. The terminal point of v_x is connected to the starting point of v_y." src="/@api/deki/files/97413/clipboard_e54c0403f113cb233f89c9f459d41eeaa.png">

    \(\|\vec{v}\|=\sqrt{v_x^2+v_y^2}\)

    Example \(\PageIndex{1}\)

    The magnitude of vector \(\vec{v}=\langle 2,4\rangle\)

    Solution

    \(\begin{aligned}
    & \|\vec{v}\|=\sqrt{v_x{ }^2+v_y^2} \\
    & \sqrt{2^2+4^2}=\sqrt{4+16}=\sqrt{20}=2 \sqrt{5} \\
    & \|\vec{v}\|=2 \sqrt{5}
    \end{aligned}\)

    Interpret this as the length of the vector \(\vec{v}=\langle 2,4\rangle \) is \(2 \sqrt{5}\) units.

    Image of vector v in the xy plane where the starting point is (0,0) and the terminal point is (2,4).

    The formula for the length of the vector \(\vec{v}=\left\langle v_x, v_y, v_z\right\rangle\) in 3-dimensions is

    \(\|\vec{v}\|=\sqrt{v_x^2+v_y^2+v_z^2}\)

    Example \(\PageIndex{2}\)

    The magnitude of vector \(\vec{v}=\langle 2,4,-6\rangle\)

    Solution

    \(\begin{gathered}
    \|\vec{v}\|=\sqrt{v_x^2+v_y^2+v_z^2} \\
    \|\vec{v}\|={\sqrt{2^2+4^2+(-6)^2}}^{\|\vec{v}\|}=\sqrt{4+16+36} \\
    \|\vec{v}\|=\sqrt{56} \\
    \|\vec{v}\|=2 \sqrt{14}
    \end{gathered}\)

    Interpret this as the length of the vector \(\vec{v}=\langle 2,4,-6\rangle \text { is } 2 \sqrt{14}\) units.

    The Direction Cosines of Vectors in 2- and 3-Dimensions

    The direction cosines of a vector \(\overrightarrow{v}=\langle v_x,\ v_y\rangle\) or \(\overrightarrow{v}=\langle v_x,\ v_y,v_z\rangle\) are the cosines of the angles the vector forms with the coordinate axes.

    The direction cosines are important as they uniquely determine the direction of the vector.

    Direction cosines are found by dividing each component of the vector by the magnitude (length) of the vector.

    \(\cos \alpha=\frac{v_x}{\|\vec{v}\|}, \quad \cos \beta=\frac{v_y}{\|\vec{v}\|}\)

    Illustration of vector v in the xy plane where v is alpha degrees away from the x-axis and beta degrees away from the y-axis.

    \(\cos \alpha=\frac{v_x}{\|\vec{v}\|^{\prime}} \quad \cos \beta=\frac{v_y}{\|\vec{v}\|^{\prime}} \quad \cos \theta=\frac{v_z}{\|\vec{v}\|^{\prime}}\)

    Illustration of vector v in the xyz plane where v is alpha degrees away from the x-axis, beta degrees away from the y-axis, and the betata degrees away from the z-axis.

    Example \(\PageIndex{3}\)

    Find the direction cosines of the vector \(\overrightarrow{v}=\left\langle 4,\left.5,\ 2\right\rangle \right.\).

    Solution

    First, find the magnitude of the vector \(\overrightarrow{v}=\left\langle 4,\left.5,\ 2\right\rangle \right.\)

    \(\left\|\overrightarrow{v}\right\|=\sqrt{{v_x}^2+{v_y}^2+{v_z}^2}=\ \sqrt{4^2+5^2+2^2}=\ \sqrt{16+25+4}=\sqrt{45}=\sqrt{9\times 5}=3\sqrt{5} \)

    Get the direction cosines by dividing each component, 4, 5, and 2, by this magnitude.

    \(\begin{aligned}
    & \cos \alpha=\frac{v_x}{\|\vec{v}\|}=\frac{4}{3 \sqrt{5}} \approx 0.596 \\
    & \cos \beta=\frac{v_y}{\|\vec{v}\|}=\frac{5}{3 \sqrt{5}} \approx 0.745 \\
    & \cos \theta=\frac{v_z}{\|\vec{v}\|}=\frac{2}{3 \sqrt{5}} \approx 0.298
    \end{aligned}\)

    Example \(\PageIndex{4}\)

    Find the vector \(\overrightarrow{v}\) that has magnitude 32 and direction cosines \(\mathrm{cos}\alpha =5/8\) and \(\ \mathrm{cos}\beta =-3/8\).

    Solution

    Since \(\cos \alpha=\frac{v_x}{\|\vec{v}\|}\) and \(\cos \beta=\frac{v_y}{\|\vec{v}\|}\),

    \(v_x=\|\vec{v}\| \cdot \cos \alpha=32 \cdot \frac{5}{8}=20\), and

    \(v_y=\|\vec{v}\| \cdot \cos \beta=32 \cdot \frac{-3}{8}=-12\).

    So, \(\vec{v}=\langle 20,-12\rangle\).

    Using Technology

    We can use technology to determine the magnitude of a vector.

    Go to www.wolframalpha.com.

    To find the magnitude of the vector \(\overrightarrow{v}\boldsymbol{=}\left\langle 2,\left.4,\ -6\right\rangle ,\right.\) enter magnitude of \(\mathrm{<}\)2, 4, -6\(\mathrm{>}\) in the entry field. Wolframalpha tells you what it thinks you entered, then tells you its answer. In this case, \(\left\|\overrightarrow{v}\right\|=2\sqrt{14}\).

    This screenshot from WolframAlpha shows a calculation of the magnitude of <2,4, negative 6. The answer is 2 multiplied by the square root of 14." src="/@api/deki/files/97417/clipboard_ed73083bf6ed52a173f4dff61da5c0bce.png">

    To find the direction cosines of the vector \(\overrightarrow{v}\boldsymbol{=}\left\langle 4,\left.5,\ 2\right\rangle ,\right.\) enter evaluate 4/(magnitude of \(\mathrm{<}\)4,5,2\(\mathrm{>}\)), 5/(magnitude of \(\mathrm{<}\)4,5,2\(\mathrm{>}\)), 2/(magnitude of \(\mathrm{<}\)4,5,2\(\mathrm{>}\)) in the entry field. WolframAlpha answers \(\{0.596285,\ 0.745356,\ 0.298142\}\).

    We can use WolframAlpha to approximate a vector give its magnitude and direction cosines.

    This screenshot from WolframAlpha shows a calculation of the magnitude of three values. These three values are 4 divided by the magnitude of <4,5,2, 5 divided by the magnitude of <4,5,2>, and 2 divided by the magnitude of <4,5,2>. The answer is 4 over 3 times the square root of 5, square root of 5 divided by 3, 2 over start denominator three times the square root of 5 end denominator." src="/@api/deki/files/97418/clipboard_efcdfc03181976fbe8aeb9da126077dd4.png">

    Try These

    Exercise \(\PageIndex{1}\)

    Find the magnitude of the vector \(\vec{v}=\langle-3,4,-2\rangle\).

    Answer

    \(\left\|\overrightarrow{v}\right\|=\sqrt{29}\)

    Exercise \(\PageIndex{2}\)

    Find the magnitude of the vector \(\vec{v}=\langle 1,-1\rangle\).

    Answer

    \(\left\|\overrightarrow{v}\right\|=\sqrt{2}\)

    Exercise \(\PageIndex{3}\)

    Find the cosines of the vector \(\vec{v}=\langle 3,-1,2\rangle\). Round to three decimal places.

    Answer

    \(\mathrm{\{}\)0.802, -0.267, 0.535\(\mathrm{\}}\)

    Exercise \(\PageIndex{4}\)

    Approximate the vector \(\vec{v}\) that has magnitude 24 and direction cosines \(\cos \alpha=-3 / 4, \cos \beta=-1 / 4, \cos \theta=7 / 8\).

    Answer

    \(<-18,\ -6,\ 21>\)


    This page titled 3.2: Magnitude and Direction Cosines of a Vector is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Denny Burzynski (Downey Unified School District) .

    • Was this article helpful?