Which affine transformations preserve rectangles?

72 Views Asked by At

I need a way to decide if a given affine transformation preserves arbitrary rectangles in $\mathbb{R}^2$, meaning after applying it to any rectangle, it is still a rectangle afterwards.

Thought process

Given a matrix of the affine transform in the form $$ T_{2 \times 3} = \begin{pmatrix} t_{11} & t_{12} & t_{13}\\ t_{21} & t_{22} & t_{23} \end{pmatrix} $$ Translations ($t_{13}$ and $t_{23}$) preserve orthogonality and they don't have any influence over the orthogonality of the whole transformation

Formally, let's consider the full $3 \times 3$ affine matrix $$ T = \begin{pmatrix} t_{11} & t_{12} & t_{13}\\ t_{21} & t_{22} & t_{23}\\ 0 & 0 & 1\\ \end{pmatrix} $$ and apply Laplace expansion of its determinant along the third row. That gives us $$\det{T} = 1 \det{T_{\mathrm{lin}}}$$ where $$ T_{\mathrm{lin}} = \begin{pmatrix} t_{11} & t_{12} \\ t_{21} & t_{22} \end{pmatrix} $$ so we can only consider the matrix of a linear transformation $T_{\mathrm{lin}}$ because the determinant determines othogonality and if orthogonality is preserved, so is rectangularity.

Informally, we can always apply a purely translational transformation with $-t_{13}$ and $-t_{23}$ which does not change the (non-)orthogonality leaving us only with a linear transformation on the linear 2-dimensional subspace $$ T = \begin{pmatrix} t_{11} & t_{12} & 0\\ t_{21} & t_{22} & 0\\ 0 & 0 & 1\\ \end{pmatrix} $$

For this case it is known that the transformation preserves orthogonality if and only if $|\det T| = |\det T_{\mathrm{lin}}| = 1$ so we can use this condition to decide whether $T$ preserves rectangles.

Questions

  1. Is this reasoning correct?

  2. I do have the impression that it is still quite informal. Meaning that I did convince myself that only considering the $|\det T_{\mathrm{lin}}| = 1$ is the solution but generally speaking I did not consider everything that would need to be considered in order to accept it as a formal proof. What needs to be further considered in order to formally prove the above statement? Perhaps that orthogonal and only orthogonal transformations preserve rectangles so that just orthogonality of the transformation needs to be considered? Also the argument reducing the affine space to the linear subspace seems quite hand-wavy.

2

There are 2 best solutions below

0
On

The comments convinced me that my proposed solution is wrong since shear transformation has $\det=1$ and it does not preserve angles ($\det$ is about volume preservation). Similarly, uniform scaling with scaling factor $s$ has $\det=s^2$ and does preserve angles. So the condition is insufficient in both ways.

Another approach could be to decompose the transformation like in this answer and check whether $p = r$ and $q = 0$ for the extracted parameters of the matrix $A$. However, I don't know of any elegant way to prove it.

One approach for a proof could be to consider points $t, u, v \in \mathbb{R}^2$ such that $(t - u) \cdot (u - v) = 0$ (one corner of a rectangle) where $\cdot$ denotes the scalar product and see whether this property holds after applying such transformation exploiting the fact that affine transformations keep parallel lines parallel so a rectangle can only be deformed into a parallelogram, not any other quadrilateral. I lack time to think about it more deeply now. Does that seem like a good approach?

0
On

tl; dr: Let $A$ be an invertible $2 \times 2$ real matrix. The linear transformation $$ T(x) = Ax $$ preserves rectangles if and only if the columns of $A$ are orthogonal and of equal non-zero length.

Equivalently, IIRC, $A^{t}A$ is either (i) a non-zero scalar multiple of the identity (if $0 < \det A$), or (ii) a non-zero scalar multiple of $\operatorname{diag}[1, -1]$ (if $\det A < 0$).


Proof: Let $e_{1}$ and $e_{2}$ denote the standard basis vectors, which in particular are orthogonal and of equal length. Since $A$ preserves rectangles, the columns of $A$, namely $Ae_{1}$ and $Ae_{2}$, are orthogonal, i.e., $(Ae_{1}) \cdot (Ae_{2}) = 0$.

Further, $e_{1} - e_{2}$ and $e_{1} + e_{2}$ are orthogonal. Since $T$ preserves rectangles, $A(e_{1} - e_{2}) = Ae_{1} - Ae_{2}$ and $A(e_{1} + e_{2}) = Ae_{1} + Ae_{2}$ are orthogonal, i.e., \begin{align*} 0 &= (Ae_{1} - Ae_{2}) \cdot (Ae_{1} + Ae_{2}) \\ &= |Ae_{1}|^{2} - |Ae_{2}|^{2} \\ &= \bigl(|Ae_{1}| - |Ae_{2}|\bigr) \bigl(|Ae_{1}| + |Ae_{2}|\bigr). \end{align*} Consequently, $|Ae_{1}| = |Ae_{2}|$. Since $A$ is invertible, this length is non-zero. This completes the argument that if $T$ preserves rectangles then the columns of $A$ are orthogonal and of equal non-zero length.

Conversely, the $(i, j)$-entry of $A^{t}A$ is $$ e_{i}^{t}A^{t}Ae_{j} = (Ae_{i})^{t} (Ae_{j} = (Ae_{i}) \cdot (Ae_{j}). $$ If the columns of $A$ are orthogonal and of equal length, then \begin{align*} A^{t}A &= \left[ \begin{array}{@{}cc@{}} (Ae_{1}) \cdot (Ae_{1}) & (Ae_{1}) \cdot (Ae_{2}) \\ (Ae_{2}) \cdot (Ae_{1}) & (Ae_{2}) \cdot (Ae_{2}) \\ \end{array}\right] \\ &= \left[ \begin{array}{@{}cc@{}} |Ae_{1}|^{2} & 0 \\ 0 & |Ae_{2}|^{2} \\ \end{array}\right] \\ &= |Ae_{1}|^{2} \left[ \begin{array}{@{}rr@{}} 1 & 0 \\ 0 & \pm 1 \\ \end{array}\right]. \end{align*} Geometrically, $T$ is a composition of rotation, scaling by a non-zero factor, and/or reflection. Since each type of transformation preserves rectangles, so does $T$.