Another great application of this is in proving the angle sum identities. For angles alpha and beta with respective rotation matrices A(alpha) and A(beta), we know that multiplication by A(alpha)*A(beta) must be identical to multiplication by A(alpha+beta). So after multiplying out A(alpha)*A(beta), the angle sum identities for both sine and cosine just fall right out.
You sir are a lifesaver and have deserved a subscription! I'm currently in Linear Algebra and Matrix Theory, and have been struggling with this concept. Your video was just the information I needed and you seemed very enthusiastic to present it. Keep up the great work 👍
You my good sir saved me so much trouble. I was writing a raycasting algorithm and was struggling at rotating the vectors. This video provided a crystal clear explanation on rotation matrices. Thanks so much!
Super awesome explanation. Thank God for RUclips preserving live knowledge for posterity. This is a living library the university of the universal swarm mind.
Just wanted to let you know that you are an awesome teacher. Whenever I want to clear up a mathematical topic I encounter during my studies, I watch your videos.
The rotation matrix is so cool! I like how you can apply it to itself to get _another_ rotation of θ, which is just a total rotation of 2θ, and the matrix multiplication will lead automatically to cos 2θ = cos^2 (θ) - sin^2 θ and sin 2θ = 2sinθcosθ. Also, I don't remember ever learning that differentiation and determinant rule to check the columns; that was awesome!
i like the fact that there are two different ways of inverting the rotation matrix: first by the "pepper grinder", a matrix (a,b,c,d) has the inverse (d,-b,-c,a)/(ac-bd), and ac-bd in this case = 1, and the result just negates all sin(θ). the other solution is the "geometric" truth that you can just plug in the opposite value, since applying rotations is additive to the input, but sin(-θ) = -sin(θ)
Thank you, I thought I knew matrix multiplication (turns out I forgot) and was frustrated by how the 3 dimensional rotation ones just don't add up for me, now I understood that something was wrong with it and looked it up, now they make more sense to me (as I got matrices of 3 x 3 as coordinates of a point living in a 3 dimensional space, and those coordinates definitely aren't a 3 x 3 matrix).
Why the hell nobody actually explains this? Every time it goes like this: here is the rotation matrix. Sinus, cosine simple. Next slide. And I was always confused. Sin what!? Why even cosine in the first place? Why there is a minus sin? Why the heck (I would like to use more explicit language) can't somebody explain it like this guy above. Thank sgod for this man!
I literally studied it today and this matrix was already given but what we did was to inverse it. We see that A(x) = A^-1(-x) with x positive. This relation is another way to see how is this matrix related to rotation
I needed to fresh up, but this video is perfect. The explanation is crystal clear. I subscribe to your channel and added also alike. Keep up the good work and thanks for the video!!
We memorized this matrix so. Since the order of studying trigonometric functions is sine, cosine, etc., the second line contains the “absolute order”, i.e. "Plus sine plus cosine". Accordingly, in the first line - “absolute disorder”: “plus cosine minus sine”.
Very good video but when I check on Geogebra or Desmos, they both plot exactly the opposite of what is expected, a rotation in the other direction. Do you have an explanation?
You are not hallucinating, the plots of 'clockwise' are correct. In short, think of how shifting 'b units up from y' gives a new y-coord of y + b But shifting y = f(x) up by b units requires 'y - b' or y - b = f(x) Essentially the question you should be asking is 'how can i return back to my normal (x,y) coordinates or x,y, axes from my new (X',Y') which requires an 'inverse operation' inverse of anti-clockwise is clockwise. ------------------------------------------------------------------------------------------------------- Longer explanation: If you think about the fixed coordinate of (X', Y') compared to (x, y) then using the rotation matrix would work But substituting these values back into an equation, say that equation of the ellipse will not give you the anti-clockwise rotation of said graph. To explain the reason for that, I will go back to basics with transformations relating to just horizontal translations. If we take an arbitrary point (x,y) and move it to the right a units to the point (X', Y'), this new point will be (x + a, y) But does this mean the graph f(x) shifted to the right 8 units is f(x + a) = (x+a)^2. The answer to that is no, because essentially our point of view has changed, we want to input X' = x+a to map back to x Rearranging X' = x + a gets you x = X' - a so we should actually be considering f(X' - a) or using x as the variable again f(x - a) when shifting to the right a units,. We can consider a similar argument for horizontal translations to the left, vertical translations both up and down, dilations in both directions or a combination of any of these sorts of transformations. We always have to think of the 'opposite' operation when thinking about transforming graphs (or equations). So if we come back to rotations = A where A is the rotation matrix Similar to the translations example, we actually want to go back to Rearranging gets you A^-1 = = A^-1 where A^-1 is a clockwise rotation [this can be verified by actually taking the inverse] ^This shows why when plotting on geogebra (without the extra manipulation of taking inverses), it rotates it clockwise.
you can apply any matrix to another matrix, since a matrix is just a list of its columns (or a list of rows, both views are necessary), so you apply each column of the right matrix to the left matrix to produce new columns in the result
I actually came up with the differentiation trick as I was watching the video (but before you mentioned it)!! That was so creepy for me when you mentioned it, as if you heard my question xD
Hi Dr peyam i tried this rotational matrix to many curves in desmos and it rotates it clockwise not counter clockwise and i tried a different approach to rotate a point in a graph and it give me the same result, can you please give me an explanation
actually, you're not wrong. If we consider that same ellipse in the video (x^2)/2 + y^2 = 1 And we consider the transformation = {{cos(pi/4), - sin(pi/4)}, {sin(pi/4), cos(pi/4)}} The new point (X', Y') does indeed simplify to But if we just substitute this into x = X' and y = Y' We get that same equation: (((x-y)/sqrt(2))^2)/2 + ((x+y)/sqrt(2))^2 = 1 However, if we think about this equation for a second, an arbitrary point in this equation is (x,y), not (X', Y') So in other words, we have to now think of the transformation going from (X', Y') back to (x,y) instead, which is clockwise. That is why subbing it straight in actually gives you a clockwise rotation of the graph. This is basically analogous to how f(x+a) is shifting to the left a units, not left. = + The new point to the right a units of (x,y) is (x+a, y) but this does not mean f(x+a) is a shift to the right, because we need to think about 'how we can return back to f(x), or our original (x,y)) so = - = or f(X' - a) changing the dummy variable back to x f(x-a)
so if I understand, here we want rotate a vector counterclockwise keeping the reference system fixed and so I have to use matrix in the video. But if I want keeping the vector fixed and rotate the reference system I have to use the inverse matrix of the matrix showed at the end because it's like to take the vector rotated in the new system and rotate it back clockwise. Is for this reason that there is confusion about where to put the - sign in the sen() of the matrix, it depends on what I want to rotate: the reference system or the vector. Am I right?
yes. It depends on whether you just want to find the new coordinates (X', Y') or whether you want to find the equation of said rotation. The latter requires 'rotating back clockwise' I will copy and paste an explanation I provided to another comment If you think about the fixed coordinate of (X', Y') compared to (x, y) then using the rotation matrix would work But substituting these values back into an equation, say that equation of the ellipse will not give you the anti-clockwise rotation of said graph. To explain the reason for that, I will go back to basics with transformations relating to just horizontal translations. If we take an arbitrary point (x,y) and move it to the right a units to the point (X', Y'), this new point will be (x + a, y) But does this mean the graph f(x) shifted to the right 8 units is f(x + a) = (x+a)^2. The answer to that is no, because essentially our point of view has changed, we want to input X' = x+a to map back to x Rearranging X' = x + a gets you x = X' - a so we should actually be considering f(X' - a) or using x as the variable again f(x - a) when shifting to the right a units,. We can consider a similar argument for horizontal translations to the left, vertical translations both up and down, dilations in both directions or a combination of any of these sorts of transformations. We always have to think of the 'opposite' operation when thinking about transforming graphs (or equations). So if we come back to rotations = A where A is the rotation matrix Similar to the translations example, we actually want to go back to Rearranging gets you A^-1 = = A^-1 where A^-1 is a clockwise rotation ^This shows why when plotting on geogebra, it rotates it clockwise.
Hey peyam! I'm an Indian student aging sixteen and was looking at your proof of euler's reflection formula in which you use some uncanny complex analysis of which I'm incognizant of. So could you suggest some book for complex analysis covering the proof of the aforementioned? Btw I love your videos and how joyously and charismatically you present yourself and the problem. Always keep making them sir. I'm totally indebted to you. Thank you and love you sir!
Question: Would rotation matrix help me lock in an object axis, regardless of object orientation. If so how? What maths do I do? For context: I am trying to lock in my x,y,z axis of phone regardless of wether my phone orientation is portrait (vertical) or landscape (horizontal). If I shake my phone vertically. I want y axis to spike regardless of phone orientation. Currently, y axis spikes when my phone is in vertical orientation. In horizontal orientation the x axis spikes, and this is because my phone axis moves with phone orientation. Therefore, I was wondering if rotation matrix would help me lock in axis. FYI, I am using gyroscope sensor to measure angular rotation of my phone.
@@drpeyam sorry for the dumb question but what is Ax? For more context I'm not a Mathematician or Physicist. I just need help with this problem to complete a personal project. The gyroscope sensor axis x and y axis swaps every time my phone orientation rotates from portrait mode and I'm trying my best to lock them in.
Hello Dr. Peyam, may I ask a question about the rotation matrix in 3 dimensions? Q: if I want to rotate a vector along the X-axis, and the rotation angle is 180 degrees (2 pi), the 3D rotation matrix I got is :[1,0,0;0,1,0;0,0,1] which is a basic matrix.....Could you please tell me how to represent the rotation matrix when rotating 180 degrees along only an axis? Thank you! really appreciate your help.
It's easy to see why T([1,0]) is [cos(t),sin(t)]. Could you also think of rotating [0,1] as rotating [1,0] by 90° and then t°? So it would look like T([0,1])= [cos(90+t), sin(90+t)] =[cos(90-(-t)), sin(90-(-t))] =[sin(-t), cos(-t)] =[-sin(t), cos(t)].
Quality material always, I love this channel!!! Would like to see this rotation in 3d space about different coordinate axes. If this 2x2 rotation matrix rotates about the z axes i'm sure it would an easy matrix to cook up. But now i thinking rotations in 3d need to rotate about some 4-d axis perpendicular to the other three?! Maybe thats why quaternions are the natural system to do 3-d rotations.
I did try to plot in Desmos and GeoGebra the sample (ellipse x^2/2+y^2=1 with a rotation of PI/4) but it seems to be a clockwise rotation instead of a counterclockwise, same occurs with other things that I have tried like the parabola y = x^2 with a theta of PI/2. Am I misunderstanding something?
@@patrickdaniel2363 You are correct. It actually rotates it clockwise. If you think about the fixed coordinate of (X', Y') compared to (x, y) then using the rotation matrix would work But substituting these values back into an equation, say that equation of the ellipse will not give you the anti-clockwise rotation of said graph. To explain the reason for that, I will go back to basics with transformations relating to just horizontal translations. If we take an arbitrary point (x,y) and move it to the right a units to the point (X', Y'), this new point will be (x + a, y) But does this mean the graph f(x) shifted to the right 8 units is f(x + a) = (x+a)^2. The answer to that is no, because essentially our point of view has changed, we want to input X' = x+a to map back to x Rearranging X' = x + a gets you x = X' - a so we should actually be considering f(X' - a) or using x as the variable again f(x - a) when shifting to the right a units,. We can consider a similar argument for horizontal translations to the left, vertical translations both up and down, dilations in both directions or a combination of any of these sorts of transformations. We always have to think of the 'opposite' operation when thinking about transforming graphs (or equations). So if we come back to rotations = A where A is the rotation matrix Similar to the translations example, we actually want to go back to Rearranging gets you A^-1 = = A^-1 where A^-1 is a clockwise rotation ^This shows why when plotting on geogebra, it rotates it clockwise (if no extra manipulation is done, because we never found out how to 'go back to the original axes/point). Just subbing in = A straight off directly in your equations is equivalent to saying The 'new' point = A^-1 where (X', Y') is the old point But this is clockwise.... which is why your new points are going clockwise
im still confused. why did we concatenate [ cos(theta) sin(theta )] with [-sin(theta) cos(theta) ]? i understood how to get from both starting vectors, [1,0] and [0, 1] to their own rotated vectors, but what is the connection between those two?
Hello. I have a question. If I put the equation with x and y in Desmos I get the ellipse rotated 45 degrees clockwise. I expected to get the ellipse rotated counterclockwise. What Is wrong? Thank you and congratulations for amazing videos
How about rotations in 3 dimensions leading to 4 dimensional rotations ultimately describing the quaternions and "The Hypercube of Monkeys"? The later being made by Drs' Vi Hart and Henry Segerman et al. The rotation matrixes leading one to the Quaternions of which 3B1B has created the best several videos on I have come across. Rotations and symmetry and the group of order 8! Awesome work Dr. Peyam.
i want to ask question.. why is that if i have coordinate x=60, y=30 why is that the formula does not work? it seems this formula is only valid if x=1 and y=0 (the initial position) i need to use pythogoras theorem to solve it using nextX=radius*cos(theta)+circle.center.x //radius=10 so center(50,30) nextY=radius*sin(theta)+circle.center.y //radius=10 so center(50,30) why does .... nextX=(60*cos(theta))-(30*sin(theta)) nextY=(60*sin(theta))+(30*cos(theta)) does not work? nobody had ever explain this on the internet please help :(
Here’s a fun application I just came across: A Lorentz transformation can be viewed as a rotation in Minkowski space 😊. That’s actually why I came here: I wanted to see where the rotation matrix comes from, because they’re one and the same thing 😊. Thank you for your pictures. They really were worth a thousand words 🙏🏽🎊🙌🏽🤓 Edit: in special relativity, technically the frame of reference is rotated, not the point. But it’s all relative motion, so your thinking still works with theta -> -1*theta ☺️
Sir this formula works for theta being nevative as well right?that formula on thumbnail,isnt it we just plug in negative value into that for clockwise right?
@@drpeyam haha Yes I see today I was taught about this .I had watched 3blb essence of linear algebra series and tried to relate everything but messed up with this formula for counterclockwise...I found I had done some mistkes in calculations while trying to make sense lol now its ok..
@@drpeyam and thank you so much ..the one and only math youtuber who replies to the viewers taking their questions seriously...I will be asking you more and thanks for your videos I will definately share them with my friends, they are really intuitive😊
Hey Dr. Peyam, it is correct to say that what you are rotating is the coordinate plane where the point lives? Because it seems like you are rotating the local coordinate arrows, or I'm wrong?
@@akivas2034 Yes but the x coordinate isn't. You're literally going backwards from the origin, and by definition that results in a negative coordinate. Remember, rotations preserve only the lengths, not the coordinates themselves.
A pic is worth 1000 words, just like the thumbnail!
Awwwwww ❤️
Two legends in One Comment ❤
You are a Maths Angel that has come to earth to teach us poor Maths disciples...Love your lectures- A massive heartfelt THANK YOU
i cant put in words how much this has helped me, thank you
Happy to hear that!
Such a simple concept, couldn't find a legit explanation anywhere! thank you!
Dr. Peyam is a miracle worker! The differentiation trick is so useful!!!!
Another great application of this is in proving the angle sum identities. For angles alpha and beta with respective rotation matrices A(alpha) and A(beta), we know that multiplication by A(alpha)*A(beta) must be identical to multiplication by A(alpha+beta). So after multiplying out A(alpha)*A(beta), the angle sum identities for both sine and cosine just fall right out.
Beautiful!
Loved your video ... thank you very much for the visualisation
You sir are a lifesaver and have deserved a subscription! I'm currently in Linear Algebra and Matrix Theory, and have been struggling with this concept. Your video was just the information I needed and you seemed very enthusiastic to present it. Keep up the great work 👍
Thank you so much for this simple and clear explanation. Please, never stop what you are doing, your videos are life changing.
I looked through so many videos and this is a godsend! THANKS A LOT!!
You my good sir saved me so much trouble. I was writing a raycasting algorithm and was struggling at rotating the vectors. This video provided a crystal clear explanation on rotation matrices. Thanks so much!
Thanks a lot! I'm fronted developer and your information helped me!)
Super awesome explanation. Thank God for RUclips preserving live knowledge for posterity. This is a living library the university of the universal swarm mind.
Just wanted to let you know that you are an awesome teacher. Whenever I want to clear up a mathematical topic I encounter during my studies, I watch your videos.
Thanks so much!!!
The rotation matrix is so cool! I like how you can apply it to itself to get _another_ rotation of θ, which is just a total rotation of 2θ, and the matrix multiplication will lead automatically to cos 2θ = cos^2 (θ) - sin^2 θ and sin 2θ = 2sinθcosθ. Also, I don't remember ever learning that differentiation and determinant rule to check the columns; that was awesome!
Oh wow that’s neat!
He'll I am india I watch your video first time and it is very helpful for me
Fantastic video! I finally understood it now after circling through other videos for some time
Thank you Dr peyam,I really needed this.
i like the fact that there are two different ways of inverting the rotation matrix: first by the "pepper grinder", a matrix (a,b,c,d) has the inverse (d,-b,-c,a)/(ac-bd), and ac-bd in this case = 1, and the result just negates all sin(θ). the other solution is the "geometric" truth that you can just plug in the opposite value, since applying rotations is additive to the input, but sin(-θ) = -sin(θ)
Thanks, this helped me to study for my test
Hey, thanks for doing the rotation matrices.
Also that thumbnail --> pure gold 😁
Thank you, I thought I knew matrix multiplication (turns out I forgot) and was frustrated by how the 3 dimensional rotation ones just don't add up for me, now I understood that something was wrong with it and looked it up, now they make more sense to me (as I got matrices of 3 x 3 as coordinates of a point living in a 3 dimensional space, and those coordinates definitely aren't a 3 x 3 matrix).
Why the hell nobody actually explains this? Every time it goes like this: here is the rotation matrix. Sinus, cosine simple. Next slide. And I was always confused. Sin what!? Why even cosine in the first place? Why there is a minus sin? Why the heck (I would like to use more explicit language) can't somebody explain it like this guy above. Thank sgod for this man!
Thank youuuu
best explanation video ever. thanks a lot.
These other math benches could never explain it like you ❤
Why don't our university professors teach like you? 😢
I am blessed to have this channel.
Thanks so much!!!
Omg this is so simple
I cried
Finally I understand this concept 🙂... Thankuu so much sir 🙏💕
You’re a great man sir
Best explaination for rotation
Very clear explanation, thanks!
You’re welcome!!
What value is good for robotic matrix
I literally studied it today and this matrix was already given but what we did was to inverse it. We see that A(x) = A^-1(-x) with x positive. This relation is another way to see how is this matrix related to rotation
Such a great video, thank you!
I needed to fresh up, but this video is perfect. The explanation is crystal clear. I subscribe to your channel and added also alike. Keep up the good work and thanks for the video!!
Thank you!
beautiful job! congrats!
yea this does it for my question .perfection.
شكرا وبارك الله فيك
We memorized this matrix so.
Since the order of studying trigonometric functions is sine, cosine, etc., the second line contains the “absolute order”, i.e. "Plus sine plus cosine". Accordingly, in the first line - “absolute disorder”: “plus cosine minus sine”.
Very helpful, thanks!
thank you.
Thanks. Easy understandably. Do you have about 3d rotation metrics? Can you give a link?
Haven’t really done a video on it, but it’s the same idea. The matrix will be of the same form, except with the fixed axis having zeros and ones
Very good video but when I check on Geogebra or Desmos, they both plot exactly the opposite of what is expected, a rotation in the other direction. Do you have an explanation?
Believe in the math not in geogebra
You are not hallucinating, the plots of 'clockwise' are correct. In short, think of how shifting 'b units up from y' gives a new y-coord of y + b
But shifting y = f(x) up by b units requires 'y - b' or y - b = f(x)
Essentially the question you should be asking is 'how can i return back to my normal (x,y) coordinates or x,y, axes from my new (X',Y') which requires an 'inverse operation'
inverse of anti-clockwise is clockwise.
-------------------------------------------------------------------------------------------------------
Longer explanation:
If you think about the fixed coordinate of (X', Y') compared to (x, y) then using the rotation matrix would work
But substituting these values back into an equation, say that equation of the ellipse will not give you the anti-clockwise rotation of said graph.
To explain the reason for that, I will go back to basics with transformations relating to just horizontal translations.
If we take an arbitrary point (x,y) and move it to the right a units to the point (X', Y'), this new point will be (x + a, y)
But does this mean the graph f(x) shifted to the right 8 units is f(x + a) = (x+a)^2.
The answer to that is no, because essentially our point of view has changed, we want to input X' = x+a to map back to x
Rearranging X' = x + a gets you x = X' - a
so we should actually be considering f(X' - a) or using x as the variable again f(x - a) when shifting to the right a units,.
We can consider a similar argument for horizontal translations to the left, vertical translations both up and down, dilations in both directions or a combination of any of these sorts of transformations. We always have to think of the 'opposite' operation when thinking about transforming graphs (or equations).
So if we come back to rotations
= A where A is the rotation matrix
Similar to the translations example, we actually want to go back to
Rearranging gets you A^-1 =
= A^-1 where A^-1 is a clockwise rotation [this can be verified by actually taking the inverse]
^This shows why when plotting on geogebra (without the extra manipulation of taking inverses), it rotates it clockwise.
I loved this thumbnail
Thank you very much!!! i got it now
Thank you so much for the explanation!
Thank you very much..loved the visualisation.
Thank you so much! 고마워요! 왜 -sin𝜽 인지 몰랐는데 이해했어요!
watch my school prof's video and get totally lost but get super clear after watching this!
this is gold. excelent video
This was very helpful, thank you!
Well explained.
Why T = [1,0] ????
it's possible to apply the transformation on a matrix?
Sure! It’s then just the matrix followed by a rotation!
you can apply any matrix to another matrix, since a matrix is just a list of its columns (or a list of rows, both views are necessary), so you apply each column of the right matrix to the left matrix to produce new columns in the result
Great explanation!! Thank you!
Very basic but Wonderful
I actually came up with the differentiation trick as I was watching the video (but before you mentioned it)!! That was so creepy for me when you mentioned it, as if you heard my question xD
Hi Dr peyam i tried this rotational matrix to many curves in desmos and it rotates it clockwise not counter clockwise and i tried a different approach to rotate a point in a graph and it give me the same result, can you please give me an explanation
Desmos must be incorrect
actually, you're not wrong.
If we consider that same ellipse in the video
(x^2)/2 + y^2 = 1
And we consider the transformation
= {{cos(pi/4), - sin(pi/4)}, {sin(pi/4), cos(pi/4)}}
The new point (X', Y') does indeed simplify to
But if we just substitute this into x = X' and y = Y'
We get that same equation:
(((x-y)/sqrt(2))^2)/2 + ((x+y)/sqrt(2))^2 = 1
However, if we think about this equation for a second, an arbitrary point in this equation is (x,y), not (X', Y')
So in other words, we have to now think of the transformation going from (X', Y') back to (x,y) instead, which is clockwise.
That is why subbing it straight in actually gives you a clockwise rotation of the graph.
This is basically analogous to how
f(x+a) is shifting to the left a units, not left.
= +
The new point to the right a units of (x,y) is (x+a, y)
but this does not mean f(x+a) is a shift to the right, because we need to think about 'how we can return back to f(x), or our original (x,y))
so = - =
or f(X' - a)
changing the dummy variable back to x
f(x-a)
so if I understand, here we want rotate a vector counterclockwise keeping the reference system fixed and so I have to use matrix in the video. But if I want keeping the vector fixed and rotate the reference system I have to use the inverse matrix of the matrix showed at the end because it's like to take the vector rotated in the new system and rotate it back clockwise. Is for this reason that there is confusion about where to put the - sign in the sen() of the matrix, it depends on what I want to rotate: the reference system or the vector. Am I right?
yes. It depends on whether you just want to find the new coordinates (X', Y') or whether you want to find the equation of said rotation. The latter requires 'rotating back clockwise'
I will copy and paste an explanation I provided to another comment
If you think about the fixed coordinate of (X', Y') compared to (x, y) then using the rotation matrix would work
But substituting these values back into an equation, say that equation of the ellipse will not give you the anti-clockwise rotation of said graph.
To explain the reason for that, I will go back to basics with transformations relating to just horizontal translations.
If we take an arbitrary point (x,y) and move it to the right a units to the point (X', Y'), this new point will be (x + a, y)
But does this mean the graph f(x) shifted to the right 8 units is f(x + a) = (x+a)^2.
The answer to that is no, because essentially our point of view has changed, we want to input X' = x+a to map back to x
Rearranging X' = x + a gets you x = X' - a
so we should actually be considering f(X' - a) or using x as the variable again f(x - a) when shifting to the right a units,.
We can consider a similar argument for horizontal translations to the left, vertical translations both up and down, dilations in both directions or a combination of any of these sorts of transformations. We always have to think of the 'opposite' operation when thinking about transforming graphs (or equations).
So if we come back to rotations
= A where A is the rotation matrix
Similar to the translations example, we actually want to go back to
Rearranging gets you A^-1 =
= A^-1 where A^-1 is a clockwise rotation
^This shows why when plotting on geogebra, it rotates it clockwise.
Hey peyam!
I'm an Indian student aging sixteen and was looking at your proof of euler's reflection formula in which you use some uncanny complex analysis of which I'm incognizant of.
So could you suggest some book for complex analysis covering the proof of the aforementioned?
Btw I love your videos and how joyously and charismatically you present yourself and the problem. Always keep making them sir. I'm totally indebted to you.
Thank you and love you sir!
Brown and Churchill Complex Variables and Applications
@@drpeyam Thank you!!!😊😊
Dude you are a legend
Thank you
Question: Would rotation matrix help me lock in an object axis, regardless of object orientation. If so how? What maths do I do?
For context: I am trying to lock in my x,y,z axis of phone regardless of wether my phone orientation is portrait (vertical) or landscape (horizontal). If I shake my phone vertically. I want y axis to spike regardless of phone orientation. Currently, y axis spikes when my phone is in vertical orientation. In horizontal orientation the x axis spikes, and this is because my phone axis moves with phone orientation. Therefore, I was wondering if rotation matrix would help me lock in axis. FYI, I am using gyroscope sensor to measure angular rotation of my phone.
Isn’t that obtained by solving Ax = x since the axis doesn’t change when rotated?
@@drpeyam sorry for the dumb question but what is Ax?
For more context I'm not a Mathematician or Physicist. I just need help with this problem to complete a personal project. The gyroscope sensor axis x and y axis swaps every time my phone orientation rotates from portrait mode and I'm trying my best to lock them in.
I did this today. Nice to see that I was right.
Now I am trying to do reflection; funny how everything is related.
beyond fantastic
As someone who enjoys computer graphics I always come back to keep basic concepts fresh.
Hello Dr. Peyam, may I ask a question about the rotation matrix in 3 dimensions? Q: if I want to rotate a vector along the X-axis, and the rotation angle is 180 degrees (2 pi), the 3D rotation matrix I got is :[1,0,0;0,1,0;0,0,1] which is a basic matrix.....Could you please tell me how to represent the rotation matrix when rotating 180 degrees along only an axis? Thank you! really appreciate your help.
thanks Dr peyam
It's easy to see why T([1,0]) is [cos(t),sin(t)]. Could you also think of rotating [0,1] as rotating [1,0] by 90° and then t°? So it would look like
T([0,1])= [cos(90+t), sin(90+t)]
=[cos(90-(-t)), sin(90-(-t))]
=[sin(-t), cos(-t)]
=[-sin(t), cos(t)].
Yeah
Thanks a lot! Great video
Thank you. Can you upload a video in the 3D case?
Quality material always, I love this channel!!!
Would like to see this rotation in 3d space about different coordinate axes.
If this 2x2 rotation matrix rotates about the z axes i'm sure it would an easy matrix to cook up.
But now i thinking rotations in 3d need to rotate about some 4-d axis perpendicular to the other three?!
Maybe thats why quaternions are the natural system to do 3-d rotations.
Yeah! I think there’s a neat 3b1b video on that!
I did try to plot in Desmos and GeoGebra the sample (ellipse x^2/2+y^2=1 with a rotation of PI/4) but it seems to be a clockwise rotation instead of a counterclockwise, same occurs with other things that I have tried like the parabola y = x^2 with a theta of PI/2. Am I misunderstanding something?
Should be counterclockwise
@@drpeyam I used the same equation that is in the video but the software is showing a clockwise rotation. Can you try it and see what I'm saying?
Same here i dont know why it is clockwise not counter clockwise
@@patrickdaniel2363
You are correct. It actually rotates it clockwise.
If you think about the fixed coordinate of (X', Y') compared to (x, y) then using the rotation matrix would work
But substituting these values back into an equation, say that equation of the ellipse will not give you the anti-clockwise rotation of said graph.
To explain the reason for that, I will go back to basics with transformations relating to just horizontal translations.
If we take an arbitrary point (x,y) and move it to the right a units to the point (X', Y'), this new point will be (x + a, y)
But does this mean the graph f(x) shifted to the right 8 units is f(x + a) = (x+a)^2.
The answer to that is no, because essentially our point of view has changed, we want to input X' = x+a to map back to x
Rearranging X' = x + a gets you x = X' - a
so we should actually be considering f(X' - a) or using x as the variable again f(x - a) when shifting to the right a units,.
We can consider a similar argument for horizontal translations to the left, vertical translations both up and down, dilations in both directions or a combination of any of these sorts of transformations. We always have to think of the 'opposite' operation when thinking about transforming graphs (or equations).
So if we come back to rotations
= A where A is the rotation matrix
Similar to the translations example, we actually want to go back to
Rearranging gets you A^-1 =
= A^-1 where A^-1 is a clockwise rotation
^This shows why when plotting on geogebra, it rotates it clockwise (if no extra manipulation is done, because we never found out how to 'go back to the original axes/point).
Just subbing in = A straight off directly in your equations is equivalent to saying
The 'new' point = A^-1 where (X', Y') is the old point
But this is clockwise.... which is why your new points are going clockwise
im still confused. why did we concatenate [ cos(theta) sin(theta )] with [-sin(theta) cos(theta) ]? i understood how to get from both starting vectors, [1,0] and [0, 1] to their own rotated vectors, but what is the connection between those two?
Why is it, that when you find a transformation matrix , you check what happens with (1,0) and (0,1) and just plug them into the matrix?
That’s literally the definition of the matrix of a linear transformation, it’s how it’s defined
@@drpeyam Thx !
Hello. I have a question. If I put the equation with x and y in Desmos I get the ellipse rotated 45 degrees clockwise. I expected to get the ellipse rotated counterclockwise. What Is wrong? Thank you and congratulations for amazing videos
How about rotations in 3 dimensions leading to 4 dimensional rotations ultimately describing the quaternions and "The Hypercube of Monkeys"? The later being made by Drs' Vi Hart and Henry Segerman et al. The rotation matrixes leading one to the Quaternions of which 3B1B has created the best several videos on I have come across. Rotations and symmetry and the group of order 8! Awesome work Dr. Peyam.
i want to ask question..
why is that if i have coordinate x=60, y=30
why is that the formula does not work?
it seems this formula is only valid if x=1 and y=0 (the initial position)
i need to use pythogoras theorem to solve it using
nextX=radius*cos(theta)+circle.center.x //radius=10 so center(50,30)
nextY=radius*sin(theta)+circle.center.y //radius=10 so center(50,30)
why does ....
nextX=(60*cos(theta))-(30*sin(theta))
nextY=(60*sin(theta))+(30*cos(theta))
does not work?
nobody had ever explain this on the internet please help :(
What if my starting point is not (1,0) for x ? Is the starting point fixed to be 1,0 ?
Here’s a fun application I just came across: A Lorentz transformation can be viewed as a rotation in Minkowski space 😊. That’s actually why I came here: I wanted to see where the rotation matrix comes from, because they’re one and the same thing 😊. Thank you for your pictures. They really were worth a thousand words 🙏🏽🎊🙌🏽🤓
Edit: in special relativity, technically the frame of reference is rotated, not the point. But it’s all relative motion, so your thinking still works with theta -> -1*theta ☺️
Sir this formula works for theta being nevative as well right?that formula on thumbnail,isnt it we just plug in negative value into that for clockwise right?
Yes haha, you’re overthinking the thumbnail. Also the thumbnail is counterclockwise rotation
@@drpeyam haha Yes I see today I was taught about this .I had watched 3blb essence of linear algebra series and tried to relate everything but messed up with this formula for counterclockwise...I found I had done some mistkes in calculations while trying to make sense lol now its ok..
@@drpeyam and thank you so much ..the one and only math youtuber who replies to the viewers taking their questions seriously...I will be asking you more and thanks for your videos I will definately share them with my friends, they are really intuitive😊
loooooooooooool love you dr peyam
Excellent 👌
in our eyes view comes upside down so 180 degree flip brains do by matrix rotation, or maybe by using imaginary number :)
is C^2 ever useful? (complex values in matrices instead of real)
Chief Sohcahtoa lives when Dr Peyam mentions his name.
just great, thank you :)
can you do it with out using formula please
Hey
Dr. Peyam, it is correct to say that what you are rotating is the coordinate plane where the point lives?
Because it seems like you are rotating the local coordinate arrows, or I'm wrong?
Really helpful
what if by some chance a person started with the (0,1) coordinate and just swap the order you did in the video to get (-sin cos cos sin)?
great video thx
What about the 3d space ?
appreciate this so much!
Is that Kyle Forgeard? 9:50
Nice video!!! I like the thumbnail haha! Can you make a video about Steinitz exchange lemma? ✌🏼
What’s that?
Steinitz Replacement Theorem in Linear Algebra en.wikipedia.org/wiki/Steinitz_exchange_lemma
☝🏻
Real Analysis, Please 😊.
Why is it -sin(θ)? The triangles are congruent, so length should be preserved
Not length, but coordinate
Михаил Ужов the y coordinate is still positive
@@akivas2034 Yes but the x coordinate isn't. You're literally going backwards from the origin, and by definition that results in a negative coordinate.
Remember, rotations preserve only the lengths, not the coordinates themselves.
Hilbert Black now I get it, thank you!
cant understand the elipse part
Points cannot rotate. A position vector described by 2 points (here, the point in question + the origin) can rotate.
Check out linear algebra, you’d be surprised 😉
This is 🔥
thnx