Formulas for Rotation and Translation

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
16 replies · 5K views
JC2000
Messages
186
Reaction score
16
Moved from a technical forum, so homework template missing
Given the coordinates ##P = (3,4)## , find the coordinates of ##P"(x',y')## when the origin is shifted to (1, –2), and the axes are rotated by 90° in the clockwise direction.

I attempted to solve this problem using the following formulas :

##x = X + h## and ##y = Y + k## for translation of the coordinate system. And the table below for rotation of the axes where (x,y) are the coordinates before rotation :
\begin{array}{|c|c|c|c|}
\hline
& x & y\\ \hline
x'&cos \theta & sin \theta\\ \hline
y'&-sin \theta &cos \theta &\\ \hline
\\ \hline.
\end{array}

Since Rotation followed by Translation of the axes or vice versa should give the same result, I attempted to solve it in multiple ways but did not get the same result.

x,y are the coordinates before transformation while x',y' are coordinates after transformation. h,k represent the coordinates of the origin after translation.)

Case 1 : Translation followed by Rotation
Using the above formulas I got the following results :
$$x'= (x-h)cos \theta + (y-k)sin\theta$$ and $$y' = -(x-h)sin\theta + (y-k)cos\theta$$ ...(A)

OR

$$x-h = x'cos\theta - y'sin\theta$$ and $$y-k = x'sin\theta + y'cos\theta$$ ...(B)

Case 2 : Rotation followed by Translation :
$$x = (x'+h)cos\theta - (y'+k)sin\theta$$ and $$y = (x'+h)sin\theta + (y'+k)cos\theta$$...(C)

OR

$$x'+ h = xcos\theta + ysin\theta A$$ and $$y'+k = -xsin\theta + ycos\theta$$...(D)

Upon plugging in the values (A) and (B) gave matching answers with ##P"(-6,2) ##whereas using (C) and (D) gave ##P"(-5,5)##.

Thus I had the following questions:
1. Are the formulas (A),(B),(C),(D) correct?
2. If not, then why?
 
on Phys.org
JC2000 said:
Since Rotation followed by Translation of the axes or vice versa should give the same result
Really? Try to visualise what is happening. What if the original point is (0,0)?
 
  • Like
Likes   Reactions: JC2000 and PeroK
DrClaude said:
Really? Try to visualise what is happening. What if the original point is (0,0)?

After trying to visualize the process I believe that the two results would be different since...

Case 1 : Rotate then Translate - Here the translation occurs with reference to the new coordinate axes (axes which have been rotated slightly with respect to the original axes).

Case 2 : Translate then Rotate - Here the translation occurs with respect to the original axes and thus represents a different point.

a)And hence the difference in result?!

b)Is this why (A) matches (B) while (C) matches (D)?

c) If this is the case then (A),(B) hold only for Translation followed by Rotation while (C), (D) hold only for Rotation followed by Translation.

 
JC2000 said:
a)And hence the difference in result?!

b)Is this why (A) matches (B) while (C) matches (D)?

c) If this is the case then (A),(B) hold only for Translation followed by Rotation while (C), (D) hold only for Rotation followed by Translation.

Correct.
 
  • Like
Likes   Reactions: JC2000
DrClaude said:
Correct.

Thank you very much!
 
WWGD said:
check by using matrices, since both rotation
I am unfamiliar with the use of matrices for transformations, I would be grateful if you would share a few links regarding the topic. Thanks!
 
Last edited:
Maybe you should think the rotation again. I mean I think you have got the correct formula for a general rotation which will be useful in future.
But a rotation through 90° is really very simple – off the back of your head almost you could say what does the point (a, b) relative to the original x, y axes, become relative to the rotated axes?

This would serve you as a check, and in getting habit of looking for simple solutions even if you can also get them longhand.
 
  • Like
Likes   Reactions: neilparker62 and JC2000
epenguin said:
Maybe you should think the rotation again. I mean I think you have got the correct formula for a general rotation which will be useful in future.
But a rotation through 90° is really very simple – off the back of your head almost you could say what does the point (a, b) relative to the original x, y axes, become relative to the rotated axes?

This would serve you as a check, and in getting habit of looking for simple solutions even if you can also get them longhand.

Yes, (a,b) would be (b.-a) when the axes are rotated counter-clockwise and (-b,a) when rotated clockwise?! I was actually struggling with the general case and hence I picked the first problem I came across to try and list all possible cases, nonetheless using a simple case does seem useful. Strangely when I tried to do the rotation by 90 degrees off the back of my head I struggled quite a bit. Thanks.
 
