Finding $\lambda$ for which $\alpha=i$ is a root of $z^2+\lambda z-4$ (Note: $i$ refers to the imaginary unit)

I am trying to find the values of $\lambda$ for which $\alpha =i$ is a root of the quadratic:
$$z^2+\lambda z-4$$

Using the quadratic formula I got:
$$z=\frac{-\lambda \pm \sqrt{\lambda^2+16}}{2}$$
(Note: I believe that $\alpha$ refers to the root that is equal to $\frac{-b \textbf{+} \sqrt{b^2-4ac}}{2a}$, but I could be mistaken)
Therefore, to find the value of $\lambda$ for which $\alpha =i$, I have to solve the equation:
$$ i=\frac{-\lambda + \sqrt{\lambda^2+16}}{2}$$
Here is an outline of the steps I took:
Multiply both sides by $2$ and add $\lambda$ to both sides:
$$2i+\lambda=\sqrt{\lambda^2 +16}$$
Square both sides:
$$4i^2 +4\lambda i +\lambda^2 =\lambda^2 +16$$
Subtract $\lambda^2$ from both sides then solve for $\lambda$:
$$\lambda=-5i$$
However, $\lambda=-5i$ does not solve the equation ($ i \neq 4i$ ), which is very confusing. Where did I go wrong?
P.S: I did find that $ \lambda=-5i $ was a solution to the other root, $i=\frac{-\lambda - \sqrt{\lambda^2+16}}{2}$.
 A: Each non-zero real or complex number $w$ has exactly two square roots $r_1, r_2$ which differ by sign ($r_2 = - r_1$). If $w$ is a positive real number, then both $r_1, r_2$ are real and the standard convention is to write $\sqrt w$ for the positive square root. In all other cases there is no universally accepted interpretation of $\sqrt w$. If $w$ is a negative real number, then one may of course use the definition $\sqrt w = i \sqrt {\lvert w \rvert}$ (as you do in your calculation). This is a good and reasonable choice for $\sqrt w$, but it is only one of two possible choices. For $w \notin \mathbb R$ it is even more arbitrary to define a unique value of $\sqrt w$.
You corrrectly state that the quadratic equation
$$z^2 + \lambda z - 4 = 0 \tag{1}$$
has the two solutions
$$z=\frac{-\lambda \pm \sqrt{\lambda^2+16}}{2} \tag{2}$$
As explained above, this formula is based on a specific interpretation of the expression $\sqrt{\lambda^2+16}$; it involves a convention concerning the symbol $\sqrt{\phantom x }$. Perhaps it would be a more neutral way to say that the solutions of $(1)$ have the form
$$z=\frac{-\lambda + r}{2} \tag{3}$$
where $r$ is any square root of $\lambda^2+16$, i.e. any solution of
$$r^2 = \lambda^2+16 . \tag{4}$$
If you want to have $i$ as a solution of $(1)$, you have to determine $\lambda \in \mathbb C$ and $r$ with $r^2 = \lambda^2+16$ such that
$$i=\frac{-\lambda + r}{2} \tag{5}$$
You write right from the start $r =  \sqrt{\lambda^2+16}$, but this is inadequate if you use a fixed convention for the symbol $\sqrt{\phantom x }$. In fact, you must be aware that only one of the two solutions of $(4)$ will satisfy $(5)$ and the other produces a value $ \ne i$. Can you be sure that a fixed square root convention produces the appropriate value for $r$? No, you can't.
Your calculation correctly gives $\lambda = -5i$ and thus $\lambda^2+16 = -9$. The above convention for square roots of negative real numbers produces then $r =  \sqrt{-9} = 3i$ which does not satisfy $(5)$. The other solution of $(4)$ is $r = -3i$ and this is the adequate one which satisfies $(5)$.
Update:
A simpler approach is this. You want to find $\lambda$ such that $i$ is a root of $(1)$. Let $\rho$ be the second root of $(1)$. Then
$$(z-i)(z-\rho) = z^2 + \lambda z  - 4$$
which gives $i\rho = -4$ and $-(i + \rho) = \lambda$. The first equation implies $\rho = 4i$ and the second implies then $\lambda = -5i$.
A: If a quadratic equation is given with certain coefficients its roots can be found. Else if the roots are given we can find out the quadratic equation that contains/defines these roots.
The only quadratic equation which has roots $\pm \alpha = \pm i\;$
is:
$$ z^2+1=0\text { or } z^2+\alpha^2=0$$
where the complex conjugate has to be included.
It is not clear how  the given equation can be imagined or thought of to be able to accommodate these roots. To me appears such adjustment is not possible.
A: It isn't often discussed in textbooks (at least those I've seen) that polynomial and synthetic division also work for complex numbers.  If we already know one of the zeroes of the polynomial $ \  z^2 + \lambda z - 4 \ $ is $ \ i \ \ , $ we may also carry out the calculation

We must then have $ \ -5 + \lambda·i \ = \ 0 \ \Rightarrow \ \lambda \ = \ \frac{5}{i} \ = \ -5i \ \ . $  The "reduced" polynomial is then $ \ z + (\lambda + i) \ = \ z + [-5i] + i \ = \ z - 4i \ \ , $ confirming that the second zero is $ \ z = 4i \ \   $ and that the quadratic polynomial is $ \ z^2 - 5i·z - 4 \ \ . $
A small extension (which is not difficult to show) of the theorem that a quadratic polynomial with real coefficients has complex conjugate zeroes is that a quadratic polynomial has a real constant term and imaginary linear coefficent if and only if it has two purely imaginary zeroes.
