General Form of Orthogonal Upper Triangular Matrices I have the following 2-part question:


*

*Find all $n \times n$ matrices that are both orthogonal and upper triangular, with positive diagonal entries.

*Show that the $QR$ factorization of an invertible $n \times n$ matrix is unique. Hint: if $A=Q_1R_1=Q_2R_2$, then the matrix $Q_2^{-1}Q_1=R_2R_1^{-1}$ is both orthogonal and upper triangular, with positive diagonal entries. 
I realize that the general form of the $R$ matrix is upper triangular, with diagonal entries as vector lengths, which by definition must be positive. I'm not sure about the big picture though. Anyone kind enough to nudge me in the right direction? Thanks!
 A: (1) There's nothing simpler than to realize that $Q^T=Q^{-1}$ implies that $Q$ is both upper and lower triangular. Hence diagonal.
(2) Note that $Q_2^TQ_1=R_2R_1^{-1}$ implies that $R_2R_1^{-1}$ is 


*

*orthogonal -- because it is a product of two orthogonal matrices,

*diagonal -- because it is orthogonal and triangular.


The only real orthogonal diagonal matrix is a matrix with $\pm 1$ on the diagonal. Consequently, for any two QR factorizations of $A$, the R-factors are related by such a simple diagonal matrix and in particular, their diagonals differ just by the sign. Once you require the positive entries on the diagonal of $R$, it hence follows that $R_1=R_2$ since the diagonal of $R_2R_1^{-1}$ is nothing but the "componentwise ratio" of the diagonals of $R_1$ and $R_2$.
A: Hint for $1$:
Let $T$ be upper triangular.  Then $T$ is normal (satisfies $T^*T = TT^*$) if and only if it is diagonal.
Or, for ease of proof, use the following:

Let $A$ be partitioned as
  $$
A = \pmatrix{A_{11} & A_{12}\\0&A_{22}}
$$
  then $A$ is normal iff $A_{11},A_{22}$ are normal and $A_{12} = 0$.

Once you've proven this, the statement above on $T$ follows by clever application of the theorem on block matrices. (This trick is from Horn and Johnson).
