Why are we taking the square root of the gradient in Adagrad?
We are taking the square root of $G_i$  because $G_i$ is the sum of squares of the gradient of weight $i$ from iterations $1$ to the current iteration. Since we squared all the gradients of all timesteps, $G_i$ was very large, and so we take its square root. Now you may think that, then why don't we just add the gradients instead of squaring the gradients, then adding. The answer to this question is that we square it to prevent negative gradients, so that negative gradients and positive gradients don't cancel each other out. Now you may think that why don't we take absolute value of the gradient then, the answer to this question is
here
That post was about root mean squared error or mean absolute error.
If you think carefully, these both issues are the same.
So, we take the square and not the absolute value. Now you may think that why don't we  power the gradient to some even power, why only square? Now, I leave this question to the consideration of the reader