9. (8%) Prove that if \( \mathbf{A} \) is an \( n \times n \) orthogonal matrix then \( \mathbf{a}_1 \mathbf{a}_1^{\text{T}} + \mathbf{a}_2 \mathbf{a}_2^{\text{T}} + \cdots + \mathbf{a}_n \mathbf{a}_n^{\text{T}} = \mathbf{I} \), where \( \mathbf{a}_i \) is the \( i \)th column of \( \mathbf{A} \), and \( \mathbf{I} \) is the identity matrix.