Rotating Lines

Problem:

Given a line of slope m in the Euclidean plane, what is the slope m’ of the line rotated (counterclockwise) by angle θ?

Solution:

Suppose we have an equation for the line of the form y = mx + b. We can ignore b as it is unrelated to the slope (in effect, we are working in an affine space).

So, y = mx for our purposes. Every point satisfying this equation is a multiple of

$\left[\begin{array}{c}1 \\ m\end{array}\right]$

and, similarly, every point satisfying the equation y = m’x of the rotated line is a multiple of

$\left[\begin{array}{c}1 \\ m'\end{array}\right]$

Since the latter point is the image of the former after rotation by θ, the points are related by a rotation matrix, like so:

$\left[\begin{array}{c}1 \\ m'\end{array}\right] = \left[\begin{array}{cc}\cos\theta & -\sin\theta \\ \sin\theta & \cos\theta\end{array}\right] \left[\begin{array}{c}1 \\ m\end{array}\right]$

Solving for m’ then yields

$m' = \frac{\sin\theta + m\cos\theta}{\cos\theta - m\sin\theta}$

which, of course, is our solution in terms of m and θ.

Jun 28th, 2010
Tags:
Comments are closed.