roots can also be written as fractional exponents. In the case of square roots, 1/2, so
i^2 = (-1^1/2)^2 = (-1^1/2)(-1^1/2) = -1^1 = -1
square root rule is a simplified shortcut of doing the above for real numbers, as that math gets more complicated when the numbers in the roots are different. it works because all real squares are positive, so the roots can be pairs of positive or negative numbers that you can do math on. and doesnt work on complex numbers, where the square is negative and has imaginary roots you can't do math on.
examples:
(3^1/2)^2 = (3^1/2)(3^1/2) = 3^1 = 3
can also be solved as
x = (3^1/2)(3^1/2)
x^2 = [(3^1/2)(3^1/2)]^2
x^2 = 3*3
x = (3*3)^1/2
square root rule is these three above steps at once.
x = √9
x = 3
with different, non square bases you have to take the algebra route as you cant easily simplify them:
x = (5^1/2)(2^1/2)
x^2 = [(5^1/2)(2^1/2)]^2
x^2 = 5*2
x = (5*2)^1/2
x = √10
eventually you have to do math with the root if they are different, which you cant do with imaginary numbers, because of this you cant get the -1 out of the root like in step two of the above examples. all you can do with i is simplify to isolate it so you can do math on the real part of complex numbers. i^2 just happens to be a real number, -1.