Let \(A\) be a real upper-triangular \(n\times n\) matrix that commutes with its transpose. Prove that \(A\) is diagonal.
Solution
1. The assertion holds for \(n=1\).
Every \(1\times1\) matrix is diagonal.
2. Suppose \(n>1\). The equality\[ AA^{\mathsf T}=A^{\mathsf T}A \]forces every off-diagonal entry in the first row of \(A\) to vanish.
Because \(A\) is upper triangular, its first column is \[ (a_{11},0,\ldots,0)^{\mathsf T}. \] Hence \[ (A^{\mathsf T}A)_{11}=a_{11}^2. \] On the other hand, \[ (AA^{\mathsf T})_{11} = \sum_{j=1}^n a_{1j}^2. \] Since the two matrices are equal, \[ \sum_{j=1}^n a_{1j}^2=a_{11}^2, \] so \[ \sum_{j=2}^n a_{1j}^2=0. \] All summands are nonnegative, hence \[ a_{1j}=0 \qquad (j>1). \]
3. Consequently,\[ A= \begin{pmatrix} a_{11}&0\\ 0&A_1 \end{pmatrix}, \]where \(A_1\) is a real upper-triangular \((n-1)\times(n-1)\) matrix satisfying\[ A_1A_1^{\mathsf T}=A_1^{\mathsf T}A_1. \]
Upper triangularity already makes all entries below \(a_{11}\) in the first column zero, and step 2 makes all entries to the right of \(a_{11}\) in the first row zero. Thus \(A\) has the displayed block form, with \(A_1\) upper triangular.
Substituting the block form into \[ AA^{\mathsf T}=A^{\mathsf T}A \] and comparing the lower-right blocks gives \[ A_1A_1^{\mathsf T}=A_1^{\mathsf T}A_1. \]
4. The matrix \(A\) is diagonal.
Proceed by induction on \(n\). Step 1 is the base case. For \(n>1\), step 3 reduces the lower-right block to an \((n-1)\times(n-1)\) upper-triangular matrix commuting with its transpose. By the induction hypothesis, \(A_1\) is diagonal. The block form in step 3 then shows that \(A\) itself is diagonal.
5. Therefore\[ \boxed{A\text{ is diagonal}}. \]
This is step 4.
6. Q.E.D.
Step 5 is the required conclusion.