Difference between revisions of "Givens method"

From Algowiki
Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Line 8: Line 8:
 
'''1.1 General description of the algorithm'''  
 
'''1.1 General description of the algorithm'''  
  
'''Givens' method''' (which is also called '''the rotation method''' in the Russian mathematical literature) is used to represent a matrix in the form ''A = QR'', where ''Q'' is a unitary and ''R'' is an upper triangular matrix. The matrix Q is not stored and used in its explicit form but rather as the product of rotations. Each (Givens) rotation can be specified by a pair of indices and a single parameter.  
+
'''Givens' method''' (which is also called '''the rotation method''' in the Russian mathematical literature) is used to represent a matrix in the form $A = QR$, where $Q$ is a unitary and $R$ is an upper triangular matrix. The matrix $Q$ is not stored and used in its explicit form but rather as the product of rotations. Each (Givens) rotation can be specified by a pair of indices and a single parameter.  
 +
 
 
{{Шаблон:Матрица_вращения}}
 
{{Шаблон:Матрица_вращения}}
In a conventional implementation of Givens' method, this fact makes it possible to avoid using additional arrays by storing the results of decomposition in the array originally occupied by ''A''. Various uses are possible for the ''QR'' decomposition of ''A''. It can be used for solving a SLAE (System of Linear Algebraic Equations) ''Ax = b'' or as a step in the so-called ''QR'' algorithm for finding the eigenvalues of a matrix.
+
 
 +
In a conventional implementation of Givens' method, this fact makes it possible to avoid using additional arrays by storing the results of decomposition in the array originally occupied by $A$. Various uses are possible for the $QR$ decomposition of $A$. It can be used for solving a SLAE (System of Linear Algebraic Equations) $Ax = b$ or as a step in the so-called $QR$ algorithm for finding the eigenvalues of a matrix.
 +
 
 +
At each step of Givens' method, two rows of the matrix under transformation are rotated. The parameter of this transformation is chosen so as to eliminate one of the entries in the current matrix. First, the entries in the first column are eliminated one after the other, then the same is done for the second column, etc., until the column $n-1$. The resulting matrix is $R$. The step of the method is split into two parts: the choice of the rotation parameter and the rotation itself performed over two rows of the current matrix. The entries of these rows located on the left of the pivot column are zero; thus, no modifications are needed there.
 +
 
 +
Вращение элементов строк в текущем столбце выполняется одновременно с подбором параметра вращения. Таким образом, вторая часть шага заключается в выполнении вращения двумерных векторов, составленных из элементов вращаемых строк в столбцах справа от "рабочего". Каждое такое вращение эквивалентно перемножению двух комплексных чисел (или в сумме 4 умножениям, 1 сложению и 1 вычитанию действительных), одно из которых имеет модуль 1. 
 +
Подбор параметра вращения по двум элементам "рабочего" столбца является более сложной операцией, что связано в том числе и с необходимостью минимизации влияния ошибок округления. Обычно для хранения матрицы вращения используется тангенс половинного угла <math>t</math>, с которым простыми формулами (т.н. "боевыми формулами тригонометрии") связаны косинус <math>c</math> и синус <math>s</math> самого угла:
 +
 
 +
<math>c = (1 - t^2)/(1 + t^2), s = 2t/(1 + t^2)</math>
 +
 
 +
Именно <math>t</math> обычно и хранится в соответствующем элементе массива.

Revision as of 21:45, 21 January 2016


Primary authors of this description: A.V.Frolov, Vad.V.Voevodin (Section 2.2)


1 Properties and structure of the algorithm[edit]

1.1 General description of the algorithm

Givens' method (which is also called the rotation method in the Russian mathematical literature) is used to represent a matrix in the form $A = QR$, where $Q$ is a unitary and $R$ is an upper triangular matrix. The matrix $Q$ is not stored and used in its explicit form but rather as the product of rotations. Each (Givens) rotation can be specified by a pair of indices and a single parameter.

Template:Шаблон:Матрица вращения

In a conventional implementation of Givens' method, this fact makes it possible to avoid using additional arrays by storing the results of decomposition in the array originally occupied by $A$. Various uses are possible for the $QR$ decomposition of $A$. It can be used for solving a SLAE (System of Linear Algebraic Equations) $Ax = b$ or as a step in the so-called $QR$ algorithm for finding the eigenvalues of a matrix.

At each step of Givens' method, two rows of the matrix under transformation are rotated. The parameter of this transformation is chosen so as to eliminate one of the entries in the current matrix. First, the entries in the first column are eliminated one after the other, then the same is done for the second column, etc., until the column $n-1$. The resulting matrix is $R$. The step of the method is split into two parts: the choice of the rotation parameter and the rotation itself performed over two rows of the current matrix. The entries of these rows located on the left of the pivot column are zero; thus, no modifications are needed there.

Вращение элементов строк в текущем столбце выполняется одновременно с подбором параметра вращения. Таким образом, вторая часть шага заключается в выполнении вращения двумерных векторов, составленных из элементов вращаемых строк в столбцах справа от "рабочего". Каждое такое вращение эквивалентно перемножению двух комплексных чисел (или в сумме 4 умножениям, 1 сложению и 1 вычитанию действительных), одно из которых имеет модуль 1. Подбор параметра вращения по двум элементам "рабочего" столбца является более сложной операцией, что связано в том числе и с необходимостью минимизации влияния ошибок округления. Обычно для хранения матрицы вращения используется тангенс половинного угла [math]t[/math], с которым простыми формулами (т.н. "боевыми формулами тригонометрии") связаны косинус [math]c[/math] и синус [math]s[/math] самого угла:

[math]c = (1 - t^2)/(1 + t^2), s = 2t/(1 + t^2)[/math]

Именно [math]t[/math] обычно и хранится в соответствующем элементе массива.