MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

formula for a rotation matrix

  • To: mathgroup at smc.vnet.net
  • Subject: [mg84738] formula for a rotation matrix
  • From: Yaroslav Bulatov <yaroslavvb at gmail.com>
  • Date: Fri, 11 Jan 2008 22:10:31 -0500 (EST)

I'm looking for a rotation matrix R that rotates vector 1,1,1,..,1 to
align with vector 0,0,...,0,1 in n dimensions. Since there may be many
such matrices, I'm looking for a one with the nicest symbolic
expression

One possible formula is below, although it seems a bit complicated
since it involves 4 distinct values. Is it possible to get an
expression that is more symmetrical?

let J=(n-1)x(n-1) matrix of 1's, I=(n-1)x(n-1) identity matrix,
j1=(n-1)x1 matrix of 1's, j2=1xn matrix of 1's
R=I-J/(sqrt(n)+n) ~Append~ -j1/(sqrt(n)) ~Append~ j2/(sqrt(n))


R[n_] := Module[{},
  (* make n-1 x n-1 subblock *)
  J = ConstantArray[1, {n - 1, n - 1}];
  m = IdentityMatrix[n - 1] - J/(n + Sqrt[n]);
  (* Append a column of -1/Sqrt[n]*)
  m = m // Transpose // Append[#, Table[-1/Sqrt[n], {n - 1}]] & //
    Transpose;
  (* Append a row of 1/Sqrt[n] *)
  m = Append[m, Table[1/Sqrt[n], {n}]]
  ]


  • Prev by Date: Re: question from amateur, why no demonstration for intersecting
  • Next by Date: problem with MLGetReal64Array
  • Previous by thread: A Series question
  • Next by thread: Re: formula for a rotation matrix