# Proper notation for coordinate transformations?

Let's say I have a three dimensional cube that I am transforming by simply swapping the $x$ and $y$ axes (more accurately, a $90 ^{\circ}$ rotation o the geometry about the $z$ axis, where the values of the $x$- and $y$-components of the position vectors of each vertex are swapped)

If I were to try to write down this transformation in a short-hand way, I would do something like

$x\leftrightarrow y$

My question is, is there a proper notation for this that I am ignorant of? Or is my suggestion above appropriate? Also, is the usage of the word "transform", here, correct, or should I rather just say "rotation"?

• Swapping $x$ and $y$ is not the same as rotating 90° only. The rotation counterclockwise would be the same as $(x,y)\to (-y,x)$. – Mark Viola Mar 7 '18 at 21:23
• @MarkViola True, my mistake. I tried to make the situation more explicit for the question's sake, but in reality all I'm doing is calling swap(x, y) in C++, so there are no sign issues. I'd like to know the mathematical notation for such a call. – Anonymous Mar 7 '18 at 21:25

## 2 Answers

You could write it as a function. The usual way to do it is to define functions either implicitly (like this: $f_{90}(x,y)=(y,-x)$) if you are somewhat lax. Everyone would understand it. Or if you want to define it properly: $f_{90}: \mathbb{R}^2\rightarrow \mathbb{R}^2, (x,y) \mapsto (y,-x)$ or $$f_{90}:\begin{cases} \mathbb{R}^2\rightarrow \mathbb{R}^2\\ (x,y) \mapsto (y,-x) \end{cases}$$

Or, since linear functions (which rotations are) on finite dimensional vectorspaces have a natural isomorphism into matrices, you could also write your mapping as matrix multiplication. But if you only want a shorthand then that might be too spacious.

Edit: if you want to do an actual swap and not a rotation, why not just $\text{swap}(x,y)=(y,x)$? It is still a linear mapping though.

$$\text{swap}(x,y)=\left(\begin{matrix} 0 & 1\\ 1 & 0 \end{matrix}\right) \left(\begin{matrix} x\\ y \end{matrix}\right)$$

• I guess it's nothing more than a stylistic choice; I found swap($x$,$y$) to be uglier than $x\leftrightarrow y$. Though if a general reader would have found the latter more clear then I will do that. Is the latter clear? – Anonymous Mar 7 '18 at 21:34
• Maths likes functions. To a mathematician $x \leftrightarrow y$ would look odd. Especially since there is an easy way to write it as a function. – Felix B. Mar 7 '18 at 21:38

There is no standard, universally understood mathematical notation. Give this function a name, and use words or matrices or something to describe it, instead.