0
$\begingroup$

Suppose I have a 2D matrix as such: $\begin{bmatrix} 1 &0 &0\\ 0 &1 &0\\ 0 &0 &1\\ \end{bmatrix} $

If I apply a rotation of 180 degrees and a scale of 2, what will my resultant matrix look like? Also, given another matrix (example below), how do I get the angle it was rotated and the scale?

$\begin{bmatrix} 1.4 &0.12 &0\\ -0.12 &1.4 &0\\ 0 &0 &1.0\\ \end{bmatrix} $ I apologise in advance- I'm not a math major and this is most definitely not homework. I just want to apply this knowledge in transforming images (I'm making an app). Thanks!

  • 2
    Obligatory xkcd: http://xkcd.com/184/2012-02-10

1 Answers 1

1

A= $\begin{bmatrix} 1 &0 &0\\ 0 &1 &0\\ 0 &0 &1\\ \end{bmatrix} $

B$_{+180}$= $\begin{bmatrix} cos(180 )&sin(180) &0\\ -sin(180) &cos(180 ) &0\\ 0 &0 &1\\ \end{bmatrix} $

C$_{2,2}$= $\begin{bmatrix} 2 &0 &0\\ 0 &2 &0\\ 0 &0 &1\\ \end{bmatrix} $

ABC = $\begin{bmatrix} -2 &0 &0\\ 0 &-2 &0\\ 0 &0 &1\\ \end{bmatrix} $ (Assuming rotation is clockwise)