# Rotate a graph by a given number of radians?

1. Nov 13, 2008

### soandos

Is there a way to rotate a graph by a given number of radians?
for example, take to standard parabola where the directrix is a horizontal or vertical line, and make it a line of any slope?

2. Nov 13, 2008

### Werg22

Re: Rotations

Yes, with what we call a transformation of coordinates. If the vector through the origin the point (x,y) defines has length r and angle a, then (x,y) = (r*cos a, r*sin a). If the transformation rotates the graph by an angle b, then T(x,y) = (r*cos(a + b), r*sin(a + b)). Of course you can express this in terms of x, y since r = sqrt(x^2 + y^2) and a = arctan(y/x), but that makes for an awkward expression.

3. Nov 13, 2008

### maze

Re: Rotations

If you consider it as a function y(x) then no, not in general. However, if you consider it as a parameterized curve (x(t), y(t)), then yes. You would form the givens rotation matrix
http://en.wikipedia.org/wiki/Givens_rotation

Then multiply the vector by the rotation matrix to rotate the curve:
$$\left(\begin{matrix}\tilde{x}(t) \\ \tilde{y}(t)\end{matrix}\right) = \left(\begin{matrix}cos(\theta) & sin(\theta) \\ -sin(\theta) & cos(\theta)\end{matrix}\right)\left(\begin{matrix}x(t) \\ y(t)\end{matrix}\right)$$

where $(\tilde{x}(t), \tilde{y}(t))$ is the rotated parameterixed curve.

4. Nov 13, 2008

### soandos

Re: Rotations

What exactly is the parametrization of a general exponetial like x^2, or x^3+3x?

5. Nov 13, 2008

### maze

Re: Rotations

Its just what you would expect:
x(t) = t
y(t) = t^2

6. Nov 14, 2008

### HallsofIvy

Re: Rotations

There is no such thing as the parameterization of any curve. There are always an infinite number of possible parameterizations. For any curve given by y= f(x) we can always take x itself to be the parameter: x= t, y= f(t).

Oh, and "x^2" and "x^3+ 3x" are NOT "exponentials". They are polynomials.