# Linear Algebra: Composition of transformations (rotation+translation)

1. Aug 15, 2010

### degs2k4

1. The problem statement, all variables and given/known data

I have a question regarding how to compose 2 transformations, a rotation and a translation, of a linear algebra problem.

Suppose we have a quadratic curve like the following one:

(i) x^2 + y^4 - 6xy +2x -3y +6 = 0

We want to transform the above into its standard position, it order to see what kind of conic is. First we notice that the above curve has been rotated (since it has a cross-product term xy) and translated (since it has terms x^2,x and y^2,y).

Now we want to take it back to its original position by rotating and translating again. First we do the rotation part by means of diagonalization and substitution (x=Px'), which can be seen as a base change that uses matrix P, and get a quadratic of the form:

(ii) ax'^2 + by'^2 + cx' + dy' + e =0

Second, we do the translation by completing squares and substitution (with a variable change like x''=x'-j, y''=y'-k, can be viewed as a vector T=(-j -k)), getting a quadratic form like:

(iii) mx''^2 + ny''^2 + p = 0

Ok, the problem I have comes now. I want to know what the composite transformation (from i to iii) looks like, that is, a matrix Q such that x'' = Q x.

3. The attempt at a solution

So my guess is the following. The rotation transformation was:

$$\begin{pmatrix} x \\ y \end{pmatrix} = P \begin{pmatrix} x' \\ y' \end{pmatrix}$$

$$P^{-1} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} x' \\ y' \end{pmatrix}$$

now substitute it in the translation:

$$\begin{pmatrix} x'' \\ y'' \end{pmatrix} = \begin{pmatrix} x' \\ y' \end{pmatrix} + T$$

$$\begin{pmatrix} x'' \\ y'' \end{pmatrix} = P^{-1} \begin{pmatrix} x \\ y \end{pmatrix} +T = ((P^{-1}) + TI) \begin{pmatrix} x \\ y \end{pmatrix}$$

so,

$$Q = ((P^{-1}) + TI)$$

2. Aug 16, 2010

### lanedance

another idea is to consider the symmetric matrix A and the 3 vector
$$x = (1,x,y)$$

then you can write the quadratic from as
$$x^T A x$$

then find the orthonormal matrix S that diagonlises A
$$D = S^T A S$$

then if you conisder
$$x' = Sx$$

3. Aug 16, 2010

### degs2k4

I see, you can also consider a 3 dim vector using x, y and 1... But, what are the advantages of this ?

Yes, but I think that is for the rotation only. How could you compose the rotation and the translation ?

Thanks for your time and patience

4. Aug 16, 2010

### lanedance

the 3 dim matrix means you can write the whole equation as a single matrix term and deal with the translation as linear operation eg. consider translating (x,y) by (a,b)
$$(x', y' ,1)^T = \begin{pmatrix} 1 & 0 & a \\ 0 & 1 & b \\ 0 & 0 & 1 \\ \end{pmatrix} (x, y ,1)^T$$

so the one is really just there to help and gets carried along, if you do the suggested i think it will deal with both the rotation and translation though i haven't tried it...

5. Aug 16, 2010

### degs2k4

Oh! I understand it now, thanks!

[STRIKE]By "suggested" you mean apply my solution to such 3-dim matrix?[/STRIKE]

Ok, I think I got it now!

Thanks!

6. Aug 17, 2010

### lanedance

no worries, i think i missed a transposed in post #2, & changed the ordering of the vector in #3... hopefully not too confusing & should all come out in the wash

7. Aug 17, 2010

### degs2k4

No problem, I understood what you meant.

Thanks!