miller-book/node105.html

561 lines
14 KiB
HTML

<!DOCTYPE html>
<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
original version by: Nikos Drakos, CBLU, University of Leeds
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<TITLE>Complex numbers</TITLE>
<META NAME="description" CONTENT="Complex numbers">
<META NAME="keywords" CONTENT="book">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="book.css">
<LINK REL="next" HREF="node107.html">
<LINK REL="previous" HREF="node104.html">
<LINK REL="up" HREF="node104.html">
<LINK REL="next" HREF="node106.html">
</HEAD>
<BODY >
<!--Navigation Panel-->
<A ID="tex2html2130"
HREF="node106.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="next.png"></A>
<A ID="tex2html2124"
HREF="node104.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="up.png"></A>
<A ID="tex2html2118"
HREF="node104.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="prev.png"></A>
<A ID="tex2html2126"
HREF="node4.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
SRC="contents.png"></A>
<A ID="tex2html2128"
HREF="node201.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index"
SRC="index.png"></A>
<BR>
<B> Next:</B> <A ID="tex2html2131"
HREF="node106.html">Complex sinusoids</A>
<B> Up:</B> <A ID="tex2html2125"
HREF="node104.html">Time shifts and delays</A>
<B> Previous:</B> <A ID="tex2html2119"
HREF="node104.html">Time shifts and delays</A>
&nbsp; <B> <A ID="tex2html2127"
HREF="node4.html">Contents</A></B>
&nbsp; <B> <A ID="tex2html2129"
HREF="node201.html">Index</A></B>
<BR>
<BR>
<!--End of Navigation Panel-->
<H1><A ID="SECTION001110000000000000000"></A>
<A ID="sect7.complex"></A>
<BR>
Complex numbers
</H1>
<P>
Complex
<A ID="7761"></A>numbers are written as:
<BR><P></P>
<DIV ALIGN="CENTER">
<!-- MATH
\begin{displaymath}
Z = a + bi
\end{displaymath}
-->
<IMG
WIDTH="72" HEIGHT="25" BORDER="0"
SRC="img624.png"
ALT="\begin{displaymath}
Z = a + bi
\end{displaymath}">
</DIV>
<BR CLEAR="ALL">
<P></P>
where <IMG
WIDTH="11" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
SRC="img4.png"
ALT="$a$"> and <IMG
WIDTH="10" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
SRC="img21.png"
ALT="$b$"> are real numbers and <IMG
WIDTH="63" HEIGHT="36" ALIGN="MIDDLE" BORDER="0"
SRC="img625.png"
ALT="$i=\sqrt{-1}$">. (In this book we'll use
the upper case Roman letters such as <IMG
WIDTH="15" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
SRC="img20.png"
ALT="$Z$"> to denote complex numbers. Real
numbers appear as lower case Roman or Greek letters, except for
integer bounds, usually written as <IMG
WIDTH="20" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
SRC="img86.png"
ALT="$M$"> or <IMG
WIDTH="18" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
SRC="img3.png"
ALT="$N$">.) Since a complex
number has two real components, we use a Cartesian plane (in place of a number
line) to graph it, as shown in Figure <A HREF="#fig07.01">7.1</A>. The quantities <IMG
WIDTH="11" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
SRC="img4.png"
ALT="$a$"> and
<IMG
WIDTH="10" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
SRC="img21.png"
ALT="$b$"> are called the
<A ID="7764"></A><I>real</I>
and
<A ID="7766"></A><I>imaginary parts</I> of <IMG
WIDTH="15" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
SRC="img20.png"
ALT="$Z$">, written as:
<BR><P></P>
<DIV ALIGN="CENTER">
<!-- MATH
\begin{displaymath}
a = \mathrm{re}(Z)
\end{displaymath}
-->
<IMG
WIDTH="65" HEIGHT="28" BORDER="0"
SRC="img626.png"
ALT="\begin{displaymath}
a = \mathrm{re}(Z)
\end{displaymath}">
</DIV>
<BR CLEAR="ALL">
<P></P>
<BR><P></P>
<DIV ALIGN="CENTER">
<!-- MATH
\begin{displaymath}
b = \mathrm{im}(Z)
\end{displaymath}
-->
<IMG
WIDTH="68" HEIGHT="28" BORDER="0"
SRC="img627.png"
ALT="\begin{displaymath}
b = \mathrm{im}(Z)
\end{displaymath}">
</DIV>
<BR CLEAR="ALL">
<P></P>
<P>
<DIV ALIGN="CENTER"><A ID="fig07.01"></A><A ID="7772"></A>
<TABLE>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 7.1:</STRONG>
A number, <IMG
WIDTH="15" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
SRC="img20.png"
ALT="$Z$">, in the complex plane. The axes are for the real
part <IMG
WIDTH="11" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
SRC="img4.png"
ALT="$a$"> and the imaginary part <IMG
WIDTH="10" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
SRC="img21.png"
ALT="$b$">.</CAPTION>
<TR><TD><IMG
WIDTH="254" HEIGHT="205" BORDER="0"
SRC="img628.png"
ALT="\begin{figure}\psfig{file=figs/fig07.01.ps}\end{figure}"></TD></TR>
</TABLE>
</DIV>
<P>
If <IMG
WIDTH="15" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
SRC="img20.png"
ALT="$Z$"> is a complex number, its
<A ID="7775"></A><A ID="7776"></A><I>magnitude</I> (or <I>absolute value</I>),
written as <IMG
WIDTH="24" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
SRC="img629.png"
ALT="$\vert Z\vert$">, is just the distance in the plane from the origin to the
point <IMG
WIDTH="38" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
SRC="img630.png"
ALT="$(a,b)$">:
<BR><P></P>
<DIV ALIGN="CENTER">
<!-- MATH
\begin{displaymath}
|Z| = \sqrt {({a^2} + {b^2})}
\end{displaymath}
-->
<IMG
WIDTH="118" HEIGHT="28" BORDER="0"
SRC="img631.png"
ALT="\begin{displaymath}
\vert Z\vert = \sqrt {({a^2} + {b^2})}
\end{displaymath}">
</DIV>
<BR CLEAR="ALL">
<P></P>
and its
<A ID="7781"></A><I>argument</I>,
written as <IMG
WIDTH="38" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
SRC="img632.png"
ALT="$\angle(Z)$">,
is the angle from the positive <IMG
WIDTH="11" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
SRC="img4.png"
ALT="$a$"> axis to the point <IMG
WIDTH="38" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
SRC="img630.png"
ALT="$(a,b)$">:
<BR><P></P>
<DIV ALIGN="CENTER">
<!-- MATH
\begin{displaymath}
\angle(Z) = \mathrm{arctan}
{ \left ( {
b \over a
} \right ) }
\end{displaymath}
-->
<IMG
WIDTH="130" HEIGHT="45" BORDER="0"
SRC="img633.png"
ALT="\begin{displaymath}
\angle(Z) = \mathrm{arctan}
{ \left ( {
b \over a
} \right ) }
\end{displaymath}">
</DIV>
<BR CLEAR="ALL">
<P></P>
If we know the magnitude and argument of a complex number (call them <IMG
WIDTH="11" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
SRC="img467.png"
ALT="$r$"> and
<IMG
WIDTH="11" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
SRC="img634.png"
ALT="$\theta$">) we can reconstruct the real and imaginary parts:
<BR><P></P>
<DIV ALIGN="CENTER">
<!-- MATH
\begin{displaymath}
a = r \cos (\theta)
\end{displaymath}
-->
<IMG
WIDTH="79" HEIGHT="28" BORDER="0"
SRC="img635.png"
ALT="\begin{displaymath}
a = r \cos (\theta)
\end{displaymath}">
</DIV>
<BR CLEAR="ALL">
<P></P>
<BR><P></P>
<DIV ALIGN="CENTER">
<!-- MATH
\begin{displaymath}
b = r \sin (\theta)
\end{displaymath}
-->
<IMG
WIDTH="76" HEIGHT="28" BORDER="0"
SRC="img636.png"
ALT="\begin{displaymath}
b = r \sin (\theta)
\end{displaymath}">
</DIV>
<BR CLEAR="ALL">
<P></P>
A complex number may be written in terms of its real and imaginary parts
<IMG
WIDTH="11" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
SRC="img4.png"
ALT="$a$"> and <IMG
WIDTH="10" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
SRC="img21.png"
ALT="$b$">, as <IMG
WIDTH="76" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
SRC="img637.png"
ALT="$Z=a+bi$"> (this is called
<A ID="7785"></A><I>rectangular form</I>), or alternatively in
<A ID="7787"></A><I>polar form</I>,
in terms of <IMG
WIDTH="11" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
SRC="img467.png"
ALT="$r$"> and <IMG
WIDTH="11" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
SRC="img634.png"
ALT="$\theta$">:
<BR><P></P>
<DIV ALIGN="CENTER">
<!-- MATH
\begin{displaymath}
Z = r \cdot \left[ \cos(\theta) + i \sin(\theta) \right ]
\end{displaymath}
-->
<IMG
WIDTH="167" HEIGHT="28" BORDER="0"
SRC="img638.png"
ALT="\begin{displaymath}
Z = r \cdot \left[ \cos(\theta) + i \sin(\theta) \right ]
\end{displaymath}">
</DIV>
<BR CLEAR="ALL">
<P></P>
The rectangular and polar formulations are interchangeable; the equations
above show how to compute <IMG
WIDTH="11" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
SRC="img4.png"
ALT="$a$"> and <IMG
WIDTH="10" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
SRC="img21.png"
ALT="$b$"> from <IMG
WIDTH="11" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
SRC="img467.png"
ALT="$r$"> and <IMG
WIDTH="11" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
SRC="img634.png"
ALT="$\theta$"> and vice versa.
<P>
The main reason we use complex numbers in electronic music is because they
magically automate trigonometric calculations. We frequently have to add
angles together in order to talk about the changing phase of an audio signal as
time progresses (or as it is shifted in time, as in this chapter). It turns
out that, if you multiply two complex numbers, the argument of the product is
the sum of the arguments of the two factors. To see how this happens, we'll
multiply two numbers <IMG
WIDTH="21" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
SRC="img639.png"
ALT="$Z_1$"> and <IMG
WIDTH="21" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
SRC="img640.png"
ALT="$Z_2$">, written in polar form:
<BR><P></P>
<DIV ALIGN="CENTER">
<!-- MATH
\begin{displaymath}
{Z_1} = {r_1} \cdot \left [ \cos({\theta_1}) + i \sin({\theta_1}) \right ]
\end{displaymath}
-->
<IMG
WIDTH="194" HEIGHT="28" BORDER="0"
SRC="img641.png"
ALT="\begin{displaymath}
{Z_1} = {r_1} \cdot \left [ \cos({\theta_1}) + i \sin({\theta_1}) \right ]
\end{displaymath}">
</DIV>
<BR CLEAR="ALL">
<P></P>
<BR><P></P>
<DIV ALIGN="CENTER">
<!-- MATH
\begin{displaymath}
{Z_2} = {r_2} \cdot \left [ \cos({\theta_2}) + i \sin({\theta_2}) \right ]
\end{displaymath}
-->
<IMG
WIDTH="193" HEIGHT="28" BORDER="0"
SRC="img642.png"
ALT="\begin{displaymath}
{Z_2} = {r_2} \cdot \left [ \cos({\theta_2}) + i \sin({\theta_2}) \right ]
\end{displaymath}">
</DIV>
<BR CLEAR="ALL">
<P></P>
giving:
<BR><P></P>
<DIV ALIGN="CENTER">
<!-- MATH
\begin{displaymath}
{Z_1}{Z_2} = {r_1}{r_2} \cdot
{ \left [ {
\cos({\theta_1}) \cos({\theta_2}) -
\sin({\theta_1}) \sin({\theta_2})
} \right . } \, +
\end{displaymath}
-->
<IMG
WIDTH="332" HEIGHT="28" BORDER="0"
SRC="img643.png"
ALT="\begin{displaymath}
{Z_1}{Z_2} = {r_1}{r_2} \cdot
{ \left [ {
\cos({\theta_1...
...a_2}) -
\sin({\theta_1}) \sin({\theta_2})
} \right . } \, +
\end{displaymath}">
</DIV>
<BR CLEAR="ALL">
<P></P>
<BR><P></P>
<DIV ALIGN="CENTER">
<!-- MATH
\begin{displaymath}
{ \left . {
+ i \left (
\sin({\theta_1}) \cos({\theta_2}) +
\cos({\theta_1}) \sin({\theta_2})
\right )
} \right ] }
\end{displaymath}
-->
<IMG
WIDTH="249" HEIGHT="28" BORDER="0"
SRC="img644.png"
ALT="\begin{displaymath}
{ \left . {
+ i \left (
\sin({\theta_1}) \cos({\theta_2}) +
\cos({\theta_1}) \sin({\theta_2})
\right )
} \right ] }
\end{displaymath}">
</DIV>
<BR CLEAR="ALL">
<P></P>
Here the minus sign in front of the <!-- MATH
$\sin({\theta_1}) \sin({\theta_2})$
-->
<IMG
WIDTH="99" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
SRC="img645.png"
ALT="$\sin({\theta_1}) \sin({\theta_2})$"> term
comes from multiplying <IMG
WIDTH="9" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
SRC="img646.png"
ALT="$i$"> by itself, which gives <IMG
WIDTH="23" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
SRC="img401.png"
ALT="$-1$">. We can spot the
cosine and sine summation formulas in the above expression, and so it simplifies
to:
<BR><P></P>
<DIV ALIGN="CENTER">
<!-- MATH
\begin{displaymath}
{Z_1}{Z_2} = {r_1}{r_2}
\cdot \left[ \cos({\theta_1}+{\theta_2})
+ i \sin({\theta_1}+{\theta_2}) \right ]
\end{displaymath}
-->
<IMG
WIDTH="294" HEIGHT="28" BORDER="0"
SRC="img647.png"
ALT="\begin{displaymath}
{Z_1}{Z_2} = {r_1}{r_2}
\cdot \left[ \cos({\theta_1}+{\theta_2})
+ i \sin({\theta_1}+{\theta_2}) \right ]
\end{displaymath}">
</DIV>
<BR CLEAR="ALL">
<P></P>
By inspection, it follows that the product <IMG
WIDTH="39" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
SRC="img648.png"
ALT="${Z_1}{Z_2}$">
has magnitude
<IMG
WIDTH="32" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
SRC="img649.png"
ALT="${r_1}{r_2}$"> and argument <!-- MATH
${\theta_1}+{\theta_2}$
-->
<IMG
WIDTH="52" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
SRC="img650.png"
ALT="${\theta_1}+{\theta_2}$">.
<P>
We can use this property of complex numbers to add and subtract angles (by
multiplying and dividing complex numbers with the appropriate arguments) and
then to take the cosine and sine of the result by extracting the real and
imaginary parts.
<P>
<BR><HR>
<!--Table of Child-Links-->
<A ID="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
<UL>
<LI><A ID="tex2html2132"
HREF="node106.html">Complex sinusoids</A>
</UL>
<!--End of Table of Child-Links-->
<HR>
<!--Navigation Panel-->
<A ID="tex2html2130"
HREF="node106.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="next.png"></A>
<A ID="tex2html2124"
HREF="node104.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="up.png"></A>
<A ID="tex2html2118"
HREF="node104.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="prev.png"></A>
<A ID="tex2html2126"
HREF="node4.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
SRC="contents.png"></A>
<A ID="tex2html2128"
HREF="node201.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index"
SRC="index.png"></A>
<BR>
<B> Next:</B> <A ID="tex2html2131"
HREF="node106.html">Complex sinusoids</A>
<B> Up:</B> <A ID="tex2html2125"
HREF="node104.html">Time shifts and delays</A>
<B> Previous:</B> <A ID="tex2html2119"
HREF="node104.html">Time shifts and delays</A>
&nbsp; <B> <A ID="tex2html2127"
HREF="node4.html">Contents</A></B>
&nbsp; <B> <A ID="tex2html2129"
HREF="node201.html">Index</A></B>
<!--End of Navigation Panel-->
<ADDRESS>
Miller Puckette
2006-12-30
</ADDRESS>
</BODY>
</HTML>