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?