Givens rotation

In numerical linear algebra, a Givens rotation is a rotation in the plane spanned by two coordinates axes. Givens rotations are named after Wallace Givens, who introduced them to numerical analysts in the 1950s while he was working at Argonne National Laboratory.

As action on matrices

A Givens rotation acting on a matrix from the left is a row operation, moving data between rows but always within the same column. Unlike the elementary operation of row-addition, a Givens rotation changes both of the rows addressed by it. To understand how it is a rotation, one may denote the elements of one target row by through and the elements of the other target row by through : Then the effect of a Givens rotation is to rotate each subvector by the same angle. As with row-addition, algorithms often choose this angle so that one specific element becomes zero, and whatever happens in remaining columns is considered acceptable side-effects.

A Givens rotation acting on a matrix from the right is instead a column operation, moving data between two columns but always within the same row. As with action from the left, it rotates each subvector by the same angle, but here these named elements occur in the matrix as Some algorithms, especially those concerned with preserving matrix similarity, apply Givens rotations as a conjugate action: both rotating by one angle between two rows, and rotating by the same angle between the corresponding columns. In this case the effect on the four elements affected by both rotations is more complicated; a Jacobi rotation is such a conjugate action to the end of zeroing the two off-diagonal elements among these four.

The main use of Givens rotations in numerical linear algebra is to transform vectors or matrices into a special form with zeros in certain coefficients. This effect can, for example, be employed for computing the QR decomposition of a matrix. One advantage over Householder transformations is that they can easily be parallelised, and another is that often for very sparse matrices they have a lower operation count.

Matrix representation

A Givens rotation is represented by a matrix of the form

where c = cos θ and s = sin θ appear at the intersections ith and jth rows and columns. That is, for fixed i > j, the non-zero elements of Givens matrix are given by:

The product G(i, j, θ)x represents a counterclockwise rotation of the vector x in the (i, j) plane of θ radians, hence the name Givens rotation.

Stable calculation

When a Givens rotation matrix, G(i, j, θ), multiplies another matrix, A, from the left, G A, only rows i and j of A are affected. Thus we restrict attention to the following counterclockwise problem. Given a and b, find c = cos θ and s = -sin θ such that

where is the length of the vector . Explicit calculation of θ is rarely necessary or desirable. Instead we directly seek c and s. An obvious solution would be

[1]

However, the computation for r may overflow or underflow. An alternative formulation avoiding this problem (Golub & Van Loan 1996, §5.1.8) is implemented as the hypot function in many programming languages.

The following Fortran code is a minimalistic implementation of Givens rotation for real numbers. If the input values 'a' or 'b' are frequently zero, the code may be optimized to handle these cases as presented here.

subroutine givens_rotation(a, b, c, s, r)

real a, b, c, s, r
real h, d

if (b .ne. 0.0) then
    h = hypot(a, b)
    d = 1.0 / h
    c = abs(a) * d
    s = sign(d, a) * b
    r = sign(1.0, a) * h
else
    c = 1.0
    s = 0.0
    r = a
end if

return
end


Furthermore, as Edward Anderson discovered in improving LAPACK, a previously overlooked numerical consideration is continuity. To achieve this, we require r to be positive.[2] The following MATLAB/GNU Octave code illustrates the algorithm.

function [c, s, r] = givens_rotation(a, b)
    if b == 0;
        c = sign(a);
        if (c == 0);
            c = 1.0; % Unlike other languages, MatLab's sign function returns 0 on input 0.
        end;
        s = 0;
        r = abs(a);
    elseif a == 0;
        c = 0;
        s = -sign(b);
        r = abs(b);
    elseif abs(a) > abs(b);
        t = b / a;
        u = sign(a) * sqrt(1 + t * t);
        c = 1 / u;
        s = -c * t;
        r = a * u;
    else
        t = a / b;
        u = sign(b) * sqrt(1 + t * t);
        s = -1 / u;
        c = t / u;
        r = b * u;
    end
end

