Because a diagonal drawn into the square forms two congruent 45-45-90 triangles, if you know the length of one side of the square, you can always calculate the length of the diagonal:
Since d is the hypotenuse of the 45-45-90 triangle that has legs of length 5, according to the ratio 1:1:, you know that .
Similarly, if you know the length of the diagonal, you can calculate the length of the sides of the square.