# Linear Algebra Complex Numbers

The solutions to the equation $z^2-2z+2=0$ are $(a+i)$ and $(b-i)$ where $a$ and $b$ are integers. What is $a+b$?

I simplified and got $(z+1)(z+1) = -1$ and now I’m not sure where to go from there. I did this but I’m not sure.

$(a+i)^2 = a^2 – 1$

$(b-i)^2 = b^2 + 1$

$a+b=(a+i)+(b-i)=(a^2-1)+(b^2+1)=a^2+b^2$

#### Solutions Collecting From Web of "Linear Algebra Complex Numbers"

If you’re going to solve this equation by factoring, etc., you do not want to factor and set equal to a non-zero number. That is, doing something like:
$$(z+1)(z+1) = -1$$
does not point you in the right direction, because you can only find roots by factoring when you have the equation set equal to zero.

Also, please see Chris K’s comments about the other parts of your algebra… in general, $(x+y)^2 \ne x^2 + y^2$. That is, $(a+i)^2 \ne a^2 + i^2$.

Re: The Problem Statement
Because this is a quadratic with real coefficients, we know by the Fundamental Theorem of Algebra that it will have exactly $2$ solutions, where complex solutions occur in conjugate pairs.

We are given that the two solutions are $a+i$ and $b-i$. Since these are conjugate pairs, then $a=b$.

So, our two solutions are $a+i$ and $a-i$. Having one variable makes things simpler.

We also know that
\begin{align} (z – (a+i))(z-(a-i)) &=z^2 + \left(-(a+i) – (a-i)\right)z + (a+i)(a-i) \\ &= z^2-2z+2 \end{align}

Equating coefficients, we find that $\left(-(a+i) – (a-i)\right) = -2$ and $(a+i)(a-i) = 2$.

Can you take it from there?

Since this is a polynomial with real coefficients, $z$ is a root if and only if $\overline z$, the complex conjugate of $z$, is. Since $\overline{a + i} = a – i$, we see that $a = b$ necessarily.

Then using that $a + i$ and $a – i$ are roots, we can factor the polynomial as

\begin{align*}
z^2 + 2z + 2 &= \Big(z – (a + i)\Big)\Big(z – (a – i)\Big) \\
&= (z – a – i)(z – a + i) \\
&= (z – a)^2 – (i)^2 \\
&= z^2 – 2az + a^2 – 1
\end{align*}

Comparing coefficients, we see that $2 = -2a$ so that $a = -1$.

Fast way: By expanding $(z – \lambda)(z – \mu)$, we see that the product of the roots is the constant coefficient, and the sum of the roots is negative of the $z$-coefficient. Hence

$$a + b = \Big(a + i\Big) + \Big(b – i\Big) = -2$$

Hint $\,\ a\!+\!b = (a\!+\!i)+(b\!-\!i)\, =\, \color{#c00}{\rm sum\,\ of\,\ roots}.\,$ By Vieta, this equals the negative of the coeff of $x$, explicitly $(x-\color{#c00}r)(x-\color{#c00}s)\, =\, x^2-(\color{#c00}{r\!+\!s})x+rs.$