# Extracting Rotation Vector from 3-by-4 Matrix

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

## Recommended Posts

Hi I would like to ask you how can I extract Vector3D from a 34 Matrix? float m11, m12, m13; float m21, m22, m23; float m31, m32, m33; float m41, m42, m43; Please help! Thanks.

##### Share on other sites
Where on earth did you get a 3x4 matrix from?

##### Share on other sites
Well I am surprised you are surprised :) google it!
http://www.purplemath.com/modules/matrices.htm

##### Share on other sites
Those types of matrices are used for solving systems of affine equations in linear algebra. You don't need to extract coordinates from them.

If Mx = 0 has a solution (i.e. det(M) != 0), then Mx = d has a solution if and only if rank(M) = rank(M|d) i.e. number of linearly independent rows & columns of M is the same when the particular solution vector (d) is "joined onto" the matrix (denoted "M|d").

That's probably (alot) more than you need to worry about though. Its not really anything to do with 3d graphics, the transformation matrices are always square in that case.

##### Share on other sites
i guess its a 3x4 since the bottom part stores translation?

in that case you can just discard the bottom part and look for the rotation vector described in the top 3x3 part, something that is easily googled.

if this is not the case, im confused aswell.

##### Share on other sites
Frequently a 3x4 (or 4x3) matrix is used in place of a 4x4 matrix. 99% of the time, the missing column (or row) is [0,0,0,1]. So, rather than store those values, they are assumed.

In any case, the math still works:
             | m11 m12 m13 || x y z 1 |  | m21 m22 m23 |  = | x' y' z' |             | m31 m32 m33 |             | m41 m42 m43 |
which is effectively the same as:
             | m11 m12 m13 0 || x y z 1 |  | m21 m22 m23 0 |  = | x' y' z' 1 |             | m31 m32 m33 0 |             | m41 m42 m43 1 |

1. 1
2. 2
Rutin
19
3. 3
4. 4
5. 5

• 9
• 9
• 9
• 14
• 12
• ### Forum Statistics

• Total Topics
633297
• Total Posts
3011247
• ### Who's Online (See full list)

There are no registered users currently online

×