Skip to main content
Engineering LibreTexts

2.5: Complex numbers

  • Page ID
    103430
  • \( \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}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    Working with complex numbers can simplify the analysis of the dynamics in many cases. In particular when working with vibrations, we will use complex
    numbers a lot to simplify solving differential equations, see Ch. 13 . When you know how to work with complex numbers, it saves you remembering many trigonometric equations. Here we will only summarise the most useful relations for complex numbers that are part of most introductory mathematical analysis courses.

    A complex number \(y\) can be written as the sum of a real part \(y_{\mathrm{r}}\) and an imaginary part \(y_{\mathrm{i}}\) multiplied by the imaginary unit \(i\). We now summarise some of the properties of complex numbers that you should be able to use. Especially the first three are important, since by using the normal rules for calculating with scalars the rest of the properties can be proven from them.

    \[\begin{align} i^{2} & =-1=e^{i \pi} \tag{2.27} \label{2.27}\\[4pt] y & =y_{\mathrm{r}}+i y_{\mathrm{i}}=|y| e^{i \varphi} \tag{2.28} \label{2.28}\\[4pt] e^{i x} & =\cos x+i \sin x \text { Euler's formula } \tag{2.29} \label{2.29}\\[4pt] \Re y & =\operatorname{Re}(y)=y_{\mathrm{r}}=|y| \cos \varphi \text { Real part of } y \tag{2.30} \label{2.30}\\[4pt] \Im y & =\operatorname{Im}(y)=y_{\mathrm{i}}=|y| \sin \varphi \text { Imaginary part of } y \\[4pt] \varphi & =\arctan \frac{y_{\mathrm{i}}}{y_{\mathrm{r}}} \text { Argument of } y \text { for }^{3} y_{\mathrm{r}}>0 \tag{2.31} \label{2.31}\\[4pt] y^{*} & =\bar{y}=y_{\mathrm{r}}-i y_{\mathrm{i}} \text { Complex conjugate (c.c.) } \tag{2.32} \label{2.32}\\[4pt] {\left[f\left(y_{\mathrm{r}}+i y_{\mathrm{i}}\right)\right]^{*} } & =f\left(y_{\mathrm{r}}-i y_{\mathrm{i}}\right) \text { Replace } i \text { by }-i \text { for c.c. }{ }^{4} \tag{2.33} \label{2.33}\\[4pt] |y| & =\sqrt{y_{\mathrm{r}}^{2}+y_{\mathrm{i}}^{2}}=\sqrt{y \cdot y^{*}} \text { Absolute value } \tag{2.34} \label{2.34}\\[4pt] \sin x & =\frac{1}{2 i}\left(e^{i x}-e^{-i x}\right) \tag{2.35} \label{2.35}\\[4pt] \cos x & =\frac{1}{2}\left(e^{i x}+e^{-i x}\right) \tag{2.36} \label{2.36}\\[4pt] \frac{1}{y} & =\frac{1}{y} \frac{y^{*}}{y^{*}}=\frac{y^{*}}{|y|^{2}} \tag{2.37} \label{2.37}\\[4pt] y^{x} & =|y|^{x} e^{i x(\varphi+2 n \pi)}, n=\ldots,-1,0,1,2, \ldots \tag{2.38} \label{2.38}\end{align}\]

    Example 2.7

    If you can work well with complex numbers, there is no need any more to memorise or look up trigonometric sum and product equations. As an example, use complex numbers to show that:

    \[\Re e^{i(a+b)}=\cos (a+b)=\cos a \cos b-\sin a \sin b \nonumber\]

    Exemplary solution

    \[\begin{align} \Re e^{i(a+b)} & =\cos (a+b)=\Re\left[e^{i a} \times e^{i b}\right] \\[4pt] \Re\left[e^{i a} \times e^{i b}\right] & =\Re[(\cos a+i \sin a)(\cos b+i \sin b)] \\[4pt] & =\cos a \cos b-\sin a \sin b \tag{2.39} \label{2.39}\end{align}\]

    So, if you can solve this problem, you don’t have to memorise any trigonometric sum, difference or double angle formula anymore, you can easily derive cosine and sine functions with complex numbers, taking the real or imaginary parts of \(e^{i(a \pm b)}\) or \(e^{2 a}=e^{a+a}\).

    Another useful property of complex numbers is that their real and imaginary parts behave as the \(x\) and \(y\) components of a vector in the \(x y\)-plane, where \(\varphi\) is the angle they make with the \(x\) axis. Thus complex numbers can be practical for adding planar vectors.

    Example 2.8

    Two force vectors \(\overrightarrow{\boldsymbol{F}}_{1}\) and \(\overrightarrow{\boldsymbol{F}}_{2}\) that both lie in the \(x y\)-plane act on a point \(A\). The angles that the vectors make with the \(x\) axis are \(\varphi_{1}\) and \(\varphi_{2}\). Calculate the absolute value of the total force vector \(\overrightarrow{\boldsymbol{F}}_{\text {tot }}=\overrightarrow{\boldsymbol{F}}_{1}+\overrightarrow{\boldsymbol{F}}_{2}\) acting on \(A\).

    Solution

    We replace the vectors by the complex numbers \(F_{\text {tot }}, F_{c 1}\) and \(F_{c 2}\), where we use that \(\Re F_{c 1}=F_{1, x}\) and \(\Im F_{c 1}=F_{1, y}\). Then we have:

    \[\begin{align} \left|\overrightarrow{\boldsymbol{F}}_{\mathrm{tot}}\right|^{2} & =\left|F_{c 1}+F_{c 2}\right|^{2}=\left(F_{c 1}+F_{c 2}\right)\left(F_{c 1}+F_{c 2}\right)^{*} \\[4pt] & =F_{c 1} F_{c 1}^{*}+F_{c 2} F_{c 2}^{*}+F_{c 1} F_{c 2}^{*}+F_{c 2} F_{c 1}^{*} \\[4pt] & =\left|F_{c 1}\right|^{2}+\left|F_{c 2}\right|^{2}+\left|F_{c 1}\right| e^{i \varphi_{1}}\left|F_{c 2}\right| e^{-i \varphi_{2}}+\left|F_{c 2}\right| e^{i \varphi_{2}}\left|F_{c 1}\right| e^{-i \varphi_{1}} \\[4pt] & =\left|F_{c 1}\right|^{2}+\left|F_{c 2}\right|^{2}+\left|F_{c c}\right|\left|F_{c 2}\right|\left[e^{i\left(\varphi_{2}-\varphi_{1}\right)}+e^{-i\left(\varphi_{2}-\varphi_{1}\right)}\right] \\[4pt] & =\left|\overrightarrow{\boldsymbol{F}}_{1}\right|^{2}+\left|\overrightarrow{\boldsymbol{F}}_{2}\right|^{2}+2\left|\overrightarrow{\boldsymbol{F}}_{1}\right|\left|\overrightarrow{\boldsymbol{F}}_{2}\right| \cos \left(\varphi_{2}-\varphi_{1}\right) \tag{2.40} \label{2.40}\end{align}\]

    Taking the square root of this equation gives the absolute value of \(\left|\overrightarrow{\boldsymbol{F}}_{\text {tot }}\right|\). Note that the equation we have derived is called the ’Law of cosines’. With complex numbers there is no need to memorise it.

    Example 2.9

    An important application of complex numbers is for analysing vibrations, as we will discuss in Ch. 13. A mass can vibrate at two angular frequencies \(\omega_{1}\) and \(\omega_{2}\) simultaneously, in which case its motion is written as: \(x_{\mathrm{tot}}(t)=\cos \left(\omega_{1} t\right)+\) \(\cos \left(\omega_{2} t\right)\). Show that this sum of trigonometric functions can also be written as a product of trigonometric functions: \(x_{\text {tot }}(t)=2 \cos \left[\frac{1}{2}\left(\omega_{1}+\omega_{2}\right) t\right] \cos \left[\frac{1}{2}\left(\omega_{2}-\omega_{1}\right) t\right]\). This mathematical result leads to an important phenomenon called beating where the amplitude of vibrations, like sound, is modulated in time as shown in Figure 2.1.

    2024_05_26_bb4f60b7a8d3c1ec2437g-035.jpg
    Figure 2.1: Plot of the function \(x_{\text {tot }}(t)=\cos \omega_{1} t+\cos \omega_{2} t\) from example 2.9 and its envelope for \(\omega_{1}=19\) and \(\omega_{2}=20\). It is composed of the product of a high frequency cosine, with average frequency \(\omega_{\text {avg }}=\frac{1}{2}\left(\omega_{1}+\omega_{2}\right)\) and a low frequency cosine with beat frequency \(\omega_{\text {beat }}=\frac{1}{2}\left(\omega_{2}-\omega_{1}\right)\). The observed time varying amplitude of the high frequency cosine function is also called beating with \(x_{\text {tot }}(t)=2 \cos \left(\omega_{\text {beat }} t\right) \cos \left(\omega_{\text {avg }} t\right)\).
    Solution

    You can perform this derivation in two directions. We first start from the sum and prove that it is equal to the product:

    \[\begin{align} x_{\mathrm{tot}}(t)= & \Re\left[e^{i \omega_{1} t}+e^{i \omega_{2} t}\right] \\[4pt] & \text { Now we multiply by } 1=e^{i \frac{1}{2}\left(\omega_{1}+\omega_{2}\right) t} e^{-i \frac{1}{2}\left(\omega_{1}+\omega_{2}\right) t} \\[4pt] = & \Re\left[e^{i \frac{1}{2}\left(\omega_{1}+\omega_{2}\right) t}\left[e^{i \frac{1}{2}\left(\omega_{1}-\omega_{2}\right) t}+e^{i \frac{1}{2}\left(\omega_{2}-\omega_{1}\right) t}\right]\right] \\[4pt] = & \Re\left[e^{i \frac{1}{2}\left(\omega_{1}+\omega_{2}\right) t}\right] 2 \cos \frac{1}{2}\left(\omega_{2}-\omega_{1}\right) t \\[4pt] = & 2 \cos \left[\frac{1}{2}\left(\omega_{1}+\omega_{2}\right) t\right] \cos \left[\frac{1}{2}\left(\omega_{2}-\omega_{1}\right) t\right] \tag{2.41} \label{2.41}\end{align}\]

    Now we start from the given product and prove that it is equal to the sum:\[\begin{align} x_{\mathrm{tot}}(t) & =2 \cos \left[\frac{1}{2}\left(\omega_{1}+\omega_{2}\right) t\right] \cos \left[\frac{1}{2}\left(\omega_{2}-\omega_{1}\right) t\right] \\[4pt] & =\frac{1}{2}\left(e^{i\left[\frac{1}{2}\left(\omega_{1}+\omega_{2}\right) t\right]}+e^{-i\left[\frac{1}{2}\left(\omega_{1}+\omega_{2}\right) t\right]}\right)\left(e^{i\left[\frac{1}{2}\left(\omega_{2}-\omega_{1}\right) t\right]}+e^{-i\left[\frac{1}{2}\left(\omega_{2}-\omega_{1}\right) t\right]}\right) \\[4pt] & =\frac{1}{2}\left(\left[e^{i\left[\frac{1}{2} \times 2 \omega_{1} t\right]}+e^{-i\left[\frac{1}{2} 2 \omega_{1} t\right]}\right]+\left[e^{i\left[\frac{1}{2} \times 2 \omega_{2} t\right]}+e^{-i\left[\frac{1}{2} 2 \omega_{2} t\right]}\right]\right) \\[4pt] & =\cos \left(\omega_{1} t\right)+\cos \left(\omega_{2} t\right) \tag{2.42} \label{2.42}\end{align}\]


    This page titled 2.5: Complex numbers is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Peter G. Steeneken via source content that was edited to the style and standards of the LibreTexts platform.