Why $|\sqrt{a}-i|=\sqrt{a+1}$ for every nonnegative real number $a$?

41 Views Asked by At

Why $|\sqrt{a}-i|=\sqrt{a+1}$ for every nonnegative real number $a$?

I know that $i=\sqrt{-1}$, and in my textbook I get $$|\sqrt{x^2+(y-1)^2}-i|=\sqrt{(x^2+(y-1)^2)^2+(-1)^2}=\sqrt{x^2+(y-1)^2+1}$$

I can't find how the first two passages are connected.

Edit: corrected equation.