Given a matrix , the rotation matrix with , zeroes the position of the matrix. For an upper Hessenberg matrix of order n, let
Then , an upper triangular matrix. This generates the QR decomposition of .