Firstly,

gives a square with side length

, thus to have a square with side length 1, be must dilate it by a factor of

in both x and y direction. Thus,

,

, and the equation becomes

Now, this is the part that is tricky. We are going to apply a linear transformation that rotates this square by 45 degrees in the counter-clockwise direction. To apply the linear map and obtain the new equation:
1) We define the final coordinates as
)
, where T is the linear transformation that rotates the points about origin.
2) We want to express the new points as a relation of x and y. We don't readily know any relationships between x' and y', but we can derive it from the relationship between x and y. From previous, we see that [x',y'] is a function of [x,y], since this is a linear map, the inverse must exist, that is,
)
. We know that [x,y] follows the equation

, thus if we can express x as a function of x' and y', and similarly y' as another function of x' and y', we can substitute into the equation and obtain a relationship between x' and y'. This will give us the equation of the mapped points.
[This procedure is the same for any mapping technique]
The rotation matrix is
 & -\sin(\theta) \\ \sin (\theta) & \cos (\theta) \end{bmatrix})

Thus the equation that gives a square with side length of 1, with all sides parallel to the coordinate axes and centered at zero:


This is the most systematic way I can come up with, I'm sure there is a much more elegant way of doing this. Note that translation by 45 degrees and the symmetry of the square is not the best way of looking at how the rotational matrix works, as some mistakes and even completely missing steps will still give you the upright square. I've mistakenly produced the same square more than three times with stupid errors and missing steps completely.