Finding the angle of rotation given the slope of the line connecting two rotated points.

Asked by Peter Vanderschraaf

Peter Vanderschraaf (view profile)

on 30 Jun 2014
Latest activity Edited by Matt J

Matt J (view profile)

on 30 Jun 2014
Accepted Answer by Matt J

Matt J (view profile)

I am trying to apply certain special affine transformations to sets in 2-space. One of the simplest problems I am working with: I have original points (3,8) and (6,1) that lie on a line with slope m = -7/3 . I would like to rotate these two points (counterclockwise through the origin) so that the rotated points lie on a new line with slope m = -1 .
This is easy if one can find the angle of rotation but I am having trouble even with mupad. I tried rotating the original two points with the 2x2 matrix
cos(w) -sin(w)
sin(w) cos(w)
and then solving for w in mupad but the output (right below) appears to show that the set of rotation angles are all complex valued which seems wrong.
(PI*k - (ln(21/29 + (20*I)/29)*I)/2, k, Z_)
If I can find a real value for w in either radians or degrees I think I can proceed. Am I right that this problem has an easy solution I am simply missing?

Answer by Matt J

on 30 Jun 2014
Edited by Matt J

on 30 Jun 2014