RQ decomposition using Givens rotations

Calculates RQ decomposition of A = RQ (3x3)
418 Downloads
Updated 10 Jul 2015

View License

rqGivens Calculates RQ decomposition of A = RQ
Syntax:
[R, Q] = rqGivens(A);

Input:
A - 3-by-3 matrix of rank 3

Output:
R - Upper triangular matrix (3-by-3)
Q - Orthogonal matrix (3-by-3)

Description:
This function calculates the 3-dimensional RQ decomposition of A using
Givens rotations (equal to Euler rotations) Gx, Gy Gz:

Gx = [ 1 0 0;
0 c -s;
0 s c];

Gy = [ c 0 s;
0 1 0;
-s 0 c];

Gz = [ c -s 0;
s c 0;
0 0 1];

Ax = A * Gx to set Ax(3,2) to zero.
Axy = Ax * Gy to set Axy(3,1) to zero.
R = Axyz = Axy * Gz to set Axyz(2,1) to zero.

R = A * Gx * Gy * Gz
-> R * Gz' * Gy' * Gx' = A
-> Q = Gz' * Gy' * Gx'

See also:
- https://en.wikipedia.org/wiki/Givens_rotation#Dimension_3
- Hartley, Zisserman - Multiple View Geometry in Computer Vision
http://www.amazon.com/dp/0521540518 (Appendix 4, A4.1.1, page 579)

Cite As

Lars Meinel (2024). RQ decomposition using Givens rotations (https://www.mathworks.com/matlabcentral/fileexchange/52065-rq-decomposition-using-givens-rotations), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2013b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Polynomials in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
2015.7.10.0