The IEEE 754 copysign(x,y) function, provides a safe and cheap way to copy the sign of y to x. If that is not available, |x|⋅sgn(y), using the abs and sgn functions, is an alternative as done above.

Triangularization

Given the following 3×3 Matrix:

two iterations of the Givens rotation (note that the Givens rotation algorithm used here differs slightly from above) yield an upper triangular matrix in order to compute the QR decomposition.

In order to form the desired matrix, zeroing elements (2,1) and (3,2) is required; element (2,1) is zeroed first, using a rotation matrix of:

The following matrix multiplication results:

where

Using these values for c and s and performing the matrix multiplication above yields A2:

Zeroing element (3,2) finishes off the process. Using the same idea as before, the rotation matrix is:

Afterwards, the following matrix multiplication is:

where

Using these values for c and s and performing the multiplications results in A3:

This new matrix A3 is the upper triangular matrix needed to perform an iteration of the QR decomposition. Q is now formed using the transpose of the rotation matrices in the following manner:

Performing this matrix multiplication yields:

This completes two iterations of the Givens Rotation and calculating the QR decomposition can now be done.

QR iteration variant

If performing the above calculations as a step in the QR algorithm for finding the eigenvalues of a matrix, then one next wants to compute the matrix , but one should not do so by first multiplying and to form , instead rather by multiplying each by (on the right). The reason for this is that each multiplication by a Givens matrix on the right changes only two columns of , thus requiring a mere arithmetic operations, which for Givens rotations sums up to arithmetic operations; multiplying by the general matrix would require arithmetic operations. Likewise, storing the full matrix amounts to elements, but each Givens matrix is fully specified by its pair and of them can thus be stored in elements.

In the example,

Complex matrices

Another method can extend Givens rotations to complex matrices. A diagonal matrix whose diagonal elements have unit magnitudes but arbitrary phases is unitary. Let A be a matrix for which it is desired to make the ji element be zero using the rows and columns i and j>i. Let D be a diagonal matrix whose diagonal elements are one except the ii and jj diagonal elements which also have unit magnitude but have phases which are to be determined. The phases of the ii and jj elements of D can be chosen so as to make the ii and ji elements of the product matrix D A be real. Then a Givens rotation G can be chosen using the i and j>i rows and columns so as to make the ji element of the product matrix G D A be zero. Since a product of unitary matrices is unitary, the product matrix G D is unitary and so is any product of such matrix pair products.

In Clifford algebra

In Clifford algebra and its child structures such as geometric algebra, rotations are represented by bivectors. Givens rotations are represented by the exterior product of the basis vectors. Given any pair of basis vectors Givens rotations bivectors are:

Their action on any vector is written:

where

Dimension 3

There are three Givens rotations in dimension 3:

[note 1]

Given that they are endomorphisms they can be composed with each other as many times as desired, keeping in mind that g ∘ ff ∘ g.

These three Givens rotations composed can generate any rotation matrix according to Davenport's chained rotation theorem. This means that they can transform the standard basis of the space to any other frame in the space.[clarification needed]

When rotations are performed in the right order, the values of the rotation angles of the final frame will be equal to the Euler angles of the final frame in the corresponding convention. For example, an operator transforms the basis of the space into a frame with angles roll, pitch and yaw in the Tait–Bryan convention z-x-y (convention in which the line of nodes is perpendicular to z and Y axes, also named Y-X′-Z″).

For the same reason, any rotation matrix in 3D can be decomposed in a product of three of these rotation operators.

The meaning of the composition of two Givens rotations g ∘ f is an operator that transforms vectors first by f and then by g, being f and g rotations about one axis of basis of the space. This is similar to the extrinsic rotation equivalence for Euler angles.

Table of composed rotations

The following table shows the three Givens rotations equivalent to the different Euler angles conventions using extrinsic composition (composition of rotations about the basis axes) of active rotations and the right-handed rule for the positive sign of the angles.

The notation has been simplified in such a way that c1 means cos θ1 and s2 means sin θ2). The subindexes of the angles are the order in which they are applied using extrinsic composition (1 for intrinsic rotation, 2 for nutation, 3 for precession)

