Let $p<n$ and
-$H\in\mathbb{R}^{n\times n}$ be symmetric with eigendecompoistion being $H=U\Lambda U^{\text{T}}$,
-$A\in\mathbb{R}^{n\times p}$,
-$D\in\mathbb{R}^{p\times p}$ be a diagonal matrix.
We have $H=U\Lambda U^{\text{T}}=A D A^{\text{T}}$. I want to find $A$ and $D$ as functions of $U$ and $\Lambda$.
For the above equation to be true only $p$ eigenvalues of $H$ in $\Lambda$ are nonzero (RHS is of rank $p$). Forming $A$ by the corresponding $p$ eigenvectors (columns of $U$) and $D$ with those nonezero eigenvalues is a solution.
My guess is that is the only solution but don't know how to prove it.
Suppose $U\Lambda U^T = ADA'$. Without loss of generality, we may assume that the eigenvalues in $\Lambda$ are arranged such that the first $p$ nonzero eigenvalues are first. Then partition $U = [U_1, U_2]$ and where $U_1$ corresponds to the nonzero eigenvalues of $\Lambda$. It is clear then that $U \Lambda U^T = U_1 \Lambda' U_1^T$ where $\Lambda'$ is the diagonal matrix consisting of just nonzero eigenvalues. Hence $U_1\Lambda' U_1^T = ADA'$.
Multiplying both equations by $U_1^T$ on the left and $U_1$ on the right, we see that $\Lambda' = U_1^T A D A' U_1$. This implies that $U_1^T A$ is at most a permutation matrix since both $D$ and $\Lambda'$ are diagonal.
Hence, you are correct up to permutation of duplicated eigenvalues and their corresponding eigenvectors.