Is there an easy way to perform diagonalization on a sub matrix of a real symmetric matrix?
e.g.
$A=\begin{pmatrix}a_1 & b & c \\ b & a_2 & d \\ c & d & a_3\end{pmatrix}$
To find an orthogonal matrix U, such that:
$U^T A U=\begin{pmatrix} x_1 & 0 & y \\ 0 & x_2 & z \\ y & z & x_3\end{pmatrix}$
Thanks!
Gerry Myerson answered in a comment:
Let $V$ be a $2\times 2$ orthogonal matrix that diagonalizes the submatrix; then $$U=\begin{pmatrix} v_{11} & v_{12} & 0 \\ v_{21} & v_{22} & 0 \\ 0&0&1 \end{pmatrix}$$ does the job.