As rotations are applied just in the opposite order of the Euler angles table of rotations, this table is the same but swapping indexes 1 and 3 in the angles associated with the corresponding entry. An entry like zxy means to apply first the y rotation, then x, and finally z, in the basis axes.

All the compositions assume the right hand convention for the matrices that are multiplied, yielding the following results.

xzx xzy
xyx xyz
yxy yxz
yzy yzx
zyz zyx
zxz zxy

See also

Notes

  1. ^ The rotation matrix immediately below is not a Givens rotation. The matrix immediately below respects the right-hand rule and is this usual matrix one sees in Computer Graphics; however, a Givens rotation is simply a matrix as defined in the Matrix representation section above and does not necessarily respect the right-hand rule. The matrix below is actually the Givens rotation through an angle of -.

Citations

  1. ^ Björck, Ake (1996). Numerical Methods for Least Squares Problems. United States: SIAM. p. 54. ISBN 9780898713602. Retrieved 16 August 2016.
  2. ^ Anderson, Edward (4 December 2000). "Discontinuous Plane Rotations and the Symmetric Eigenvalue Problem" (PDF). LAPACK Working Note. University of Tennessee at Knoxville and Oak Ridge National Laboratory. Retrieved 16 August 2016.

References

Read other articles:

Su una scheda di approvazione, l'elettore può votare per qualsiasi numero di candidati. Il voto per approvazione (inglese: approval voting) è un sistema di voto usato nelle elezioni, nelle quali il votante ha diritto a dare la propria preferenza a tutti i candidati che desidera. È utilizzato principalmente nelle elezioni in cui va deciso un solo eletto, però può essere esteso anche ad elezioni con più vincitori; tuttavia il voto per approvazione con più vincitori è caratterizzato da p...

 

Dieser Artikel behandelt den Ort in der Gemeinde Cremlingen im Landkreis Wolfenbüttel, für die Stadt siehe Schöppenstedt. Klein Schöppenstedt Gemeinde Cremlingen Koordinaten: 52° 15′ N, 10° 37′ O52.25313888888910.61166666666796Koordinaten: 52° 15′ 11″ N, 10° 36′ 42″ O Höhe: 96 (80–103) m Einwohner: 645 (31. Dez. 2021)[1] Eingemeindung: 1. März 1974 Postleitzahl: 38162 Vorwahl: 0531 Karte...

 

بيت زينب خاتونمعلومات عامةنوع المبنى بيتالمكان القاهرةالمنطقة الإدارية محافظة القاهرة البلد  مصرارتفاع المبنىالارتفاع عن سطح البحر 36 متر[1] معلومات أخرىالإحداثيات 30°02′41″N 31°15′49″E / 30.044814°N 31.263528°E / 30.044814; 31.263528 تعديل - تعديل مصدري - تعديل ويكي بيانات هو ب

