# Rotating a function about the origin

stupid question from a high school kid. How do you algebraically rotate (not flip) a function about the origin for any given angle? and what is the notation for it?

stupid question from a high school kid. How do you algebraically rotate (not flip) a function about the origin for any given angle? and what is the notation for it?

There are several ways to look at it, depending on your level of mathematical knowledge. I'm guessing you haven't studied vectors or matrices, is that true? How about trig?

If know some trig, then this might make some sense:

For a given point (x,y) on your original function, you can identify the rotated point (x',y') as follows:

x' = x*cos(a) - y*sin(a)
y' = x*sin(a) + y*cos(a)

where a is the angle of rotation.

Does that help?

disregardthat
An idea could be to transform the function to polar form, rotate with an angle of choice and then transform back to cartesian form.

HallsofIvy
Homework Helper
This is really the same as belliott448's answer: Multiply
$$\begin{bmatrix}cos(\theta) & -sin(\theta) \\ sin(\theta) & cos(\theta)\end{bmatrix}\begin{bmatrix}x \\ y \end{bmatrix}$$

to rotate the point (x,y) about the origin an angle $\theta$.

so you mean for y=f(x) you can get the new function by plugging f(x) for y into the matrices and multiplying them?
I get first row: x cos(theta) - f(x) sin(theta)
second row: f(x) cos(theta) + x sin(theta)

Is the new function f(x) cos(theta) + x sin(theta)?

Last edited:
so you mean for y=f(x) you can get the new function by plugging f(x) for y into the matrices and multiplying them?
I get first row: x cos(theta) - f(x) sin(theta)
second row: f(x) cos(theta) + x sin(theta)

Is the new function f(x) cos(theta) + x sin(theta)?
Sort of.

If you start with a point (x,f(x)), that point will be rotated to (x',f'(x)), where the primes indicate the rotated values and are given by the equations you have. The trouble is that you now have a new function value, f', but it's expressed as a function of the original x, not of the new x', which is what you need in order to find the form of the new function.

You can fix this by inverting the equation for x' in order to solve for x in terms of x', and then plug that into your expression for f' to express it as a function of x'.

I'm pretty sure that what you'll end up with is the same as what you'd get by following Jarles' suggestion to switch to polar coordinates, do the rotation, and then transform back again. That's bound to give you the same sines and cosines.

I'm not sure if one method will be easier to perform, but it's too late for me to try it tonight! Sorry! I'll do it tomorrow if no one else has by then.

I tried putting e^x cos(pi/3) + x sin(pi/3) on my calculator and it didn't work. Am I doing something wrong?

disregardthat
You have to use the vector representation of your function.

I tried putting e^x cos(pi/3) + x sin(pi/3) on my calculator and it didn't work. Am I doing something wrong?
Okay, so your function is y = e^x, right? If you plug in a specific value of x, say 1.5, then you get y = e^1.5 = 4.5 (approximately).

If you rotated this point (1.5,4.5) by pi/3, you'll get:

x' = 1.5 cos(pi/3) - 4.5 sin(pi/3) = -3.1
y' = 1.5 sin(pi/3) + 4.5 cos(pi/3) = 3.5

for the coordinates of the rotated point. That's fine if all you want to do is to plot the rotated function, but if you write down a new function whose curve is the rotated one, you need a few more steps.

y' is the y coordinate of the rotated point (3.5), so it's the value of the new function, but the expression above gives you y' in terms of x, the original x coordinate (1.5); what you need is an expression in terms of x', the x coordinate of the rotated point (-3.1), since that's the x value that corresponds to y'. To get that, you have substitute for x in the expression for y' (x appears both as x and also in the expression for y, namely e^x), to write it in terms of x'.

This means that you have to invert the equations for x' and y' to get equations for x and y in terms of x' and y'. Try that - you'll have to solve the two equations for x and y. (Hint: the answer should look very much like the original equations, but with some changes of sign. This makes sense, if you think about it, since writing x and y as functions of x' and y' just tells you how to rotate (x',y') back to (x,y), so it's just a rotation by the negative of the original angle.)

Do all that, and should have an expression for y' as a function of x', which is the equation for the rotated curve.

You know, now that I attempt the algebra involved in the example above, I see that it gets pretty complicated because of the exp() function and the need to invert equations containing it (this is related to the fact that not every function gives rise to a simple function when rotated).

I recommend going through the steps above for a simple linear function, like a line through the origin. It's a lot easier both to solve this and also to see if the result makes sense, since you should be able to predict the correct answer.

i have a ti-83... what do i put in X1T and Y1T?

Beats me! I'm old-school and have never programmed a TI-83.

It's still not clear to me what you're trying to do. Do you just want to produce a plot of the rotated function? If so, then the steps outlined above should be sufficient (I'm assuming the TI-83 lets you create a function as a routine with several steps in it.)

Are you actually trying to determine the functional form of the rotated function? Do you have a specific function in mind that you want to rotate?

It would be a little easier to help if we knew what your goal is.

HallsofIvy
Homework Helper
i have a ti-83... what do i put in X1T and Y1T?
If your original function is y= f(x), you can use x itself a parameter: x= t, y= f(t).

After the rotation, through angle $\theta$ you have
$x' = x cos(\theta) - y sin(\theta)$
$y' = x sin(\theta) + y cos(/theta)$

Again, using x itself as parameter, that becomes
$x' = t cos(\theta) - f(t) sin(\theta)$
$y' = t sin(\theta) + f(t) cos(\theta)$

Use those as X1T and Y1T.

CRGreathouse
Homework Helper
i have a ti-83... what do i put in X1T and Y1T?

Change [mode] to parametric, then do as Halls suggests.

HallsofIvy
Homework Helper
I assumed lolgarithms was asking about parametric mode. "X1T" and "Y1T" are what the TI-83 calls the functions in parametric mode. In function mode it would be just Y1, Y2, etc.

oh, i mean ti-84 silver edition

the most important for me is the functional form. is it in closed form?

the most important for me is the functional form. is it in closed form?
Not in general, I wouldn't think. Suppose you rotate a sine curve by more than 45 degrees - it will no longer be single-valued, so you won't be able to write down a simple expression for the resulting function. If it is in closed form, I'll bet it's ugly!