If I am not careful enough in doing everything in the inefficient M336 way I might be heading for some really bad marks. Let me explain.

#### Affine transformation as in M336

An affine transformation is a transformation of the form $$\mathbf{x} \rightarrow A\mathbf{x} + \mathbf{p},$$ where $A$ is an invertible linear transformation and $\mathbf{p}$ some constant vector.

Why not:

An affine transformation is of the form $$\mathbf{x} \rightarrow A\mathbf{x} + \mathbf{p},$$ where $A$ is an invertible matrix and $\mathbf{p}$ a vector.

Details matter in mathematics.

Not important, to the point: for calculation purposes the notation $f=t\left[ \mathbf{p} \right] \circ \lambda\left[ \mathbf{A} \right] $ is used which requires five additional rules to remember:

R1 $t\left[ \mathbf{p} \right] \circ t\left[ \mathbf{q} \right] = t\left[ \mathbf{p+q} \right]$

R2 $\lambda \left[ A \right] \circ \lambda \left[ B \right] = \lambda \left[ AB \right]$

R3 $\lambda \left[ A \right] \circ t\left[ \mathbf{p} \right] = t\left[ A \mathbf{p} \right] \circ \lambda \left[ A \right]$

R4 $( t\left[ \mathbf{p} \right] \circ \lambda \left[ A \right] ) \circ ( t\left[ \mathbf{q} \right] \circ \lambda \left[ B \right] ) = t\left[ \mathbf{p}+A\mathbf{q} \right] \circ \lambda \left[ AB \right]$

R5 $(t\left[ \mathbf{p} \right] \circ \lambda \left[ A \right])^{-1} = t\left[ -A^{-1}\mathbf{p} \right] \circ \lambda \left[ A^{-1} \right]$

What an

**ugly** and never seen before notation. Br! This hurts my eyes.

#### Alternative

For calculation purposes we define the block matrix

$$R = \left( \begin{array}{cc}

A & \mathbf{t} \\

0 & 1 \end{array} \right) $$

Example: if $A=I$ and $\mathbf{t}=(t_1,t_2)^T$ and $\mathbf{x}=(x,y)^T$, then

$ R\mathbf{x} = \left( \begin{array}{ccc}

1 & 0 & t_1 \\

0 & 1 & t_2 \\

0 & 0 & 1 \end{array} \right) \cdot \left( \begin{array}{c}

x \\

y \\

1 \end{array} \right)= \left( \begin{array}{c}

x+t_1 \\

y+t_2 \\

1 \end{array} \right)$

No rules to remember, only elementary matrix algebra. We have used the fact that a translation in $R^n$ is basically a rotation in $R^{n+1}$. So, the same idea works for affine transformations in $R^3$ which can be modeled by a rotation-matrix in $R^4$.