f. (8) Find an invertible matrix \( Q \) and a diagonal matrix \( D \) such that \( Q^{-1}AQ = D \).