Q: Determine U(Z[i]) ?

My book solves this by taking some unit a+bi of Z[i], and then multiplying it with its multiplicative inverse say, c+di.

=> (a+bi)(c+di) = 1

Taking modulus on both sides

=> (a^{2}+b^{2})(c^{2}+d^{2}) = 1

=> a^{2}+b^{2}= 1, I don't really understand this step. Can someone please tell me how my book arrived to this conclusion ?

Please Help.