Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Compute transformation matrix in nth dimension

  1. Dec 1, 2009 #1
    I have a vector of all ones in n-dimensions. For example (1,1,1) in 3D. I want to find a invertible rotation matrix T that transforms the vector of all ones to the vector (0,0,0,...,0,,1):

    Let v be the vector of all ones, and w=(0,0,...,0,1)
    Find T such that T.v == w


    In low dimension it is easy to find such a vector with the routine below, but computationally intensive when d>5. Is there a better way?

    Basic routine: represent the components of T as variables and find a solution to the non-linear problem of finding an invertible matrix T (Det[T]!=0) that satisfies the dot product T.v == w.

    Any better ideas?
     
  2. jcsd
  3. Dec 1, 2009 #2
    I'm no expert here, but I don't see how this is possible.

    Assume that the inverse of T exists, and that it is A = inverse(T).The original problem can then be rewritten:
    Tv = w
    v = Aw

    However, the only way this can hold is if the columns of A are (0, 0, ..., 0, v) (where 0 here is the zero vector). Thus A is obviously not invertible, and thus T cannot be either.

    If I'm wrong, I'm sorry. I'd love hear where I'm wrong tho :)
     
  4. Dec 2, 2009 #3

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    ??? Any transformation from R3 to Rn where n> 3 is not square and so is not invertible. Nor can it be a "rotation" matrix.

     
  5. Dec 2, 2009 #4
    In 2D:
    T= {{1, -1}, {1, 0}}
    Tinverse = {{0, 1}, {-1, 1}}
    T.{1,1}={0,1}

    In 3D:
    T= {{1, -1, 0}, {-1, 0, 1}, {1, 1, -1}}
    Tinverse = {{1, 1, 1}, {0, 1, 1}, {1, 2, 1}}
    T.{1,1,1}={0,0,1}

    In 4D:
    T= {{-1, -2, 0, 3}, {-2, -1, 0, 3}, {-1, 1, -1, 1}, {2, -2, 1, 0}}
    Tinverse = {{-(2/3), 1/3, 1, 1}, {-(5/3), 4/3, 1, 1}, {-2, 2, 0, 1}, {-1, 1, 1,
    1}}
    T.{1,1,1,1}={0,0,0,1}


     
  6. Dec 2, 2009 #5
    I'm looking to map Rn to Rn. See above post. I used the 3D vector (1,1,1) as an example.

    ....so in R7 I want to map (1,1,1,1,1,1,1) to (0,0,0,0,0,0,1) etc.
     
  7. Dec 2, 2009 #6
    Ah, was thinking inside out. Thanks :)

    Do you want a proper rotation matrix, or just any invertible matrix that transforms v to w?

    Your "basic algorithm" seems to indicate the latter, in which case couldn't you then construct the Tinverse first, which is easy, and then invert that to get T?
     
  8. Dec 2, 2009 #7
    Hi,
    Can you elaborate on how to construct Tinverse easily? Isn't the computational difficulty the same, in that finding T such that T.v=w is as hard as finding a Tinv such that Tinv.w=v?

    Any matrix will do. I will then be applying the transformation to other vectors in the space (I don't want 2 vectors to map onto 1 - hence the invertibility property)

     
  9. Dec 2, 2009 #8
    Well, again, I might be wrong here but... The requirements of Tinverse is that the last column has to be all 1's (in order to transform w to v), and in order to be invertible the columns must be linearly independent. One way to construct such a matrix would be to use the standard basis vectors e_i for the first n-1 columns, and the use v as the n'th column:

    Tinverse = {{1, 0, 0, 1}, {0, 1, 0, 1}, {0, 0, 1, 1}, {0, 0, 0, 1}}

    This matrix can then be inverted and will transform v into w:

    T = {{1, 0, 0, -1}, {0, 1, 0, -1}, {0, 0, 1, -1}, {0, 0, 0, 1}}
     
  10. Dec 2, 2009 #9
    Excellent. That's the kind of solution I was hoping for. Many thanks.

     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Compute transformation matrix in nth dimension
  1. Nth roots of a matrix (Replies: 11)

  2. Dimension of a Matrix (Replies: 6)

Loading...