Public Group

# 2 component axis and 2x2 matrix rotation

This topic is 2568 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

hello.
I have the x axis of a 2x2 matrix, how i can calculate the y axis?
Is sufficent rotate the x axis of 90°?
How i can rotate it a 2 dimensional vector of 90°?
I have two classes : a 3dvector(x,y and z) and a 3x3 matrix ?
Can i use these 3d classes for work in 2d?

thanks.

##### Share on other sites
To rotate a 2D vector 90 degrees (or any number of degrees), a generic solution is to build a 2x2 rotation matrix and multiply the vector by it , or alternatively if you are only interested with a 90 degrees rotation, just swap the components and flip the sign of one of the components (which of course does the same thing than multiplying by a matrix, but is a shortcut). See e.g. MathGeoLib: float2::Rotate90CW() and float2::Rotate90CCW().

##### Share on other sites

To rotate a 2D vector 90 degrees (or any number of degrees), a generic solution is to build a 2x2 rotation matrix and multiply the vector by it , or alternatively if you are only interested with a 90 degrees rotation, just swap the components and flip the sign of one of the components (which of course does the same thing than multiplying by a matrix, but is a shortcut). See e.g. MathGeoLib: float2::Rotate90CW() and float2::Rotate90CCW().

thanks and ...i have only a 2d vector , is possible to calculate a 2d simil 3d cross product?
for obtain the second 2d vector of the 2x2 rotation matrix?
thanks

1. 1
2. 2
Rutin
18
3. 3
khawk
15
4. 4
A4L
14
5. 5

• 10
• 13
• 26
• 10
• 11
• ### Forum Statistics

• Total Topics
633745
• Total Posts
3013667
×