next up previous
Next: h_affine_I Up: h_affine_I Previous: h_affine_I

2. Extended matrices

For a vector x$ = (x,y)$, the corresponding extended vector is $ \hat{\mbox{\bf x}} = (x,y,1)$. For an affine transformation $ T:$   R$ ^2 \rightarrow$   R$ ^2$ given by $ T($x$ ) =$   x$ A +$   b, the corresponding extended matrix is the $ 3 \times
3$ matrix $ \hat A = {\left [\begin{array}{ccc} a _ {11}& a
_ {12}& 0\\  a _ {21}& a _ {22...
...t ] } = {\left [\begin{array}{cc} A&0\\
\mbox{\bf b}&1 \end{array} \right ] }$.



As you see, $ \hat A$ contains all the information needed for $ T$. A key observation is that if you use extended vectors and matrices, affine transformations can be computed with just a single matrix multiplication:



$ \hat{\mbox{\bf x}} \hat A = (x,y,1) {\left [\begin{array}{ccc} a _
{11}& a _ {12}& 0\\  a _ {21}& a _ {22}& 0\\  b _ 1& b _
2& 1 \end{array} \right ] }$ $ =$ $ (a _ {11} x + a _ {21}
y + b _ 1,a _ {12} x + a _ {22} y + b _ 2,1)$ $ =$ $ ($x$ A +$   b$ ,1)$ $ =$ $ {T(\mbox{\bf x})} \hat {\ }$.



Application 2.1 . If you have a matrix multiplication routine, you can use it directly to compute affine transformations. For example, for $ T$ as in Example [*], $ T(7,8)$ can be found by computing $ (7,8,1) {\left
[\begin{array}{ccc} 2&1&0\\  3&4&0\\  5&-1&1 \end{array}\right ] } = (43,38,1)$, so $ T(7,8) = (43,38)$.



Application 2.2 . If $ T$ and $ U$ are composed as in Example [*], then $ \hat C \hat A $ gives the extended matrix for $ T
\circ U$. (Here $ \hat A$ is the extended matrix for $ T$ and $ \hat C $ for $ U$.)



Application 2.3 . If $ T$ has extended matrix $ A$ then the inverse transformation $ T^{-1}$ has extended matrix $ {\hat A }^{-1}$ (if $ A$ is invertible).



Example. Find the extended matrix for the rotation by $ 90 ^\circ$ about the center $ (2,1)$.

Solution. Use the three-step method of moving to an easy location (moving the center to the origin), rotating by $ 90 ^\circ$, and then moving back. The middle step is a homogeneous linear transformation, so its extended matrix has a zero translation part. The first and third steps are translations, so their homogeneous part is $ I$. Thus the answer is



$ {\left [\begin{array}{ccc} 1&0&0\\  0&1&0\\  -2&-1&1
\end{array} \right ] } {\...
...t ] } {\left
[\begin{array}{ccc} 1&0&0\\  0&1&0\\  2&1&1 \end{array} \right
] }$ $ =$ $ {\left [\begin{array}{ccc} 0&1&0\\  -1&0&0\\
3&-1&1 \end{array} \right ] }$.



(Notice that in the three-step method it is most natural to find the third matrix first, the one that takes the easy position to the harder position. The first matrix is the inverse of the third. Here, where the first and third are translations, the inverse is obvious.)




next up previous
Next: h_affine_I Up: h_affine_I Previous: h_affine_I
Kirby A. Baker 2002-01-16