Jump to content

Wikipedia:Reference desk/Archives/Mathematics/2013 June 11

From Wikipedia, the free encyclopedia
Mathematics desk
< June 10 << May | June | Jul >> June 12 >
Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


June 11

[edit]

5 dimensional rotation matrix

[edit]

Hi all,

This is an offshoot from my above question "Changing a matrix so that a multiplication is preserved". Say I have a vector , how would I go about computing a 5x5 matrix that rotates around this vector?. I found a guide on this in 3D which says:

  1. Translate space so that the rotation axis passes through the origin.
  2. Rotate space about the z axis so that the rotation axis lies in the xz plane.
  3. Rotate space about the y axis so that the rotation axis lies along the z axis.
  4. Perform the desired rotation by θ about the z axis.
  5. Apply the inverse of step (3).
  6. Apply the inverse of step (2).
  7. Apply the inverse of step (1).

But how would I go about computationally doing this given the values of and , ? I understand the Gram–Schmidt process (which I'm guessing is part of this) and remember most of my linear algebra, just have mega mental block at the moment. Thanks! 80.254.147.164 (talk) 12:16, 11 June 2013 (UTC)[reply]

Two issues: first, steps #1 and (thus) #7 are excluded from the usual treatment (unless you use homogeneous coordinates). More importantly, rotations in other than three dimensions do not have an axis, so I don't think your question is answerable. --Tardis (talk) 13:00, 11 June 2013 (UTC)[reply]
You need to specify a plane of rotation (rather than an axis) and an angle for a simple 5D rotation (which preserves a 3D subspace), or two orthogonal planes and two angles for a general rotation (which preserves a 1D subspace). Each plane and angle can be specified by two contained vectors. Obtaining the final rotation matrix from these two or four vectors and the angles should be fairly straightforward from geometric algebra. — Quondum 19:33, 11 June 2013 (UTC)[reply]
I have not elaborated more at this stage, since I want to determine whether I've understood the intent of question correctly. The resulting 5D rotation will preserve the length of every vector that it acts on. You'd have to determine how you want to specify the rotation, though. From any ordered set of four vectors one can determine a 5D rotation, and any rotation in 5D can be determined from such a set (though the degrees of freedom in four vectors is greater than in a rotation). Once you've determined how you want to determine the rotation (since your question does not do this adequately), it should be possible to give more specific results. — Quondum 02:32, 12 June 2013 (UTC)[reply]
Thanks for your input - I think I misunderstood how rotations work in higher dimensions as I was referencing the 3D analogue too much. I don't think your solution will help me as I think I was trying to solve a problem based on false premesies. But you really helped me understand it so thanks very much! :) 80.254.147.164 (talk) 08:50, 12 June 2013 (UTC)[reply]
The easiest way may be to think of this as an eigenvector problem. You've got one direction you want to be invariant, so that gives you your first eigenvector, with eigenvalue 1. Then choose two vectors in a plane perpendicular to the first one, which will be your first independent plane of rotation, with eigenvalues exp(± iθ). Then choose two more vectors in a plane perpendicular to all of the first three, which will be your second independent plane of rotation, with eigenvalues exp(± iφ) -- or alternatively with these eigenvalues 1, if you also want this plane to be invariant.
Then re-assemble the matrix in the usual way,
where Λ is your diagonal matrix of eigenvalues, and V is the matrix made up from your eigenvectors as column vectors.
As Quondam suggests, slightly more involved considerations apply if what you are given are the results of the transformation, and you then want to put it into this form. Jheald 10:36, 12 June 2013 (UTC)[reply]

Constrained minimal circle

[edit]

If we constrain the solution of the (planar) smallest-circle problem to be centered on a given line, is there a known (ideally, efficient) technique for finding it? --Tardis (talk) 13:05, 11 June 2013 (UTC)[reply]

Are you talking about by computer or by hand ? By hand, I think I'd just use various-sized circle templates and slide them around until I found the best fit, eyeballing it to center the circles on the line. Then use a compass to draw the circle, so you can more accurately place the center on the line and adjust the radius. By computer, here's one method:
Find the centroid/center of gravity of the point set (I can explain how, if you don't know). Project this point onto the line. Then find the most distant point from this center, and try moving the center a small increment that way, along the line. Repeat this process until moving the center towards the most distant point no longer reduces the radius. Then go with a smaller increment to fine-tune the location further, as many times as needed to get the desired precision. To speed this process up, you might only want to consider those points most distant from the initial centroid/COG projection onto the line. As always, since distance calcs require an expensive square root calculation, we can just compare the distance-squared to save us that work. StuRat (talk) 16:04, 11 June 2013 (UTC)[reply]
I meant by computer (although one can of course apply this sort of algorithm by hand, and it's often done for small input sizes), and preferably directly (rather than iteratively, where issues of reliable convergence, stopping criteria, and inobvious algorithmic complexity crop up). Certainly any number of search algorithms can handle the one-dimensional optimization cast of the problem. --Tardis (talk) 04:31, 15 June 2013 (UTC)[reply]
I don't see any problems with iterative convergence here, unless you make the mistake of changing the center point if the new point gives a radius equal to the current radius, as opposed to only changing it when this reduces the radius by some minimal increment (which the user could supply). That same input increment could also be used as the stopping criteria. This doesn't seem very complex, to me. StuRat (talk) 15:44, 15 June 2013 (UTC)[reply]