Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / 3D Theory & Graphics / Matrices, matrices and more matrices Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
mentalcalculator

March 24, 2005, 01:25 PM

Hey, i'm learning to work with matrices and i'm having a little problem with them. If M is a translation matrix for a translation vector t and it is orthogonal ( translation matrices are orthogonal right? ) then its inverse is its tranpose M(t)^-1 = M(t)^T, M(t)^-1 = M(-t) and thus M(t)^T = M(-t), and this last statement is what i'm not understanding since the transpose operation just swaps the rows for columns, there's no any "changing sign" involved. Anyone can explain me this please ?

Thank you!

 
timm

March 24, 2005, 01:43 PM

When you use homogeneous coordinates to represent translation as a 4x4 matrix, that matrix is not orthogonal. The upper-left 3x3 submatrix may be.

 
Chris

March 24, 2005, 01:59 PM

First of all, there's no such thing as "translation matrices" in a strong mathematical sense. This term only works because something "special" happens to the matrix-vector multiplication.

This is how a vector (x,y,z) gets multiplied with a translation matrix,
t=(tx,ty,tz) is the translation vector. The fourth component may also be "w", depends on the purpose of the vector.

  1.  
  2. | 1 0 0 tx |   | x |    | x + tx |
  3. | 0 1 0 ty | * | y | =  | y + ty |
  4. | 0 0 1 tz |   | z |    | z + tz |
  5. | 0 0 0 1  |   | 1 |    | 1      |
  6.  


Sometimes you'll see the vector written as a row, not a column, and multiplied from left onto the matrix. But this is how it's done "properly" ...

Orthogonal matrices are matrices, whose column vectors are pair-wise perpendicular, and have euclidian length 1. Some definitions say the latter property isn't required for a matrix to be called orthogonal, and if it is fulfilled the matrix is called orthonormal, but again, the first version is how it's done "properly" ...

It is correct that for orthogonal (in the proper sense) matrices the equality M^(-1) = -M^T holds true.

But a translation matrix as I have written it above is obviously NOT orthogonal in any sense. Only it's upper-left 3x3 submatrix is orthogonal, even identity.

So I don't understand your counter-argument about changing signs.

 
mentalcalculator

March 24, 2005, 03:22 PM

Oh ok...so the "translation matrix" isn't orthogonal, i think that was my big mistake. One last thing... to compute the inverse of the "translation matrix" i can transpose the 3x3 upper left submatrix( assuming that is is orthogonal, because it is in most cases ) and change the sign of the translation vector. Is that correct ?

Thanks!

 
Chris

March 24, 2005, 04:31 PM

> assuming that is is orthogonal, because it is in most cases

This is bad, if it's not orthogonal the inverse may be FAR from being the transpose. Properly inverting a 3x3 matrix isn't terribly difficult either, one can easily compute the explicit formula. The M^(-1)=M^T of course is a shortcut that should be taken if feasible, because ^T obviously is much faster to compute than ^(-1).

> i can transpose the 3x3 upper left submatrix and change the sign of the
> translation vector. Is that correct ?

Yes.

 
Reedbeta

March 24, 2005, 06:10 PM

Basically, you can tranpose the upper-left 3x3 only if it is a pure rotation matrix. If it includes a scaling, reflection, or something else then you will have to take the full inverse.

 
jyk

March 24, 2005, 11:27 PM

"One last thing... to compute the inverse of the "translation matrix" i can transpose the 3x3 upper left submatrix (assuming that is is orthogonal, because it is in most cases) and change the sign of the translation vector. Is that correct?"

Depending on what you mean, I think the answer is no (although I may be mistaken, or misunderstanding the question).

Let's assume that by 'translation matrix' you mean 'transformation matrix'. Let's also assume it's a rigid body transform, that is, it only contains rotation and translation (no scaling, shearing, etc.)

Using column vectors, we can write the matrix as:

M = T * R

Where R is a rotation matrix, and T is a translation matrix. By 'translation matrix', I mean a matrix which is identity, except for the translation vector which goes in the right column.

In general, (A*B)-1 = B-1*A-1. So:

M-1 = R-1 * T-1

R-1 is simply R transposed, and T-1 is simply T with the translation vector negated. So those are easy to compute, and no general inverse is required. You'll note, however, that the translation vector of M-1 is not the negative of the original translation vector, but rather the negative of the original translation vector, rotated by the inverse rotation.

So I'm pretty sure it's not as easy as transposing the upper-left 3x3 matrix and negating the translation vector. But, it is as easy as trivially inverting T and R and multiplying them in reverse order.

 
This thread contains 7 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.