American manufacturer and shipbuilder Eber Brock Wardca. 1875Born(1811-12-25)December 25, 1811Applegaths Mills, Ontario, CanadaDiedJanuary 2, 1875(1875-01-02) (aged 63)Detroit, Michigan, USResting placeElmwood Cemetery, DetroitNationalityAmericanOccupationbusinessmanKnown forindustrialistTitleCaptain of Industry of the Midwest [1]Political partyRepublicanSpouse(s)Mary McQueen (first wife) Catharine Lyon (second wife)RelativesBeulah Brinton, cousinSignature Eber Brock Ward (D...

 

Berbagai macam stasioneri yang digunakan di kantor Stasioneri adalah alat dan bahan yang digunakan untuk menulis yang diproduksi secara komersial, misalnya kertas, amplop, alat tulis, kertas resi, dan perlengkapan kantor lainnya.[1] Stasioneri mencakup alat dan bahan yang digunakan untuk menulis dengan tangan (misalnya kertas surat) atau peralatan seperti pencetak komputer. Klasifikasi Toko stasioneri di Hanoi. Stasioneri bisnis: ATK, kartu nama, kertas surat, kertas resi, invois Perl...

 

Bandar Udara InternasionalTianhe Wuhan武汉天河国际机场IATA: WUHICAO: ZHHHInformasiJenisPublikPengelolaWuhan Tianhe International Airport Co. Ltd.MelayaniWuhanLokasiDistrik Huangpi, WuhanDibuka15 April 1995; 28 tahun lalu (1995-04-15)Maskapai utamaAir ChinaChina Eastern AirlinesChina Southern AirlinesKetinggian dpl34 mdplKoordinat30°47′01″N 114°12′29″E / 30.78361°N 114.20806°E / 30.78361; 114.20806Koordinat: 30°47′01″N 114°12′2...

Misi Militer Prancis untuk Jepang kedua (1872–1880). Misi Militer Prancis untuk Jepang 1872–1880 adalah sebuah misi militer Prancis kedua untuk negara tersebut. Misi tersebut menyusul Misi Militer Prancis untuk Jepang pertama (1867–68), yang berakhir dengan Perang Boshin dan pendirian kekuasaan Kaisar Meiji. Latar belakang Pembentukan misi militer kedua untuk Jepang merupakan sebuah kejutan, karena Misi Militer Prancis pertama berpihak pada Shogun Tokugawa Yoshinobu yang menentang pemer...

 

Caracas Aeropuerto Internacional de Maiquetía - Simón Bolívar Predefinição:Info/Aeroporto IATA: CCS - ICAO: SVMI Características Tipo Público Administração Instituto Nacional de Aeronáutica Civil Serve Caracas, Venezuela Localização Maiquetía, La Guaira, Venezuela Inauguração 1945 Coordenadas 10° 36' 11 N 66° 59' 26 O Altitude 72 m (236 ft) Movimento de 2015 Passageiros 12.000.000 passageiros Website oficial Página oficial Mapa SVMILocal do aeroporto Pistas C...

 

La Liga records For the all time Spanish league statistics, see Football records and statistics in Spain. The La Liga is a Spanish professional league for association football club. At the top of the Spanish football league system, it is the country's primary football competition and is contested by 20 clubs. The competition was formed in 1929, with an initial format of 10 teams. League records See also: List of Spanish football champions Records in this section refer to La Liga from its foun...

Indian Marxist theoretician Gangadhar AdhikariGeneral Secretary of the Communist Party of IndiaIn office1933–1935Preceded byS.V. GhateSucceeded by P.C. Joshi Personal detailsBorn(1898-12-08)8 December 1898Panvel, Colaba District, Bombay Presidency, British IndiaDied21 November 1981(1981-11-21) (aged 82)Political partyCommunist Party of IndiaSpouseVimal SamarthOccupationTheoretician Dr. Gangadhar Adhikari (8 December 1898 – 21 November 1981)[1] was a prominent Marxist theoreti...

 

Keuskupan JaipurDioecesis Iaipurensisजयपुर के सूबाKatolik Katedral Maria Bunda Kabar Baik di JaipurLokasiNegara IndiaProvinsi gerejawiAgraStatistikLuas129.060 km2 (49.830 sq mi)Populasi- Total- Katolik(per 2006)25.828.2714,096 (0.0%)InformasiDenominasiKatolik RomaRitusRitus RomaPendirian20 Juli 2005KatedralKatedral Maria Bunda Kabar Baik di JaipurKepemimpinan kiniPausFransiskusUskupOswald LewisUskup agungAlbert D'SouzaSitus webSitu...

 

Brazilian footballer Evanílson Evanílson in 2006Personal informationFull name Evanílson Aparecido FerreiraDate of birth (1975-09-12) 12 September 1975 (age 48)Place of birth Diamantina, BrazilHeight 1.78 m (5 ft 10 in)Position(s) WingbackYouth career América-MGSenior career*Years Team Apps (Gls)1996–1998 América-MG 19 (1)1999 Cruzeiro 1999–2005 Borussia Dortmund 123 (4)2005 Atlético Mineiro 7 (0)2006 1. FC Köln 3 (0)2006 Atlético Paranaense 7 (2)2007 Sport 2 (0...

Map of the results of the 1999 Sedgemoor District Council election. The 1999 Sedgemoor District Council election took place on 6 May 1999 to elect members of Sedgemoor District Council in Somerset, England. The whole council was up for election with boundary changes since the last election in 1995 increasing the number of seats by 1.[1] The election saw the Conservative party gain overall control of the council from no overall control.[2] Election result Sedgemoor Local Electi...

 

Palang Merah IndonesiaLambang PMITanggal pendirian17 September 1945; 78 tahun lalu (1945-09-17)StatusOrganisasi KemanusiaanTipePerhimpunan atau AsosiasiTujuanMenolong sesama tanpa membeda-bedakanKantor pusatJalan Jenderal Gatot Subroto Kav. 96 Jakarta Jakarta, IndonesiaWilayah layanan IndonesiaBahasa resmi IndonesiaKetua UmumJusuf KallaBadan utamaInternational Red Cross and Red Crescent MovementOrganisasi indukInternational Committee of the Red CrossInternational Federation of Red Cross ...

 

This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages) A major contributor to this article appears to have a close connection with its subject. It may require cleanup to comply with Wikipedia's content policies, particularly neutral point of view. Please discuss further on the talk page. (September 2018) (Learn how and when to remove this template message) This article is an orphan, as no other ...

Koordinat: 30°41′10.03″N 88°2′29.42″W / 30.6861194°N 88.0415056°W / 30.6861194; -88.0415056 Artikel ini membutuhkan rujukan tambahan agar kualitasnya dapat dipastikan. Mohon bantu kami mengembangkan artikel ini dengan cara menambahkan rujukan ke sumber tepercaya. Pernyataan tak bersumber bisa saja dipertentangkan dan dihapus.Cari sumber: Pertempuran Fort Charlotte – berita · surat kabar · buku · cendekiawan · JSTOR (...

 

2020 single by Carly PearceNext GirlSingle by Carly Pearcefrom the album 29 ReleasedSeptember 4, 2020 (2020-09-04)GenreCountry[1]Length2:44LabelBig MachineSongwriter(s)Shane McAnallyJosh OsborneCarly PearceProducer(s)Shane McAnallyJosh OsborneCarly Pearce singles chronology I Hope You're Happy Now (2019) Next Girl (2020) Never Wanted to Be That Girl (2021) Next Girl is a song co-written and recorded by American country music artist Carly Pearce. It was released in Septe...

 

عين يوسف خريطة البلدية الإحداثيات 35°03′00″N 1°22′00″W / 35.05°N 1.36666667°W / 35.05; -1.36666667  تقسيم إداري  البلد  الجزائر  ولاية ولاية تلمسان  دائرة دائرة الرمشي عدد السكان (2008[1])  المجموع 13٬234 معلومات أخرى منطقة زمنية ت ع م+01:00  13510 رمز جيونيمز 2507868  تعدي...

This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Volandia – news · newspapers · books · scholar · JSTOR (July 2020) (Learn how and when to remove this template message) Aviation museum in , ItalyVolandiaVolandia – Parco e museo del voloLocation within ItalyEstablished2010LocationVia per Tornavento, 15,Case ...

 

Page from a Guru Granth Sahib manuscript dated to 1705 giving dates of Joti Jot (death) of the Sikh gurus from Guru Nanak to Guru Tegh Bahadur Part of a series onSikhism People Topics Outline History Glossary Sikh gurus Guru Nanak Guru Angad Guru Amar Das Guru Ram Das Guru Arjan Guru Hargobind Guru Har Rai Guru Har Krishan Guru Tegh Bahadur Guru Gobind Singh Guru Granth Sahib Select revered saints Bhagat Kabir Bhagat Ravidas Bhagat Farid Bhagat Ramanand Bhagat Beni Bhagat Namdev Bhagat Sadhan...

 

Strategi Solo vs Squad di Free Fire: Cara Menang Mudah!