Arithmetic of Complex Numbers#
If we have two complex numbers \(a+bi\) and \(c+di\), then we have the following rules for the arithmetic between them:
Addition:
\[ (a+bi)(c+di) = (a+c) + (b+d)i \]Add the real parts and add the imaginary parts separately.
Subtraction:
\[ (a+bi)-(c+di) = (a-c) + (b-d)i \]Same as addition, but with subtraction.
Multiplication:
\[ (a+bi)(c+di) = (ac - bd) + (ad + bc)i \]Treat it as 2 sets of brackets and use FOIL. Remembering that \(i^2=-1\).
Division:
\[ \frac{a+bi}{c+di} = \frac{ac+bd}{c^2+d^2} + \frac{bc-ad}{c^2+d^2}i \]Multiply the numerator and demoniator by the conjugate of the denominator. This makes the demoninater a real number and the numerator the multiplication of two complex numbers.
Example
Find the following:
\((2+i)+(1-i)\)
\((-4-4i) - (-5i)\)
\((1+i)(2-3i)\)
\(\frac{1-i}{2+3i}\)
Solution:
\((2+i)+(1-i) = (2+1) + (1-1)i = 3\)
\((-4-4i) - (-5i) = (-4-0) + (-4-(-5))i = -4+i\)
\((1+i)(2-3i) = ((1\times 2) - (1\times -3)) + ((1\times -3) + (1\times 2))i = 5-i\)
\(\frac{1-i}{2+3i} = \frac{(1\times 2) + (-1\times 3)}{2^2+3^2} + \frac{(-1\times 2) - (1\times 3)}{2^2+3^2} i = \frac{-1}{13} - \frac{5}{13}i\)
Naturally, the Python complex-type is capable of this arithmetic.
2 + 1j + 1 - 1j
(3+0j)
-4-4j - (-5j)
(-4+1j)
(1 + 1j) * (2 - 3j)
(5-1j)
(1 - 1j) / (2 + 3j)
(-0.07692307692307694-0.3846153846153846j)
Particle Probability
A particle is describes by a wavefunction \(\Psi\). To calculate the probability of finding this particle somewhere \(\Psi\Psi^*\) needs to be calculated. When \(\Psi\) is in the form:
calculate \(\Psi\Psi^*\).
Solution: Since \(\psi = a+bi\), this means that \(\Psi^*=a-bi\).
Multipying them together gives: \((a+bi)(a-bi)\)
Expand the brackets: \(a^2 + abi - abi - (bi)^2\)
Simplify this: \(a^2-b^2i^2\)
Simplify the \(i^2\): \(a^2+b^2\).