Make $X^TAX$ identity matrix If we have a $n \times m$ matrix  $X$ where  $m<n$,
and a $A$ $n \times n $ matrix.
Given $X$ , In which case that $A$ can make $ X^T A X$ identity matrix?
Note:
what about if we consider $A$ as a diagonal matrix? 
 A: Let $X$ be an $n$ by $m$ matrix which is tall $(n \ge m)$ and has full rank. Let $X = QR$ denote the $QR$ decomposition of $X$. Then $R$ is a nonsingular $m$ by $m$ matrix. Then
\begin{equation}
X^T A X = R^T Q^T A Q R
\end{equation}
which suggest taking
\begin{equation}
A = Q S Q^T
\end{equation}
for suitable $S$, as the expression collapses to 
\begin{equation}
X^T A X = R^T S R
\end{equation}
It follows that
\begin{equation}
S = R^{-T} R^{-1}
\end{equation}
will solve the problem, although it is unlikely to be diagonal. If $X$ is a wide matrix, then rank consideration shows there are no solutions.
A: If $A=diag(\lambda_i)$, then $(X^T A X)_{ij}$ equals $\lambda_i \langle x_i, x_j\rangle_2$ where $x_i$ denotes the $i$-th column of $X$. Therefore: If this is to result in the identity matrix, the columns of $X$ already have to be non-zero and orthogonal to each other. (In particular $X$ must be "tall" as Carl Christian noted).
Conversely: If the columns of $X$ are non-zero and orthogonal to each other, then $\lambda_i = \langle x_i,x_i\rangle^{1/2}$ will to the job.
A: If we do not require $A$ to be diagonal we can do the following:
In this situation we have
$$
 m
 = \operatorname{rank}(I)
 = \operatorname{rank}(X^T A X)
 \leq \operatorname{rank}(X)
 \leq m,
$$
so we find that $X$ must have rank $m$. In particular we then also have $m = \operatorname{rank}(X) \leq n$.
Suppose now that $n \geq m$ and that $X$ has rank $m$. Then $X^T$ also has rank $m$. We want to think of $X$ and $X^T$ as linear maps; more precisely let $m_X \colon K^m \to K^n$, $a \mapsto Xa$ and $m_{X^T} \colon K^n \to K^m$, $b \mapsto X^T b$.
Because $X$ has rank $m$ we know that $m_X$ is injective, so $(a_1, \dotsc, a_m)$ with $a_i = m_X(e_i)$ is linearly independent.Because $X^T$ has rank $m$ we also know that $m_{X^T}$ is surjective, so there exist a linearly independent family $(b_1, \dotsc, b_m)$ with $b_i \in K^n$, such that $m_{X^T}(b_i) = e_i$ for all $i$.
So we need some linear transformation $f \colon K^n \to K^n$ with $f(a_i) = b_i$ for all $i$. For this simply extend both families to bases $(a_1, \dotsc, a_n)$ and $(b_1, \dotsc, b_n)$ of $K^n$ and consider the automorphism $f \colon K^n \to K^n$ defined by $f(a_i) = b_i$ for all $i$.
For the composition $m_{X^T} f m_X$ we have
$$
 m_{X^T} f m_X(e_i) = m_{X^T} f(a_i) = m_{X^T} b_i = e_i
 \quad
 \text{for all $1 \leq i \leq m$}.
$$
Now $f$ is given by multiplication with some (invertible) $n \times n$ matrix $A$, i.e. $f = m_A$. The composition
$$
 m_{X^T} f m_X = m_{X^T} m_A m_X = m_{X^T A X}
$$
is given by multiplication with $X^T A X$, so the above shows that $X^T A X e_i = e_i$ for all $i$, which is only possible for $X^T A X = I$.
