# What are the rules for geometrical transformations on entries of matrices that describe geometrical transformations?

This question may be a bit vague or broad, but it has bugged me ever since I learned about matrix transformations (mainly in the context of 3D computer graphics). I'm not a mathematician, so "simple" answers would be preferred. It might also be that I do not know the right keywords for a websearch, and any hint in this regard would also be appreciated.

Transformation matrices in 3D computer graphics are commonly $4 \times 4$ matrices, using homogeneous coordinates, so that they can describe more complex transformations like translations and projections.

The matrix describing a rotation around the z-axis in 3D is

$\begin{pmatrix} cos \alpha & -sin \alpha & 0 & 0 \\ sin \alpha & cos \alpha & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{pmatrix}$

The matrix that describes a rotation about the x-axis is

$\begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & cos \alpha & -sin \alpha & 0 \\ 0 & sin \alpha & cos \alpha & 0 \\ 0 & 0 & 0 & 1 \end{pmatrix}$

Obviously, the second matrix can be created from the first one: Treating the matrix entries as "points in 2D space", the transformation that is applied here is

$\begin{pmatrix} 1 & 0 & 1 \\ 0 & 1 & 1 \\ 0 & 0 & 1 \end{pmatrix}$

The matrix translates the entries one step to the right, and one step down (assuming the "origin" at the upper left, in this case).

But it does not end there: The matrix for a rotation around the y-axis is

$\begin{pmatrix} cos \alpha & 0 & sin \alpha & 0 \\ 0 & 1 & 0 & 0 \\ -sin \alpha & 0 & cos \alpha & 0 \\ 0 & 0 & 0 & 1 \end{pmatrix}$

This can be created from the first matrix by applying

$\begin{pmatrix} 2 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 1 \end{pmatrix} \cdot \begin{pmatrix} 1 & 0 & 1 \\ 0 & 1 & 1 \\ 0 & 0 & 1 \end{pmatrix} \cdot \begin{pmatrix} -1 & 0 & 0 \\ 0 & -1 & 0 \\ 0 & 0 & 1 \end{pmatrix}$

Which reflects the entries about the origin, translates the entries, and then scales them by a factor of 2.

(This may be a bit brittle, due to the discrete space, but should still make sense)

So the question is: What are the rules that govern these transformations?

(Or is this just an odd coincidence? I've read other questions, where these matrices have rather been described as submatrices of a larger matrix ...)

Apologies if this turns out to be too broad, but I hope that the answer will eventually also answer these questions:

• Does this generalize to higher dimensions?
• Does this even apply to tensors?
• What other operations can be applied to predefined matrix entries that change the effect of the matrix in a "geometrically meaningful" manner? For example, a shear matrix can be converted into a translation matrix (using scaling by a factor of 0 and translating about 4 in x-direction), but the other way around is obviously not possible. The "reflection" about the origin in the last example could also be seens as a rotation of the entries around the z-axis, by 180° - maybe there are sensible transformations of the entries that involve rotations about 90°?