Permalink
Fetching contributors…
Cannot retrieve contributors at this time
92 lines (90 sloc) 3.91 KB
<!DOCTYPE html>
<html data-require="math math-format">
<head>
<meta charset="UTF-8" />
<title>Multiplying complex numbers</title>
<script src="../khan-exercise.js"></script>
</head>
<body>
<div class="exercise">
<div class="vars">
<var id="A_REAL">randRange( -5, 5 )</var>
<var id="A_IMAG">randRange( -5, 5 )</var>
<var id="B_REAL">randRange( -5, 5 )</var>
<var id="B_IMAG">randRange( -5, 5 )</var>
<var id="A_REAL_COLORED">
"\\color{" + ORANGE + "}{" + A_REAL + "}"
</var>
<var id="A_IMAG_COLORED">
"\\color{" + ORANGE + "}{" + A_IMAG + "}"
</var>
<var id="B_REAL_COLORED">
"\\color{" + BLUE + "}{" + B_REAL + "}"
</var>
<var id="B_IMAG_COLORED">
"\\color{" + BLUE + "}{" + B_IMAG + "}"
</var>
<var id="A_REP">"\\color{" + ORANGE + "}{" + complexNumber( A_REAL, A_IMAG ) + "}"</var>
<var id="B_REP">"\\color{" + BLUE + "}{" + complexNumber( B_REAL, B_IMAG ) + "}"</var>
<var id="ANSWER_REAL">( A_REAL * B_REAL ) - ( A_IMAG * B_IMAG )</var>
<var id="ANSWER_IMAG">( A_REAL * B_IMAG ) + ( A_IMAG * B_REAL )</var>
</div>
<div class="problems">
<div id="multiply-cplx">
<p class="question">Multiply the following complex numbers:</p>
<p><code>(<var>A_REP</var>) \cdot (<var>B_REP</var>)</code></p>
<div class="solution" data-type="complexNumberSeparate">
[ <var>ANSWER_REAL</var>, <var>ANSWER_IMAG</var> ]
</div>
<div class="hints">
<p>
Complex numbers are multiplied like any two binomials.
</p>
<div>
<p>
First use the distributive property:
</p>
<code>\qquad (<var>A_REP</var>) \cdot (<var>B_REP</var>) =
(<var>A_REAL_COLORED</var> \cdot <var>B_REAL_COLORED</var>) + (<var>A_REAL_COLORED</var> \cdot <var>B_IMAG_COLORED</var>i) +
(<var>A_IMAG_COLORED</var>i \cdot <var>B_REAL_COLORED</var>) + (<var>A_IMAG_COLORED</var>i \cdot <var>B_IMAG_COLORED</var>i)
</code>
</div>
<div>
<p>
Then simplify the terms:
</p>
<code>
\qquad (<var>A_REAL * B_REAL</var>) + (<var>A_REAL * B_IMAG</var>i) +
(<var>A_IMAG * B_REAL</var>i) + (<var>A_IMAG * B_IMAG</var> \cdot i^2)
</code>
</div>
<div>
<p>
Imaginary unit multiples can be grouped together.
</p>
<code>
\qquad
<var>A_REAL * B_REAL</var> + (<var>A_REAL * B_IMAG</var> + <var>A_IMAG * B_REAL</var>)i + <var>negParens( ( A_IMAG * B_IMAG ) + "i^2" )</var>
</code>
</div>
<p>
After we plug in <code>i^2 = -1</code>, the result becomes
<code>
<var>A_REAL * B_REAL</var> + (<var>A_REAL * B_IMAG</var> + <var>A_IMAG * B_REAL</var>)i - <var>negParens( A_IMAG * B_IMAG )</var>
</code>
</p>
<p>
The result is simplified:
<code>
(<var>A_REAL * B_REAL</var> - <var>A_IMAG * B_IMAG</var>) + (<var>ANSWER_IMAG</var>i) = <var>complexNumber( ANSWER_REAL, ANSWER_IMAG)</var>
</code>
</p>
<p>
The real part of the result is <code><var>ANSWER_REAL</var></code> and the imaginary part is <code><var>ANSWER_IMAG</var></code>.
</p>
</div>
</div>
</div>
</div>
</body>
</html>