This video is really cool, you have a super simple derivation for the transformation too. One thing I think you should have included was why using a rule to rotate the point counterclockwise ended up rotating the graph clockwise. It was because plugging the new expressions in for x and y was basically saying "the counterclockwise rotations of these points satisfy the equation." So the said points would be a rotation in the clockwise direction from the original equation (very similar to how replacing x with x+2 in a function actually moves the graph to left by 2, instead of the right). To go in the standard counterclockwise direction, you can plug in negative theta and simplify with sin and cos rules. Also, it explains why the parametric equations still rotated counterclockwise, because you replaced the functions with the expressions rather than x and y, so the values that were equal to the new x and y rotated counterclockwise, instead of the counterclockwise rotations of x and y satisfying an equation. Again, great video. You definitely deserve more subs for this quality of video and explanation.
Yep. Given that positive theta = anticlockwise, we should ideally start with the transformed coordinate point (x',y'), rotate the point (x',y') back to our original coordinate system (x,y) in a clockwise direction (wherein negative theta comes), and then use the equation y = f(x). The final equation should be consisting of x' and y' terms. What this guy did, is that, instead of finding the locus P' (x',y'), he ended up finding the locus of P' conjugate (x',-y'), entirely going against the initial purpose.
Fun Fact: in this case it is not about precision, the reason why it looks wrong is aliasing (the signal processing kind). The simple version is, that in each pixel on the screen there are multiple red lines, which cannot be shown correctly to you.
@@NoerLuin what if someone invented a computer that could rotate pixels acording to the direction needed to display the best resolution for a given image
Finally, I can rotate the line y = x I've always wanted to model the values of y where it is twice and much as x, but never knew how to rotate it, I can finally live in peace
@@user-pr6ed3ri2k nah dude, i use noodle technique, it's taking a raw noodle on a paper, spinning it around and drawing what it looks like on canvas with oil paints
For those people who don't want to watch the whole 16 minutes: 1) Replace all the X's in your function with "x cos(Θ) - y sin(Θ)" 2) Replace all the Y's in your function with "x sin(Θ) + y cos(Θ)" 3) Set the "Θ" parameter to whatever angle you want your graph to be rotated by And that's it!
Thank you! The video topic is very interesting and I would have watched the whole thing but I had to tap out about 4 minutes in because the pitched-up voice is a sensory nightmare 😩
And if anyone has ever encountered a rotation matrix... You already know how to do it lol. It seems a weird choice to go through this and not at least mention it at the end, instead choosing to go through a million examples when one or two would have sufficed.
One thing to keep in mind is that whenever you rotate a graph, it likely is no longer a function (if it was one to begin with). Some exceptions I can think of are straight lines, and sin and cos (rotated no more than 45 degrees). Otherwise,the curve will "bend over itself" and the same 'x' value can result in 2 different 'y' values. In other words, functions when rotated will, with some exceptions, always become implicit equations.
And the proper solution to that is no longer thinking of it as a function in the cartesian plane, but instead the polar one. y=f(x) -> r=f(theta) then rotate and it can be a function. Or a parametric equation.
This is one way to define that a function is one-to-one: a function is one-to-one if and only if it can never be rotated about the origin in such a way that it is no longer a function.
@@notamouse5630 Agreed, that's how I approached the original problem; parameterize your equation to make a vector in ℝ² as a function of t, and then apply the general rotation matrix in ℝ²: Rot_θ = {{cosθ, -sinθ}, {sinθ, cosθ}} So for a generic vector valued function v(t) in ℝ², the rotation would just be (Rot_θ) v(t). It's a generic linear algebra approach to the problem that yields the same results.
Desmos can use degrees if you open the menu (wrench in upper right corner) and change from radians to degrees. You can also changes axis limits, ticks, polar, and more.
I actually found out how to do this quite recently. I was playing around and noticed if I change the x in y=x² to x+y and y to x-y I would get a rotated parabola. Then by changing the ratios to like 5x+3y I'd get different rotations but they'd also always get scaled by some factor. So I also added complicated scaling factors until I tried using trig functions to scale the axes and it became so much easier. And after having taken a linear algera class it also makes much more sense because it is basically just applying a rotation matrix to [x,y]
Still, nice work! Maths is supposed to be something we play with, not simply memorise to pass tests. No matter how hard it gets, you're doing it right!
If my math teacher had shown the movement and number changes like you did in the first 30 seconds here, I could have avoided so much pain. Why they expected everyone to be able to just look at the numbers and automatically understand I'll never know.
The best way I found to intuitively understand graphs is to just plot it on a graph paper. Sit down, draw the axes, start taking some easily calculatable values of x and just plot it. Don't use calculators for as many values as possible and when you run out of easy values, then use calculator. Usually just gives me a good enough understanding of exactly why the graph is what it is.
@@no-bk4zx Makes sense. I just know that I understand so much better with a corresponding automatic changing visual. There used to be this sim called Orbiter. Space flight but with hard numbers. I was grasping complex orbital mechanics through mathematical inputs while seeing the spacecraft change and also orbital trajectories change in real time.
I feel the same way. I was educated before apps like this were commonplace (though computer graphics certainly existed, and such a program would be easy to write). But it can be shown just with chalk and a blackboard, using a few examples, even without animation.
So, basically you apply a 2D rotation matrix on the curve of the function. I find it interesting the inverse of x^2 (which is an even function) is sqrt(x) which is rotated 90 degree clockwise, and the inverse of x^3 (which is an odd function) is cuberoot(x), which is rotated 90 degrees (either sides), and flipped horizontally. While the inverse of 1/x is 1/x itself. Cool!!
In fact every inverse function is equivalent to a pi/2 rotation and a reflection in the x axis, because that's functionally the same as reflecting in y=x.
Alternatively, you multiply by a complex number. Using a matrix let's you represent arbitrary linear transformations, but complex numbers restrict you to just rotations (and scaling if you let them be unnormalized) which is perfectly fine and more efficient if that's all you need.
Yeah, he's kind of lying when he says he doesn't use matrices. He is writing out the matrix operations long-hand as a new function, but he is still applying the standard rotational matrix transformation. It seems that a sophisticated graphing application could perform the proper substitutions without the need to write it out yourself. In a sense, he is defeating the purpose of layered abstraction, which is the general basis of higher mathematics.
Then perhaps he should have not said anything about matrices in the description, and actually mentioned them in the video at the end. Tease them with the method and examples in the video, but then say "you know how I said we rotate the x-y plane not the curve... Well there's a more general way to transform the x-y plane..." And at least simply name drop
This questions, of rotating the graph, have been in my interest for long time. I always though a general procedure exist - glad I found your channel. Great work.
YOU DON'T KNOW HOW MUCH I WANTED THIS PARTICULAR VIDEO FOR DECADES BUT NO ONE MADE IT I WAS SO DISAPPOINTED... FINALLY I CAN NOW DIE IN PEACE ☮️❤️ This is what we learnt in Electromagnetic Field Theory course in details, it's called "Tensor", Tensors let you do this! This guy just derived it in a simple way, if u add one more axis it will become the tensor rotation formula.
I need to thank you so much for this, I've been working on a video game for a while now and decided that I would spawn things as I go rather than hand build in the editor. You have bestowed the power of rotating graphs upon me and now I can build using arrays and rotate after, simply amazing!!!!
I know that derivation of sin theta cos theta for rotation is very confusing, and I avoid doing it that way because of this. I advocate for the usage of *complex numbers* for this purpose. Complex numbers make the concept of rotational transform much easier to grasp, but you need to learn complex numbers before doing a rotational transform with it. Math is fun. If you learn something as intricate as complex numbers, you will find other harder things getting easier for you (such as finding rotated coordinates in this case). Rotation is just a special case of complex number multiplication.
Honestly, when he began the explanation of how to rotate a single point, I was expecting the explanation to wind up in complex number territory and was mildly surprised when it didn't.
I think it's because of the level of the target audience. But to say "without using matrices!" In the description, and not at least even namedrop a rotation matrix, which is EXACTLY what he did here? Travesty.
You can also derive the formula using the complex domain. Define a complex function of a Real variable as Z(x) = x + i*f(x), then since rotation in the complex plane is just multiplication you multiply Z(x) by e^(it), where t is your angle. When you do that, the Real and Imaginary parts of your new rotated function are identical to your transformation rules.
Loved the video, I went through the same process back in grade 9 when we were doing trigonometry. Here’s a calculus and trig question which I was asked in my last weeks (after the exam so we weren’t wholly wasting time) in Math C as a grade 12 student as a practical application of the calculus we’d been taught: ‘Given a continuous and differentiable function f(x), describe a general method to find all points whose distance to the nearest point(s) on f(x) is equal to a variable k’. I cant remember what the answer to this was but it was certainly a journey to get there, spent a week of my spare time on desmos :p
I was really interested by your question so I wanted to try it out. On desmos: calculator / bxxawx6ifg. If you take the max of the upper bound and the min of the lower bound, then it appears to be a solution. But the resulting function is not continually differentiable, and it looks like you need a lot of piecewise functions to describe it -- I can't imagine that there's an explicit formula. In addition, I used parameterizations - is there some way to write in terms of only x and y?
@@kelly4187 i already did, but this video tells me i could have figured it out during middle school using more basic maths. I really wanted an answer to this problem and never got to actually solve it nicely back then
I figured this thing a long time ago, partially by myself when I was in school (currently in University, making games) Was really curious how it works back then. Thank you for the explanation to others who are as curious as I was! Good luck with the channel
You can also just use some functional equations and inequalities. Suppose we want to define cosine in terms of sine, or vice versa. Set c^2 = 1-s^2 Now if we have a good value of s, we don't need c to appear anywhere in our rotations. what are some valid values? well s should vary between -1 and 1. We can see that the coordinate transform is just giving us a linear combination of x and y. The scalar coefficients might as well be c and s. Let u = (1-s^2)x - (s^2)y . v= (s^2)x+(1-s^2)y. As it is, this will only cover one quadrant. But if you flip the sign of the first term in both u and v, you get the corresponding quadrant across the y-axis. Flipping the sign on the second term in each will put us below the x-axis. By the two combinations of two possible sign changes we get 4 possible quadrants. Great. Now just keep s between 1 and -1. Substitute u for x and v for y. if it's easier, just rewrite your original expression as a level curve. let y=f(x)=x^2. Now let g(x,y)=x^2-y. you can graph this by entering 0=g(x,y) in most software. If so then 0=g(u,v) will rotate the figure smoothly as s varies. again, just flip the signs to cover the other quadrants. [edit] I should add that the constraint on s isn't arbitrary. if |s| > 1 then the rotation is no longer rigid...that is, the shape is not preserved without deformation. As you can probably guess from the graph of y=sin(x), this is going to cover all possible rotations before you run out of s values. If you only let s vary from 0 to 1 then stitching together all the various sign permutations should cover the entire range of angles. [clarification] To get a mathematically positive rotation, let s vary from 1 to 0, 0 to 1, 1 to 0, then finally 0 to 1, bringing you back to y=f(x). Just switch to the next quadrant when s reaches either 0 or 1.
20 years ago I was a high school student. And I ask exactly same question to my math teacher, but he even didn't understand the question. And after 20 years now finally I get an answer to this. Thanks a lot!
This isn’t quite what I needed, I was making a graph engine that you can zoom in and out of, and you can scroll around in, in scratch to break its limits, you can just set any sprite to a custom x and y and set a custom zoom variable and it will work perfectly. Essentially adding a camera to scratch and making it act like sprite borders don’t exist. I was hoping to be able to use this to have the camera basically rotate at a point. Making it the ultimate coordinate scratch engine, with all the capabilities of a normal 2d engine.
I think what you derived is the inverse of what we want, transforming P’ to P.. since we get points that follow x’=(y’)^2 _after_ (rather than before) rotation. We should instead have solved for x,y in terms of x’,y’, substituting these expressions in the original equation y=x^2 Makes sense as the graphs are later shown rotating in the negative direction. If we want to rotate by +theta, we could just negate all the thetas in the expression Nice video, in any case
I found an easy way to put it into Desmos, have different equations: defining the original function before rotation (“f(x)=…”), defining a variable (“b=…”) and the function after rotation. And preferably, put it on “degree” mode. For the parabola at a 45º angle, it would be: f(x)=x^2 b=45 x*sin(b)+y*cos(b) = f(x*cos(b) - y*sin(b)) Change variable “b” to however many degrees rotated you want and change the “f(x)=…” equation to whatever you need to change it to and the rotated equation will update with it. Setting it up like this will also make it so u only have to update less things whenever you want to make a change
Thank you! I have been asking myself how to do this since Year 8!! Thank you for a great explanation of it and with cool looking functions too (what is MOB??) Looking forward to amazing my students and your part 2 video! Looks very interesting and fun
I loved discovering this in desmos when i was in high school. It was such a ureka moment for me. Now my favorite method is turning everything into a vector, then you don't even need the trig. it really helps simplify the equations, and it helps me intuit dot = cos and cross = sin
Desmos has another feature which is very handy for working with parametric functions. You can define P(t) = (f(t), g(t)) and then do P(t) in another cell and Desmos will draw points meeting that definition over the supplied range of t.
Crazy crazy crazy how I was JUST looking at my old writeup of this proof seconds before finding this video. Didn't say anything or look up anything even remotely related to this. Just looked at a physical paper in my notebook with this proof on it, then this video is reccomended to me. That's absolutely nuts.
Interesting video. What I really liked was in the beginning, with then chalkboard background how you had the x and y coordinates in the lower part of then board changing as the parabolas etc on the actual graph changed. But when you moved on to the Trigonometric functions they just stayed the same on the bottom as the drawing rotated would be great if that could be made visual too
Rotating the plane 90 degrees clockwise almost replaces the x axis with the y axis and the x axis with the y axis, but the x values on the new y axis would be running positively down. So it needs to be inverted. Hence, inverse functions and why you change out x and y algebraically. Thanks for the fun video. 2:58
A simple example - rotation by +/-45°: y' = 2x' with x' = 1/√2 · (x - y) and y' = 1/√2 · (x + y) gives y = x/3. For example, the point (3, 1) lies on the line y = x/3. After a +45° counterclockwise rotation, this point will lie on the line y' = 2x'. Similarly, the line y = x/3 is just the same as the line y' = 2x' rotated by -45°.
I used a circle that ran through both points p and p’. Then found the arc length from x to x’ using the formula “L=pi*theta*r/180” Then set that length L to the integral for the function of the circle, from the bounds of x’ to x. Then solved for x’. Plugged x’ into the function for the circle, to find y’. My final results were: x’=sqrt(x^2+y^2)sin(arctan(x/y)-pi*theta/180) y’= sqrt(x^2+y^2)cos(arctan(x/y)-pi*theta/180)
Oh my god. Years ago I pondered with a classmate of mine in algebra 2 whether there was a way to rotate a graph like a parabola and they were like “probably not.” I finally have the method.
You can change desmos to use degrees btw Also, for graphs it’s much more efficient (and in my opinion simpler) to represent the graph as a parametric, not to mention it’s actually doable to graph it by hand
lol this reminds me of when i was in year 7 randomly asking my maths teacher if there was a formula for graphing an ellipse. i actually DID learn it a few years later which was pretty cool!
Funnily enough many precalculus courses teach this and will put this on a final. And if not teach the topic it may be somewhere in the back of a text on precalc or in the analytic section with conics. It can go even more in depth such that you need to find a graph that isn’t rotated FROM a rotated graph. The process involves not rotating the graph back but rather rotating axis. Same idea and everything but a more technical term. That’s actually how you derive the equations used in the video. There are even ways to do this without knowing the angle using a fancy equation involving the double angle of cot. An example question I had on mine a while back was something like giving you the equation x^2-y^2=1 and find the right graph rotated 45 deg. I remember that because the test makers didn’t have a right answer choice for it.
I love this video, I really do! So it hurts me to say there's probably a mistake as from 8:50: In the lower left corner shouldn't it say "y ---> X sin(θ) + ycos(θ)"?
I had this same thought experiment back in high school, I think I googled if it was possible or not and then forgot about it. Now I'm kicking myself for not trying to figure it out because it's so simple. Thank you for this video, my high school self is ecstatic right now (and current self too).
I haven't watched the video yet, but I was going to assume a matrix transformation in the xy plane, but now looking at the description It appears I'm wrong. I'm excited to see how you did it!
As @uncleben7306 noted, it was a bit confusing how the original derivation showed the original point being rotated counterclockwise while the subsequent graphs were rotated clockwise. But in any case, I think this was an outstanding video, and thank you so much for making and sharing it!
Hello there. Would you mind to explain why that is the case? Why it rotates clockwise instead of anticlockwise? I have reread uncleben's comment 7 times, but I struggle understanding their last paragraph? Thanks
@@whisperingocean. Yeah it's pretty confusing, and I'm not sure if I could explain it any more clearly. Though this might not be a perfect analogy, I'd think of someone parachuting while the wind is blowing to the west. In order to end up at their target location, they'd need to jump to the *east*, so that the wind would eventually take them to the right spot. I'm sure there's much better explanations than that, and perhaps it'd be worthwhile to google or search UA-cam. In any case, I hope what I said could help at least a little.
ima reiterate the formula, keep it fresh. it's amazing. simple, works, lots of implications. replace x and y with: any x's are now: x cos(Θ) - y sin(Θ) any y's are now: x sin(Θ) + y cos(Θ) now your function is rotatable. trust me that is wow. can extend to more dimensions ...
example: x^2 + y^2 = r^2 (circle equation) (becomes square as n goes inf (and even)) x is now (xcos(Θ)-ysin(Θ))^2 y same but (x(sin(Θ)+ycos(Θ))^2 r let's make 1 (1^n = 1) (unit circle) r=1 graph that works. now increase n (keep it even) and change theta (n applies to x,y,r) this is amazing edit: full formula i'm using in desmos = ((x^n)+(y^n))=(r^n). replace all x and y's with op's formulas (algebraic substitution). slow mo, x = (xcos(Θ)-ysin(Θ))^n and similarly y =(x sin(Θ) + y cos(Θ))^n add those to equal r^n (make it 1 for simplicity, the rest is just scaling) that's really just x squared plus y squared =1, with.... rotation and squaring (the circle) ... (xcos(Θ)-ysin(Θ))^n+(x sin(Θ) + y cos(Θ))^n=r^n ... if you don't care about rotation or shape it is simply x^2+y^2=r^2 (a circle with radius r)
@RedBeanieMaths Really fun video. Thank you. However, you have a typo in the bottom left at 8:52 so when I tried to apply it, it didn't work. You've got y --> ysin(theta) + ycos(theta). Took me a while to realise what was wrong. Hope that helps.
I recommend geogebra instead. It has many more functions allowing you to plot dynamical systems with slopeField, and do dynamic geometry such as constraining points on lines etc.
To do this I write the function in parametric form then I multiply it by a complex number for example rotating y = x^2 by 45 degrees (t, t^2), (t + it^2) * (cos 45 + i sin 45)
This reminded me, that in computer graphics, coordinates are represented using matrices and you can compute rotations very easily. If rotation is in angles however, this method is required.
I had to do something similar for my research, but the original origin was located on the circumference of a circle with a center located higher on the y-axis (the center was the new main origin). So imagine x^2 being rotated around this new origin where it would originate from a point on the circumference. It took me like 10 days to figure it out, but I used two rotation matrices and a translation matrix...
Another way to do it in your head is to figure out the equation of the new axis line, so for example if you want to move it 45 degrees you just substitute the new x axis which is not x=0 its x-y=0 and y axis is x+y=0 substitute x and y in any equation to the origin with the equation of the line around which you need to rotate and bingo, it helps if you can remember the cos and sin values in 15 degrees interval for example the x axis at 15 degrees become x= ((root 3 -1)/(root 3+1) )y and y is the inverse of it, substitute in the original equation and you get the graph rotated to around that axis.
This great production uses the derived clockwise point rotation equations for the new coordinates as functions of the original coordinates. One must substitute things that are equal to each other. To replace the x and y in the parabola you need expressions for the old coordinates as functions of the new coordinates. They can be obtained by "rearranging" the equations we do have. If done, they turn out to be just the same except that the signs on the two Sin terms are flipped.
My friends and I use this tool to draw on desmos. It's actually super fun! The only problem that arises is that you can't rotate any oval shaped objects as when you do so they begin to distort; they do not remain in their initial shape and tend to expand and contract. Other than that it's super fun to use to make some really interesting pictures.
Wait nvm, I found out how to make it work it turns out we were doing something wrong this whole time. We've used this tool for months now, so it's funny that I found out we copied the wrong equations this whole time.
I’ve been doing a deseos project to draw a selfie for school and I’ve been wondering, why can’t you rotate the graph any number of degrees. My god, this is just beautiful
This video is really cool, you have a super simple derivation for the transformation too. One thing I think you should have included was why using a rule to rotate the point counterclockwise ended up rotating the graph clockwise. It was because plugging the new expressions in for x and y was basically saying "the counterclockwise rotations of these points satisfy the equation." So the said points would be a rotation in the clockwise direction from the original equation (very similar to how replacing x with x+2 in a function actually moves the graph to left by 2, instead of the right). To go in the standard counterclockwise direction, you can plug in negative theta and simplify with sin and cos rules. Also, it explains why the parametric equations still rotated counterclockwise, because you replaced the functions with the expressions rather than x and y, so the values that were equal to the new x and y rotated counterclockwise, instead of the counterclockwise rotations of x and y satisfying an equation. Again, great video. You definitely deserve more subs for this quality of video and explanation.
I knew some subtlety had to have been glossed over - thanks for this. Still a little weird to wrap my head around though.
You answered the main question I had about this video. Thanks!
Yep. Given that positive theta = anticlockwise, we should ideally start with the transformed coordinate point (x',y'), rotate the point (x',y') back to our original coordinate system (x,y) in a clockwise direction (wherein negative theta comes), and then use the equation y = f(x). The final equation should be consisting of x' and y' terms.
What this guy did, is that, instead of finding the locus P' (x',y'), he ended up finding the locus of P' conjugate (x',-y'), entirely going against the initial purpose.
Thanks uncle Ben🙏
UNCLE BEN?!
"All I ask for is infinite precision, is that so much?"
Every mathematician ever
Heisenberg Uncertainty Principle: Yeah, about that...
@@omargoodman2999 Gödel’s incompleteness theorems & Turing’s halting problem… we need to talk
See if you can run Desmos on your personal hardware, get a chunkier graphics card and make the limiting parameters bigger
Fun Fact: in this case it is not about precision, the reason why it looks wrong is aliasing (the signal processing kind).
The simple version is, that in each pixel on the screen there are multiple red lines, which cannot be shown correctly to you.
@@NoerLuin what if someone invented a computer that could rotate pixels acording to the direction needed to display the best resolution for a given image
Finally, I can rotate the line y = x I've always wanted to model the values of y where it is twice and much as x, but never knew how to rotate it, I can finally live in peace
Lol
tan(a)x be like
@@user-pr6ed3ri2k nah dude, i use noodle technique, it's taking a raw noodle on a paper, spinning it around and drawing what it looks like on canvas with oil paints
Also y = 2x and y = 0.5x graphs be like
@@incredulity is your username dakota? it uses letters ive seen in dakota
For those people who don't want to watch the whole 16 minutes:
1) Replace all the X's in your function with "x cos(Θ) - y sin(Θ)"
2) Replace all the Y's in your function with "x sin(Θ) + y cos(Θ)"
3) Set the "Θ" parameter to whatever angle you want your graph to be rotated by
And that's it!
Thank you! The video topic is very interesting and I would have watched the whole thing but I had to tap out about 4 minutes in because the pitched-up voice is a sensory nightmare 😩
Thanks so much
And if anyone has ever encountered a rotation matrix... You already know how to do it lol.
It seems a weird choice to go through this and not at least mention it at the end, instead choosing to go through a million examples when one or two would have sufficed.
That's literally a matrix. Thank you for saving me 14 minutes.
Add the parametrics
I really like that he basically taught the polar coordinate plane and system without actually using or saying that it is. Props to this person.
all while answering an age-old question math enthusiasts always ask!
One thing to keep in mind is that whenever you rotate a graph, it likely is no longer a function (if it was one to begin with). Some exceptions I can think of are straight lines, and sin and cos (rotated no more than 45 degrees).
Otherwise,the curve will "bend over itself" and the same 'x' value can result in 2 different 'y' values.
In other words, functions when rotated will, with some exceptions, always become implicit equations.
And the proper solution to that is no longer thinking of it as a function in the cartesian plane, but instead the polar one. y=f(x) -> r=f(theta) then rotate and it can be a function. Or a parametric equation.
This is one way to define that a function is one-to-one: a function is one-to-one if and only if it can never be rotated about the origin in such a way that it is no longer a function.
@@notamouse5630 Agreed, that's how I approached the original problem; parameterize your equation to make a vector in ℝ² as a function of t, and then apply the general rotation matrix in ℝ²:
Rot_θ = {{cosθ, -sinθ}, {sinθ, cosθ}}
So for a generic vector valued function v(t) in ℝ², the rotation would just be (Rot_θ) v(t). It's a generic linear algebra approach to the problem that yields the same results.
@Astralnekomimi not quite. Y=X can be rotated up to 45 degrees and still be a bijection.
This was missing, you can't really rotate all functions like stated at the beginning of the video
Desmos can use degrees if you open the menu (wrench in upper right corner) and change from radians to degrees. You can also changes axis limits, ticks, polar, and more.
needs likes cos important
radians usually works better because you don't have to change the axis scale for a sin function specifically
@@Sahl0 I think its sin important
@@user-iz5pd7tj6q inverse tan important
You can also just put a degree symbol after a number while in radian mode and it will calculate that number specifically as degrees
I actually found out how to do this quite recently. I was playing around and noticed if I change the x in y=x² to x+y and y to x-y I would get a rotated parabola. Then by changing the ratios to like 5x+3y I'd get different rotations but they'd also always get scaled by some factor. So I also added complicated scaling factors until I tried using trig functions to scale the axes and it became so much easier. And after having taken a linear algera class it also makes much more sense because it is basically just applying a rotation matrix to [x,y]
Still, nice work! Maths is supposed to be something we play with, not simply memorise to pass tests. No matter how hard it gets, you're doing it right!
If my math teacher had shown the movement and number changes like you did in the first 30 seconds here, I could have avoided so much pain. Why they expected everyone to be able to just look at the numbers and automatically understand I'll never know.
The best way I found to intuitively understand graphs is to just plot it on a graph paper. Sit down, draw the axes, start taking some easily calculatable values of x and just plot it. Don't use calculators for as many values as possible and when you run out of easy values, then use calculator.
Usually just gives me a good enough understanding of exactly why the graph is what it is.
@@no-bk4zx Makes sense. I just know that I understand so much better with a corresponding automatic changing visual. There used to be this sim called Orbiter. Space flight but with hard numbers. I was grasping complex orbital mechanics through mathematical inputs while seeing the spacecraft change and also orbital trajectories change in real time.
I feel the same way. I was educated before apps like this were commonplace (though computer graphics certainly existed, and such a program would be easy to write). But it can be shown just with chalk and a blackboard, using a few examples, even without animation.
we need more animators in schools and colleges
Thanks for the demonstration, wish you didn’t pitch shift vocals.
If you can't stand it, then leave this life already
@@LordBrainzwoah
So, basically you apply a 2D rotation matrix on the curve of the function. I find it interesting the inverse of x^2 (which is an even function) is sqrt(x) which is rotated 90 degree clockwise, and the inverse of x^3 (which is an odd function) is cuberoot(x), which is rotated 90 degrees (either sides), and flipped horizontally. While the inverse of 1/x is 1/x itself. Cool!!
In fact every inverse function is equivalent to a pi/2 rotation and a reflection in the x axis, because that's functionally the same as reflecting in y=x.
Alternatively, you multiply by a complex number. Using a matrix let's you represent arbitrary linear transformations, but complex numbers restrict you to just rotations (and scaling if you let them be unnormalized) which is perfectly fine and more efficient if that's all you need.
Yeah, he's kind of lying when he says he doesn't use matrices. He is writing out the matrix operations long-hand as a new function, but he is still applying the standard rotational matrix transformation. It seems that a sophisticated graphing application could perform the proper substitutions without the need to write it out yourself. In a sense, he is defeating the purpose of layered abstraction, which is the general basis of higher mathematics.
@@aliensoup2420 You do have to remember the target audience of this video is people in lower levels of math
Then perhaps he should have not said anything about matrices in the description, and actually mentioned them in the video at the end. Tease them with the method and examples in the video, but then say "you know how I said we rotate the x-y plane not the curve... Well there's a more general way to transform the x-y plane..." And at least simply name drop
This questions, of rotating the graph, have been in my interest for long time. I always though a general procedure exist - glad I found your channel.
Great work.
YOU DON'T KNOW HOW MUCH I WANTED THIS PARTICULAR VIDEO FOR DECADES BUT NO ONE MADE IT I WAS SO DISAPPOINTED... FINALLY I CAN NOW DIE IN PEACE ☮️❤️
This is what we learnt in Electromagnetic Field Theory course in details, it's called "Tensor", Tensors let you do this! This guy just derived it in a simple way, if u add one more axis it will become the tensor rotation formula.
... This is also just a simple rotation matrix from pre-college linear algebra.
Really cool content but that voice changer is really annoying, like borderline unbearable
I need to thank you so much for this, I've been working on a video game for a while now and decided that I would spawn things as I go rather than hand build in the editor. You have bestowed the power of rotating graphs upon me and now I can build using arrays and rotate after, simply amazing!!!!
You blew my mind with this video.
The visual presentation makes it extremely clear that it indeed seems to work for all sorts of equations.
I know that derivation of sin theta cos theta for rotation is very confusing, and I avoid doing it that way because of this. I advocate for the usage of *complex numbers* for this purpose.
Complex numbers make the concept of rotational transform much easier to grasp, but you need to learn complex numbers before doing a rotational transform with it.
Math is fun. If you learn something as intricate as complex numbers, you will find other harder things getting easier for you (such as finding rotated coordinates in this case). Rotation is just a special case of complex number multiplication.
Honestly, when he began the explanation of how to rotate a single point, I was expecting the explanation to wind up in complex number territory and was mildly surprised when it didn't.
I think it's because of the level of the target audience.
But to say "without using matrices!" In the description, and not at least even namedrop a rotation matrix, which is EXACTLY what he did here? Travesty.
I couldn't help myself but laugh when you added this modified voice that said "Shut up and tell us already." You did a great job!
never have i ever thought i would want to know how to rotate graphs like this. 10/10 gonna send it to my friends now
You can also derive the formula using the complex domain. Define a complex function of a Real variable as Z(x) = x + i*f(x), then since rotation in the complex plane is just multiplication you multiply Z(x) by e^(it), where t is your angle. When you do that, the Real and Imaginary parts of your new rotated function are identical to your transformation rules.
First thing in my mind
No pitch shift = 7x better video
What does it matter? Maybe they just don’t feel comfortable with their voice being heard
@@sportsloverbaseball And I don’t feel comfortable not hearing it
@@muffinconsumer4431 Literally only you.
@@EHMM despite tens of other comments to the contrary. Riiiiiiight.
@@muffinconsumer4431 Literally only abnormal people
cool video. why the pitch shift
Loved the video, I went through the same process back in grade 9 when we were doing trigonometry.
Here’s a calculus and trig question which I was asked in my last weeks (after the exam so we weren’t wholly wasting time) in Math C as a grade 12 student as a practical application of the calculus we’d been taught: ‘Given a continuous and differentiable function f(x), describe a general method to find all points whose distance to the nearest point(s) on f(x) is equal to a variable k’.
I cant remember what the answer to this was but it was certainly a journey to get there, spent a week of my spare time on desmos :p
I was really interested by your question so I wanted to try it out. On desmos: calculator / bxxawx6ifg. If you take the max of the upper bound and the min of the lower bound, then it appears to be a solution. But the resulting function is not continually differentiable, and it looks like you need a lot of piecewise functions to describe it -- I can't imagine that there's an explicit formula. In addition, I used parameterizations - is there some way to write in terms of only x and y?
That's an interesting problem. Now I'm going to lose hours of my life as well 😁
Part 2: ua-cam.com/video/_DYYjci2Qpw/v-deo.html&ab_channel=RedBeanieMaths
part 3 soon? D:
thats a banger of a video, what
how do i make the parametric draw itself?
whats MOB? what does the function stand for? how does it work?
I really enjoyed this! Great job! Such fun to watch.
You would have changed my life 10 years ago
And you just made maths 10 times cooler for me, a mechanical engineering student
Learn linear algebra and you can do all of this and more in a simple formulation.
@@kelly4187 i already did, but this video tells me i could have figured it out during middle school using more basic maths. I really wanted an answer to this problem and never got to actually solve it nicely back then
Just how much energy can be felt in a simple, yet neat video like this one? Keep it up, man!
I figured this thing a long time ago, partially by myself when I was in school (currently in University, making games)
Was really curious how it works back then.
Thank you for the explanation to others who are as curious as I was!
Good luck with the channel
Українця тутка навіть не думав знайти
I never realised this video was 16 minutes until the end! Fascinating presentation, really loved it!
You can also just use some functional equations and inequalities.
Suppose we want to define cosine in terms of sine, or vice versa. Set c^2 = 1-s^2
Now if we have a good value of s, we don't need c to appear anywhere in our rotations.
what are some valid values? well s should vary between -1 and 1.
We can see that the coordinate transform is just giving us a linear combination of x and y. The scalar coefficients might as well be c and s.
Let u = (1-s^2)x - (s^2)y . v= (s^2)x+(1-s^2)y.
As it is, this will only cover one quadrant. But if you flip the sign of the first term in both u and v, you get the corresponding quadrant across the y-axis.
Flipping the sign on the second term in each will put us below the x-axis. By the two combinations of two possible sign changes we get 4 possible quadrants. Great.
Now just keep s between 1 and -1. Substitute u for x and v for y.
if it's easier, just rewrite your original expression as a level curve.
let y=f(x)=x^2.
Now let g(x,y)=x^2-y.
you can graph this by entering 0=g(x,y) in most software.
If so then 0=g(u,v) will rotate the figure smoothly as s varies. again, just flip the signs to cover the other quadrants.
[edit]
I should add that the constraint on s isn't arbitrary.
if |s| > 1 then the rotation is no longer rigid...that is, the shape is not preserved without deformation.
As you can probably guess from the graph of y=sin(x), this is going to cover all possible rotations before you run out of s values.
If you only let s vary from 0 to 1 then stitching together all the various sign permutations should cover the entire range of angles.
[clarification]
To get a mathematically positive rotation, let s vary from 1 to 0, 0 to 1, 1 to 0, then finally 0 to 1, bringing you back to y=f(x).
Just switch to the next quadrant when s reaches either 0 or 1.
Tip: If your using desmos if you wanted it based on degree angles set x degree = x*pi/180 when in radian mode on the trig functions.
What a profound and clear explanation! Thank you!
If we use a slide to move the "diagonal sine" diagonally, wouldn't that make it look like a moving escalator?
20 years ago I was a high school student. And I ask exactly same question to my math teacher, but he even didn't understand the question. And after 20 years now finally I get an answer to this. Thanks a lot!
This is amazing, beautiful and such a perfect explanation!!
🙌 you have my praise from all the math holic kids and myself for creating this video
This isn’t quite what I needed, I was making a graph engine that you can zoom in and out of, and you can scroll around in, in scratch to break its limits, you can just set any sprite to a custom x and y and set a custom zoom variable and it will work perfectly. Essentially adding a camera to scratch and making it act like sprite borders don’t exist. I was hoping to be able to use this to have the camera basically rotate at a point. Making it the ultimate coordinate scratch engine, with all the capabilities of a normal 2d engine.
I've been fighting with this for about 30 years ... thank you!
Oh my god, this is amazing, i'm almost a decade after my education, but this made me want to study maths again and i'm not even joking.
Did you not learn linear algebra? This is just a rotation matrix. I did that in high school.
this has the same vibe as being lost at walmart and not being able to find your parents.
I think what you derived is the inverse of what we want, transforming P’ to P.. since we get points that follow x’=(y’)^2 _after_ (rather than before) rotation. We should instead have solved for x,y in terms of x’,y’, substituting these expressions in the original equation y=x^2
Makes sense as the graphs are later shown rotating in the negative direction. If we want to rotate by +theta, we could just negate all the thetas in the expression
Nice video, in any case
I didn’t know quasimoto made math videos on yt
This video was what I was searching for weeks ago before I came up with my own way.
Wow!! Thanks for a great video. Love your voice !!!
I found an easy way to put it into Desmos, have different equations: defining the original function before rotation (“f(x)=…”), defining a variable (“b=…”) and the function after rotation. And preferably, put it on “degree” mode. For the parabola at a 45º angle, it would be:
f(x)=x^2
b=45
x*sin(b)+y*cos(b) = f(x*cos(b) - y*sin(b))
Change variable “b” to however many degrees rotated you want and change the “f(x)=…” equation to whatever you need to change it to and the rotated equation will update with it. Setting it up like this will also make it so u only have to update less things whenever you want to make a change
Nice, now I can rotate x²+y²=R² graphic
it's like i ask myself a question and somehow a couple weeks later someone delivers. this has happened four times in a row now
Thank you! I have been asking myself how to do this since Year 8!! Thank you for a great explanation of it and with cool looking functions too (what is MOB??) Looking forward to amazing my students and your part 2 video! Looks very interesting and fun
couldnt find anything about MOB
finally, I can spin x^2 + y^2 = 1 after I'm struggling for years
This is a nice intuiative demo, great work
I loved discovering this in desmos when i was in high school. It was such a ureka moment for me. Now my favorite method is turning everything into a vector, then you don't even need the trig. it really helps simplify the equations, and it helps me intuit dot = cos and cross = sin
Can you elaborate on the vector method? I also did this in hs but have never thought of that
Desmos has another feature which is very handy for working with parametric functions. You can define P(t) = (f(t), g(t)) and then do P(t) in another cell and Desmos will draw points meeting that definition over the supplied range of t.
You’re voice sounds so cool!
Crazy crazy crazy how I was JUST looking at my old writeup of this proof seconds before finding this video. Didn't say anything or look up anything even remotely related to this. Just looked at a physical paper in my notebook with this proof on it, then this video is reccomended to me. That's absolutely nuts.
"MOB, I don't even know what MOB means"
Interesting video. What I really liked was in the beginning, with then chalkboard background how you had the x and y coordinates in the lower part of then board changing as the parabolas etc on the actual graph changed. But when you moved on to the Trigonometric functions they just stayed the same on the bottom as the drawing rotated would be great if that could be made visual too
Rotating the plane 90 degrees clockwise almost replaces the x axis with the y axis and the x axis with the y axis, but the x values on the new y axis would be running positively down. So it needs to be inverted. Hence, inverse functions and why you change out x and y algebraically. Thanks for the fun video. 2:58
Ah, so I’m not the only one who saw that. And later in the video the graphs are shown rotating in the negative direction. Thanks for the sanity check
I've always wondered how you could rotate a graph, this video answered that question!
my calculus book gave a nice answer to this, you can write the function in polar coordinates which makes it easier to rotate then switch back.
Great job Dexter! You've a new subscriber!
A simple example - rotation by +/-45°:
y' = 2x' with x' = 1/√2 · (x - y) and y' = 1/√2 · (x + y) gives y = x/3.
For example, the point (3, 1) lies on the line y = x/3.
After a +45° counterclockwise rotation, this point will lie on the line y' = 2x'.
Similarly, the line y = x/3 is just the same as the line y' = 2x' rotated by -45°.
It's beautiful
I've looked at it for 5 hours now
I used a circle that ran through both points p and p’. Then found the arc length from x to x’ using the formula “L=pi*theta*r/180”
Then set that length L to the integral for the function of the circle, from the bounds of x’ to x. Then solved for x’. Plugged x’ into the function for the circle, to find y’.
My final results were:
x’=sqrt(x^2+y^2)sin(arctan(x/y)-pi*theta/180)
y’= sqrt(x^2+y^2)cos(arctan(x/y)-pi*theta/180)
Oh my god. Years ago I pondered with a classmate of mine in algebra 2 whether there was a way to rotate a graph like a parabola and they were like “probably not.” I finally have the method.
Thanks, I didn't know this was possible. I've tried before and failed miserably so thank you for giving me the answer that I thought did not exist.
You can change desmos to use degrees btw
Also, for graphs it’s much more efficient (and in my opinion simpler) to represent the graph as a parametric, not to mention it’s actually doable to graph it by hand
I love how well you explain how the rotation matrix works!
This is too good, your videos are not boring at all
"without matrices!"
what you described is exactly the 2d rotation matrix but just formatted differently
lol this reminds me of when i was in year 7 randomly asking my maths teacher if there was a formula for graphing an ellipse. i actually DID learn it a few years later which was pretty cool!
Funnily enough many precalculus courses teach this and will put this on a final. And if not teach the topic it may be somewhere in the back of a text on precalc or in the analytic section with conics. It can go even more in depth such that you need to find a graph that isn’t rotated FROM a rotated graph. The process involves not rotating the graph back but rather rotating axis. Same idea and everything but a more technical term. That’s actually how you derive the equations used in the video. There are even ways to do this without knowing the angle using a fancy equation involving the double angle of cot. An example question I had on mine a while back was something like giving you the equation x^2-y^2=1 and find the right graph rotated 45 deg. I remember that because the test makers didn’t have a right answer choice for it.
I love this video, I really do! So it hurts me to say there's probably a mistake as from 8:50: In the lower left corner shouldn't it say "y ---> X sin(θ) + ycos(θ)"?
You are right
I had this same thought experiment back in high school, I think I googled if it was possible or not and then forgot about it. Now I'm kicking myself for not trying to figure it out because it's so simple. Thank you for this video, my high school self is ecstatic right now (and current self too).
Very simple. Just add cos of the angle to x and sin of the angle to y...
Melting your FPU for science 😂Thanks, that was cool stuff!
I haven't watched the video yet, but I was going to assume a matrix transformation in the xy plane, but now looking at the description It appears I'm wrong. I'm excited to see how you did it!
You were gonna right
Basically
It is a matrix only. Just written out in scalar form after multiplication
As @uncleben7306 noted, it was a bit confusing how the original derivation showed the original point being rotated counterclockwise while the subsequent graphs were rotated clockwise. But in any case, I think this was an outstanding video, and thank you so much for making and sharing it!
Hello there. Would you mind to explain why that is the case? Why it rotates clockwise instead of anticlockwise? I have reread uncleben's comment 7 times, but I struggle understanding their last paragraph?
Thanks
@@whisperingocean. Yeah it's pretty confusing, and I'm not sure if I could explain it any more clearly. Though this might not be a perfect analogy, I'd think of someone parachuting while the wind is blowing to the west. In order to end up at their target location, they'd need to jump to the *east*, so that the wind would eventually take them to the right spot.
I'm sure there's much better explanations than that, and perhaps it'd be worthwhile to google or search UA-cam. In any case, I hope what I said could help at least a little.
This channel must be Matt Parker doing forbidden maths stuff undercover.
ima reiterate the formula, keep it fresh. it's amazing. simple, works, lots of implications.
replace x and y with:
any x's are now: x cos(Θ) - y sin(Θ)
any y's are now: x sin(Θ) + y cos(Θ)
now your function is rotatable.
trust me that is wow.
can extend to more dimensions ...
example: x^2 + y^2 = r^2 (circle equation) (becomes square as n goes inf (and even))
x is now (xcos(Θ)-ysin(Θ))^2
y same but (x(sin(Θ)+ycos(Θ))^2
r let's make 1 (1^n = 1) (unit circle) r=1
graph that works. now increase n (keep it even) and change theta (n applies to x,y,r)
this is amazing
edit: full formula i'm using in desmos = ((x^n)+(y^n))=(r^n).
replace all x and y's with op's formulas (algebraic substitution).
slow mo, x = (xcos(Θ)-ysin(Θ))^n
and similarly y =(x sin(Θ) + y cos(Θ))^n
add those to equal r^n (make it 1 for simplicity, the rest is just scaling)
that's really just x squared plus y squared =1, with.... rotation and squaring (the circle)
... (xcos(Θ)-ysin(Θ))^n+(x sin(Θ) + y cos(Θ))^n=r^n ...
if you don't care about rotation or shape it is simply x^2+y^2=r^2 (a circle with radius r)
shout out to op redbeaniemaths for making this so obvious
@RedBeanieMaths Really fun video. Thank you. However, you have a typo in the bottom left at 8:52 so when I tried to apply it, it didn't work. You've got y --> ysin(theta) + ycos(theta). Took me a while to realise what was wrong. Hope that helps.
The "ShuT uP AnD TeLl thE wOrD it IS" was funny 😂
Superb. I think I will learn to use Desmos to play with graphs like you did. Thanks a lot👌👌
I recommend geogebra instead. It has many more functions allowing you to plot dynamical systems with slopeField, and do dynamic geometry such as constraining points on lines etc.
So cool
Love the video
instructions unclear: my parametric equation is now spinning on 3 axes like a 90's commercial logo
I TURNED IT INTO A CYLINDER WHAT
To do this I write the function in parametric form then I multiply it by a complex number for example rotating y = x^2 by 45 degrees
(t, t^2), (t + it^2) * (cos 45 + i sin 45)
Desmos can't do _i_ in the graphing calculator. So it needs a... less complicated approach.
@@omargoodman2999 yes you are right so you can just do it manually because there are always only 4 multiplications in total.
This reminded me, that in computer graphics, coordinates are represented using matrices and you can compute rotations very easily. If rotation is in angles however, this method is required.
I had to do something similar for my research, but the original origin was located on the circumference of a circle with a center located higher on the y-axis (the center was the new main origin). So imagine x^2 being rotated around this new origin where it would originate from a point on the circumference.
It took me like 10 days to figure it out, but I used two rotation matrices and a translation matrix...
This was freaking beautiful.
Another way to do it in your head is to figure out the equation of the new axis line, so for example if you want to move it 45 degrees you just substitute the new x axis which is not x=0 its x-y=0 and y axis is x+y=0 substitute x and y in any equation to the origin with the equation of the line around which you need to rotate and bingo, it helps if you can remember the cos and sin values in 15 degrees interval for example the x axis at 15 degrees become x= ((root 3 -1)/(root 3+1) )y and y is the inverse of it, substitute in the original equation and you get the graph rotated to around that axis.
This is definitely the best math video i have seen in a while
This great production uses the derived clockwise point rotation equations for the new coordinates as functions of the original coordinates. One must substitute things that are equal to each other. To replace the x and y in the parabola you need expressions for the old coordinates as functions of the new coordinates. They can be obtained by "rearranging" the equations we do have. If done, they turn out to be just the same except that the signs on the two Sin terms are flipped.
Awesome! This helped me answer one of my student's questions. Thanks!
baby's first rotation matrix
I want to now generalize this to higher dimensions
As an Algebra 2 student I am flabbergasted by the ludicrous graphs that were previewed.
You can also multiply a rotation matrice with the vectors of the graph (x,f(x))
I was thinking about and in autumn I gave up, and finally... Thank you!!
My friends and I use this tool to draw on desmos. It's actually super fun! The only problem that arises is that you can't rotate any oval shaped objects as when you do so they begin to distort; they do not remain in their initial shape and tend to expand and contract. Other than that it's super fun to use to make some really interesting pictures.
Wait nvm, I found out how to make it work it turns out we were doing something wrong this whole time. We've used this tool for months now, so it's funny that I found out we copied the wrong equations this whole time.
You deserve so many more subscribers
I’ve been doing a deseos project to draw a selfie for school and I’ve been wondering, why can’t you rotate the graph any number of degrees. My god, this is just beautiful