# Rotation of axes by 45 degrees

I was reading a book in which it is mentioned that:

Rotate coordinate axes by $$45$$ degrees so that a point $$(x,y)$$ becomes $$(x+y,y-x)$$ .

Here is image 1

Here is image 2

I can't understand how the new coordinates became $$(x+y,y-x)$$ . If I apply the formula for rotation of axes I'll get $$\sqrt{2}$$ $$(x-y, x+y)$$.

• I agree with you. The distance $BC$ before the rotation is $\sqrt {13}$ while it is $\sqrt {26}$ afterwards. I think they stretch it back afterwards . Commented Dec 31, 2018 at 6:21
• Yes, your are right. But, please explain the context. Commented Dec 31, 2018 at 6:21
• @MohammadZuhairKhan I've uploaded the whole section. Can you look something now? Commented Dec 31, 2018 at 6:25
• @MartínVacasVignolo the new coordinates after rotation of the cordinates at an angle f for a point (x,y){x = Xcos(f) - Ysin(f)}{y = Xcos(f) + Ysin(f)} Commented Dec 31, 2018 at 6:27
• youtube.com/watch?v=BPgq2AudoEo if you want more details. Commented Dec 31, 2018 at 6:31

As noted, that transformation isn't an isometry (in the Euclidean metric); it's a $$45^\circ$$ rotation composed with a dilation by $$\sqrt{2}$$.

But then, looking at the pictures, we're not looking at Euclidean geometry - we're instead looking at the distances derived from the 1-norm $$\|(x,y)\|_1=|x|+|y|$$ and the $$\infty$$-norm $$\|(x,y)\|=\max(|x|,|y|)$$. From that perspective, we're just fine leaving that scale factor in so the transformation has rational coefficients. The formula for $$T^{-1}$$ will have factors of $$\frac12$$, and that's just not a big deal.

Let $$T(x,y)=(x+y,y-x)$$. The linked pictures say that $$\|T(v)\|_{\infty}=\|v\|_1$$. We also get $$\|T(v)\|_1=2\|v\|_{\infty}$$. Taking two steps, $$T^2(x,y)=(2y,-2x)$$, which doubles both norms. What this is saying is that the geometry we get from the $$1$$-norm and the geometry we get from the $$\infty$$-norm are isomorphic - because this transformation $$T$$ transforms one distance into the other. Using the irrational version that's an isometry in the Euclidean metric would only make things worse by introducing a factor of $$\sqrt{2}$$ to the distances we're looking at. Pass.

• The transformation is an isometry. The length that is preserved is the taxicab length. For example, $(1,0)$ gets mapped to $(\frac{1}{2}, \frac{1}{2})$ under rotation which preserves the taxicab length of the vector. Commented Dec 31, 2018 at 15:58
• No, @John Douma, it's not an isometry. The taxicab distance is not preserved - it's sent to that other $\infty$-distance. Commented Dec 31, 2018 at 21:13
• We are not rotating our grid. We are rotating our coordinates. Draw a grid and place the origin at the southwest corner of a building. There are only two ways to get to the northeast corner no matter how we describe it. No distances have changed. If you rotate the x axis by $45^{\circ}$ you describe the northeast corner as $(2,0)$ instead of $(1,1)$ but all distances are unchanged. Commented Dec 31, 2018 at 21:19
• No, not all distances are preserved. In your example, what about the distance to an adjacent corner of the building? Recall also that applying $T$ twice doubles all distances. Commented Dec 31, 2018 at 22:34
• That distance is $1$. The geometry has not changed. You cannot cut through a building on its diagonal just because you changed its description. With the new coordinate system, $(1,0)$ is described by $(1,-1)$ and is a distance of $1$ away. We are still restricted to travel along the grid lines even if they are diagonal in our new coordinate system. Commented Dec 31, 2018 at 23:17

You are rotating the coordinate axes, not the points. Let $$(x,y)$$ be a point in the plane. Then $$(x,y)=x(1,0)+y(0,1)$$. A rotation of the coordinates by $$45^{\circ}$$ takes $$(1,0)$$ to $$(\frac{1}{\sqrt{2}},\frac{1}{\sqrt{2}})$$ and $$(0,1)$$ to $$(\frac{-1}{\sqrt{2}},\frac{1}{\sqrt{2}})$$.

To find the new coordinates $$(x',y')$$ we must solve $$x'(\frac{1}{\sqrt{2}},\frac{1}{\sqrt{2}})+y'(\frac{-1}{\sqrt{2}},\frac{1}{\sqrt{2}})=(x,y)$$

Grouping terms on the left of the equation and equating coordinates gives $$x'-y'=\sqrt{2}x$$ $$x'+y'=\sqrt{2}y$$

The $$\sqrt{2}$$ corresponds to the length of the diagonal of a unit square which is $$2$$ in taxicab geometry. Replacing $$\sqrt{2}$$ with $$2$$ in out system of equations gives us $$x'-y'=2x$$ $$x'+y'=2y$$

We can solve this system for $$x'$$ and $$y'$$ to obtain $$x'=x+y$$ $$y'=y-x$$.

Edit:

I see many saying that this transformation is a rotation followed by a dilation but this is not accurate. A rotation must preserve length. In this case the length is the taxicab length. Take $$(1,0)$$. It has a taxicab length of $$1$$ from the origin. If we rotate this by $$45^{\circ}$$ under the standard metric we get $$(\frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}})$$. But the same rotation under the taxicab metric must give $$(\frac{1}{2},\frac{1}{2})$$ to preserve the length of the rotated vector.

My proof above can be confusing because I don't make that adjustment until after the rotation with respect to the standard metric.

• The paragraph edited in is wrong; this transformation is not an isometry in the taxicab metric, or indeed in any one metric. Every isometry of taxicab geometry must send vertical and horizontal segments to vertical and horizontal segments, as they can be characterized as the only segments with unique midpoints. Commented Jan 1, 2019 at 2:23
• @jmerry A coordinate rotation changes how we describe points. It doesn't change the geometry of the grid. You do agree that in our new coordinate systems the grid lines are diagonal, right? Commented Jan 1, 2019 at 3:30
• No, I don't agree. The material linked in the question doesn't agree with you either - no rotated grid lines there. It's a new distance function, and thus a new geometry, which just happens to be related to the old one. Commented Jan 1, 2019 at 4:00
• @jmerry Please read the last part of the second picture carefully. We compute distances differently in the rotated coordinate system. The example computes the difference between two points. The author explicitly says we have two ways to compute the $same$ distance. Look at the first picture where the distance between $B$ and $C$ is shown. Now look at the rotated picture and tell me what the distance between the two is. If you think it is $6$, go back to the second picture and read it again. Commented Jan 1, 2019 at 15:33
• Is clock-wise or reversed-clock-wise matters here when we say " rotate this by 45" ? Commented Nov 5, 2021 at 17:09

I'd think that the author was more concerned to the underlayed square lattice grid, as being displayed in your linked pictures. That is, integer coordinates ought be transformed into integer coordinates only, and not into something irrational, involving a sqrt(2) factor.

--- rk

In this text, "rotate" is used in a loose sense, as it is actually combined with a scaling by $$\sqrt2$$, to keep integer coordinates.

To rotate is the verb that corresponds to rotation. There is no verb for "similarity transformation".