First write with . Direct multiplication gives
The inner product of its two columns is
If is orthogonal this is zero, and positivity of the bracket forces . The first column must then have length one, so . Thus , , and .
For the general QR decomposition, apply the Gram-Schmidt process to the ordered columns of the invertible real matrix . At stage , subtract projections onto the already chosen orthonormal vectors to get ; independence of the columns gives . Set . The matrix with columns is orthogonal, and
is upper triangular. Its diagonal entry is strictly positive. This proves with the required properties.
Now suppose in dimension . Substitution of gives
The matrix is orthogonal, as are and , so this matrix and are orthogonal. Regard as upper triangular in blocks, with invertible diagonal blocks . The inverse is upper triangular in the same blocks, by solving the triangular block equations; multiplication by block diagonal preserves this pattern. Thus is block upper triangular.
An orthogonal block upper-triangular matrix is block diagonal. Indeed its first two columns are supported in the first two rows and are orthonormal, so span that first coordinate plane. Orthogonality of every subsequent column to them makes its first two entries zero. The remaining lower-right matrix is orthogonal; iterate this argument. Therefore with each orthogonal. The rule for diagonal blocks of products of block upper-triangular matrices gives
Each is itself an upper-triangular real matrix with positive diagonal. The first calculation gives . Consequently , whence . Finally is a product of matrices commuting with , so . We have proved
This is positive-diagonal QR decomposition preserves a complex structure; the positivity convention is important in the two-dimensional step.