We aim to demonstrate the existence of an orthogonal matrix $ P $ such that $ AP = PD $ or equivalently $ P^T A P = D $. Although we will assume $ P $ is orthogonal for simplicity, this can be established through our proofs.
To understand why $ AP = PD $ holds for a real symmetric matrix $ A $, we begin by acknowledging that $ A $ has real eigenvalues and orthogonal eigenvectors. We define the matrix $ P $ as follows:
$$
P = [\mathbf{v}_1 \, \mathbf{v}_2 \, \ldots \, \mathbf{v}_n],
$$
where the columns are the eigenvectors of $ A $.
Next, we construct the diagonal matrix $ D $ containing the eigenvalues corresponding to these eigenvectors:
$$
D = \begin{bmatrix}
\lambda_1 & 0 & \cdots & 0 \\
0 & \lambda_2 & \cdots & 0 \\
\vdots & \vdots & \ddots & \vdots \\
0 & 0 & \cdots & \lambda_n
\end{bmatrix}.
$$
Now, let’s calculate $ AP $:
$$
AP = A[\mathbf{v}_1 \, \mathbf{v}_2 \, \ldots \, \mathbf{v}_n] = [A \mathbf{v}_1 \, A \mathbf{v}_2 \, \ldots \, A \mathbf{v}_n].
$$
Using the property of eigenvectors, we know that $ A \mathbf{v}_i = \lambda_i \mathbf{v}_i $ for each eigenvector. Therefore, we can write:
$$
AP = [\lambda_1 \mathbf{v}_1 \, \lambda_2 \mathbf{v}_2 \, \ldots \, \lambda_n \mathbf{v}_n].
$$
Next, let’s evaluate $ PD $:
$$
PD = P \begin{bmatrix}
\lambda_1 & 0 & \cdots & 0 \\
0 & \lambda_2 & \cdots & 0 \\
\vdots & \vdots & \ddots & \vdots \\
0 & 0 & \cdots & \lambda_n
\end{bmatrix} = [\lambda_1 \mathbf{v}_1 \, \lambda_2 \mathbf{v}_2 \, \ldots \, \lambda_n \mathbf{v}_n].
$$
Both products yield the same outcome, leading us to conclude that $ AP = PD $. This relationship allows us to express the diagonalization of $ A $ as:
$$
A = PD P^{-1}.
$$
Since the matrix $ P $ is orthogonal (as its columns are orthonormal), we can further simplify this to:
$$
A = P D P^T.
$$