"i" indicates that this is a complex number with an imaginary part.
It is completely normal for the cases you have exposed since the square root of a negative number does not make sense in the real field (it is a complex number); in the same way, the arc-cosine makes sense in the real field only for numbers less than or equal to 1
sergio