Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Somebody hinted that one can solve a system of equations with some method of rotation. This is only needed for numeric solutions, otherwise Gauss-Jordan (RREF) is just fine.

What is this rotation about?

share|cite|improve this question
That would be either QR decomposition (which is doable with rotation matrices), or the eigendecomposition of a matrix with Jacobi's algorithm. Both are more expensive than Gaussian elimination, which remains applicable for numerical solutions as long as you pivot. – J. M. Sep 19 '11 at 16:21
up vote 1 down vote accepted

It's called a Givens rotation. Similarly to Gaussian elimination, you can use a Givens rotation to eliminate a variable from a system of linear equations.

The basic idea is to find a 2D rotation matrix that will rotate a coefficient in the linear system to lie on the x-axis, thus eliminating it.

Note that this method is not trivially immune to numerical problems. If you directly compute the rotation angle, then you may have continuity issues. If you instead compute cos(alpha) and sin(alpha), you may risk division by zero if the radius is too small. Here is a numerically stable way to compute the rotation.

Givens rotations are also used for computing a QR decomposition: the triangular R is created by a series of eliminations by Givens rotations. Q is simply the product of all the rotation matrices, which are orthogonal.

share|cite|improve this answer
Explicitly determining the rotation angle is never the right way. See this, for instance. – J. M. Dec 27 '11 at 10:29
Also, you have the convention backwards. $\mathbf Q$ is the orthogonal factor (it's supposed to be $\mathbf O$, but seeing that "O" often gets confused with "0"...) and $\mathbf R$ is the upper triangular (or "right triangular") factor. – J. M. Dec 27 '11 at 10:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.