WWGD said:
Sure,
https://en.wikipedia.org/wiki/Rotation_matrix
Please note my edit: translations are NOT linear, they are what you call affine.
Please let me know if you want/need something else on this.

Are there matrices for transformations? Also you used the terms 'linear operations' and 'affine transformation', I looked them up on wikipedia and there seemed to be a fair bit of content related to them. Is there an overarching 'topic' that they link to? If so, is there a resource that you would recommend that systematically deals with it. Thank you for your time.
 
JC2000 said:
Are there matrices for transformations? Also you used the terms 'linear operations' and 'affine transformation', I looked them up on wikipedia and there seemed to be a fair bit of content related to them. Is there an overarching 'topic' that they link to? If so, is there a resource that you would recommend that systematically deals with it. Thank you for your time.
Sorry, JC2000, I will check something more specific/focused. I will be a bit loose with the terms to avoid being confusing. There is a correspondence (bijection, meaning a map that assigns to every linear map a unique matrix and viceversa) between linear transformations and matrices. A linear map is , essentially, one in which the output is directly proportional to the input , e.g., if we double the input, we double the output ( notice, e.g., ## f(x) = x^2 ## is _not_ linear , as ##f(6)=36 \neq 2f(3)=18 ##). I will look for something else.
 
  • Like
Likes   Reactions: JC2000
WWGD said:
Sorry, JC2000, I will check something more specific/focused. I will be a bit loose with the terms to avoid being confusing. There is a correspondence (bijection, meaning a map that assigns to every linear map a unique matrix and viceversa) between linear transformations and matrices. A linear map is , essentially, one in which the output is directly proportional to the input , e.g., if we double the input, we double the output ( notice, e.g., ## f(x) = x^2 ## is _not_ linear , as ##f(6)=36 \neq 2f(3)=18 ##). I will look for something else.

1.So linear maps/transformations are essentially linear functions?
2.What would be a nonlinear transformation?
3. Is the statement regarding the mapping being bijective an axiom?

Do all these topics fall under Linear Algebra? Since, in that case I will encounter that area in due course of time.
 
JC2000 said:
1.So linear maps/transformations are essentially linear functions?
2.What would be a nonlinear transformation?
3. Is the statement regarding the mapping being bijective an axiom?

Do all these topics fall under Linear Algebra? Since, in that case I will encounter that area in due course of time.

1) Yes. You may also have operators, which are functions defined on functions. Integration is an example ## \int (f+g)= \int f + \int g ##, differentiation too.
2) ##Cosx, Sinx, x^n ; n \neq 1 ##, Basically when multiplying the input by k does not increase the output by k. ## Cos(x+y) \neq Cosx + Cosy ; \sqrt {x+y} \neq \sqrt x + \sqrt y ##
3) It is a theorem: Once you set up an ordered basis, there is a well-defined bijection between matrices and linear transformations.
 
  • Like
Likes   Reactions: JC2000
WWGD said:
1) Yes. You may also have operators, which are functions defined on functions. Integration is an example ## \int (f+g)= \int f + \int g ##, differentiation too.
2) ##Cosx, Sinx, x^n ; n \neq 1 ##, Basically when multiplying the input by k does not increase the output by k. ## Cos(x+y) \neq Cosx + Cosy ; \sqrt {x+y} \neq \sqrt x + \sqrt y ##
3) It is a theorem: Once you set up an ordered basis, there is a well-defined bijection between matrices and linear transformations.

1) So linear transformation = linear operator = linear mapping?
2) The examples you gave are non linear functions and are also nonlinear operators/transformations, since you said that operators are functions defined using other functions?
3) Also, why is there a unique term for functions defined on functions? Does this all become apparent once I start linear algebra?
 
JC2000 said:
1) So linear transformation = linear operator = linear mapping?
2) The examples you gave are non linear functions and are also nonlinear operators/transformations, since you said that operators are functions defined using other functions?
1)Yes. But you see, there is no uniformity of notation/usage in Mathematics, so I don't want to give you a definitive answer. Integration, differentiation are linear operators. Inversion, i.e., ## f \rightarrow 1/f ## ( assuming ## f \neq 0 )##,is not a linear operator.
2) Considering the answer in 1), yes.
 
  • Like
Likes   Reactions: JC2000
epenguin said:
Maybe you should think the rotation again. I mean I think you have got the correct formula for a general rotation which will be useful in future.
But a rotation through 90° is really very simple – off the back of your head almost you could say what does the point (a, b) relative to the original x, y axes, become relative to the rotated axes?

This would serve you as a check, and in getting habit of looking for simple solutions even if you can also get them longhand.

$$P(x,y) → P'(x-1 ; y+2) → P''( -(y+2); x-1) $$