Given the quantum state $$|\chi\rangle=\dfrac{1}{||A||}\sum_{i=0}^{m-1}||A_i|||A_i\rangle|i\rangle,$$ how can we obtain the partial trace operation on the first register, i.e., $$\begin{align}\text{tr}_1(|\chi\rangle\langle\chi|)=&\dfrac{1}{||A||^2}\sum_{i,j=0}^{m-1}||A_i||\cdot||A_j|| \langle A_j|A_i\rangle|i\rangle\langle j|,\\\underbrace{=}_{??}&\dfrac{A^TA}{\text{tr}(A^TA)}\end{align}$$
As I understand, we have $$\sum_{i,j=0}^{m-1}||A_i||\cdot||A_j|| \langle A_j|A_i\rangle|i\rangle\langle j|=\sum_{i,j=0}^{m-1}c_{ij}|i\rangle\langle j|=C,$$ where $C=[c_{ij}]$ is the matrix whose elements are $c_{ij}$. So, I have to show that the elements of the matrix $(A^TA)_{ij}$ is equal to $||A_i||\cdot||A_j||\langle A_j|A_i\rangle$? Is this correct? How to do this?