coefficient(F1)(\pink{A}) + coefficient(F2)(\blue{B}) = ?
Complex numbers can be added by separately adding their real and imaginary components.
Distribute the negative sign onto the first complex number:
Distribute the F1
onto the first complex number:
\qquad \begin{eqnarray}
coefficient(F1)(\pink{complexNumber(A_REAL, A_IMAG)})
&=& (F1 \cdot \pink{A_REAL}) + (F1 \cdot \pink{A_IMAG}) \\
&=& \pink{complexNumber(FA_REAL, FA_IMAG)}
\end{eqnarray}
Distribute the negative sign onto the second complex number:
Distribute the F2
onto the second complex number:
\qquad \begin{eqnarray}
coefficient(F2)(\blue{complexNumber(B_REAL, B_IMAG)})
&=& (F2 \cdot \blue{B_REAL}) + (F2 \cdot \blue{B_IMAG}) \\
&=& \blue{complexNumber(FB_REAL, FB_IMAG)}
\end{eqnarray}
Now we have:
\pink{complexNumber(FA_REAL, FA_IMAG)} + \blue{complexNumber(FB_REAL, FB_IMAG)}
The real components are \pink{FA_REAL}
and \blue{FB_REAL}
The imaginary components are \pink{FA_IMAGi}
and \blue{FB_IMAGi}
Adding real components, we get
\pink{FA_REAL} + \blue{FB_REAL} = FA_REAL + FB_REAL
Adding imaginary components, we get
\pink{FA_IMAGi} + \blue{FB_IMAGi} = FA_IMAG + FB_IMAGi
So the answer is complexNumber(ANSWER_REAL, ANSWER_IMAG)
.